From 41e97e6d2bd817c39e0ce6593acea8b9b290ddd6 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 cdba3be8455..c924650e6c0 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; -- GitLab From fca81de731bb07e0eaa65ee565374870c54aad1c Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 2d8e3de5e72..18b42e965e0 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 @@ class DeserializationTests(unittest.TestCase): 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') -- GitLab From 13d865a04f551aa3eb2c76789e2970c2c1eceb0f Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 7092f296171..27b637456f6 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 class ModelUtils { 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; -- GitLab From eed27dc4105fde10491bd455af790916b0204739 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 68b26dbf496..cff23f95bad 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<String, Object> vendorExtensions = new HashMap<String, Object>(); - //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; -- GitLab From 158ee579ddef524de0bc9067b9ad9feeab42ed78 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 b3d02767d03..44f3380b8ca 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 @@ public class DefaultCodegen implements CodegenConfig { 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<String, V> 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<String, Integer> 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 class DefaultCodegen implements CodegenConfig { 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); -- GitLab From 24fc6c526143b4e6d33705d538de56bab5827042 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 27b637456f6..5dc7d792e2d 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 class ModelUtils { 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; } -- GitLab From c47d0972f5cd83da658f630cf1c6801e2e0a6515 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 f617a76f204..818a2bca581 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: -- GitLab From 4c889510f03e8d2493dbbf0a07203221ca8bdfb0 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 18b42e965e0..d037ad2af86 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 @@ class DeserializationTests(unittest.TestCase): 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 @@ class DeserializationTests(unittest.TestCase): 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 -- GitLab From 9b687da90b9d7c0a5aeded43674a9fecdf58c3aa Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 44f3380b8ca..7e39f20507b 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 class DefaultCodegen implements CodegenConfig { 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); -- GitLab From c603f099a8db8e056a8f948e1e8bde957045e93b Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 cff23f95bad..b3a0e54c476 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<String, V> 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<String, Integer> 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 7e39f20507b..ee7d7c517f9 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 @@ public class DefaultCodegen implements CodegenConfig { /** * 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<String, V> 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<String, Integer> 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. */ -- GitLab From a594a1a0c313ba9d73d60192b8cad4de4e34ff08 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 ee7d7c517f9..05e0972ce19 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 class DefaultCodegen implements CodegenConfig { } /** - * 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<String, V>' 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<String, V>. 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. -- GitLab From 068b137b33c969c2f8a070745cfbce6851e893f3 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 05e0972ce19..ba71bcb046a 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 @@ public class DefaultCodegen implements CodegenConfig { protected List<CliOption> cliOptions = new ArrayList<CliOption>(); 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<String, String> supportedLibraries = new LinkedHashMap<String, String>(); @@ -2353,7 +2367,8 @@ public class DefaultCodegen implements CodegenConfig { 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 { -- GitLab From 524bd31683f2ca21ce5066323bcabecfcc524eaa Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 ba71bcb046a..27134f6d50e 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 @@ public class DefaultCodegen implements CodegenConfig { * 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<String, String> supportedLibraries = new LinkedHashMap<String, String>(); -- GitLab From e2e2e0869ced3b0d1d3d5edb4219ab8e86bd251c Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 27134f6d50e..ce57dcbf472 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 @@ public class DefaultCodegen implements CodegenConfig { */ 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 -- GitLab From b62ae93b1cb610e20261ee486f2ca761e71260f2 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 ce57dcbf472..a482189d893 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 class DefaultCodegen implements CodegenConfig { 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 92c76bb89bb..1c3a57569ec 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)) -- GitLab From c2cadb08b0335d96940fddb70fa297e9f25cd02c Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 45b7c529816..638e208469e 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 class DefaultCodegenTest { // 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<String> excpectedDiscriminatorValues = new ArrayList<>(Arrays.asList("daily", "sub-obj")); ArrayList<String> xDiscriminatorValues = new ArrayList<>(); for (CodegenModel child: cm.children) { -- GitLab From 62733880dc37140b43bd2f424a927288d715ade3 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 a482189d893..4572b952a77 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 @@ public class DefaultCodegen implements CodegenConfig { * 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<String, String> supportedLibraries = new LinkedHashMap<String, String>(); protected String library; @@ -2367,15 +2373,17 @@ public class DefaultCodegen implements CodegenConfig { 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 1c3a57569ec..bcd495c7d26 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 class PythonClientExperimentalCodegen extends PythonClientCodegen { 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); } -- GitLab From f32f9eb4c8052b5360e4e03139867ef304ad04c2 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 d27928ab752..62eee911ea2 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 6eac3ace2ec..46be89a5b23 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 4b232aa174a..cf00d9d4c81 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 36026fe72f8..15763836ddb 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 1d7b5b26d71..846a97c82a8 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 bc3c7f3922d..4e43e94825b 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 8f5ea4b2ced..bee23082474 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 2680d987a45..631b0362886 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 97b8891a27e..2e315eb2f21 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 ec98b99dcec..4c0497d6769 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 2437d3c81ac..74beb2c531c 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 12bfa5c7fe5..78693cf8f0e 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 4fec91d8735..8e2932ce592 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 345d5c970c9..3664cdd7907 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 4ef564793dc..0c8f013cd48 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 @@ class AdditionalPropertiesClass(ModelNormal): '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 @@ class AdditionalPropertiesClass(ModelNormal): 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 749e3ada66e..38483bcfd92 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 bb0b08667d2..a947a3f1ce1 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 3587e28fdcb..e250585bd01 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 f382aa023ce..f2f66828aa2 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 c95da553350..f3f1fc4104a 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 04b98e500c4..1c0c437e28b 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 de8d27972b1..fc05f288989 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 16bb62ed0fb..50c99bdf072 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 5012af9ae1b..c463a789b71 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 3d6717ebd60..5295d1f06db 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 408e8c7533a..cbdbd12338f 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 5f625ab888b..0af90241dc2 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 46b91e54a8b..c9f5c791ddc 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 594b477258a..5d0a5f87b3e 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 1d7b5b26d71..846a97c82a8 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 6a7288abcb8..4230b57b126 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 ec98b99dcec..4c0497d6769 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 46c822e9db4..2263b96b258 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 787699f2eb3..cb3f8462e0e 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 22eeb37f1cc..7117b79ca68 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 ea21af6ad1f..61a2c33e6a4 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 335edad8c0f..e825da665ed 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 b86f0b17ab9..8aadf030d29 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 7b1fe8506a6..00037cf35fa 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 bc43f1e9351..5d0a4a075fe 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 a99a1f761c2..6e4dc3c9af8 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 6fbc1b6d2c7..793225bc517 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 fe93f417347..14789a06f91 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 b6cf8106682..f066c080aad 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 2d9e43b532c..1b1ec5fb6cc 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 e0209f490b4..35def0646b1 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 cd0165286aa..82542e8e709 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 38fad7b220f..f2adcf60418 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 1490bbc71e6..b6c40431aec 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 81f40ad3377..7fa03fda3f8 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 1916169c512..6a95e862ac3 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 0be63bdcd2d..401be7b0dd9 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 de8d27972b1..fc05f288989 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 90c79fd2bbc..85d5be3b80a 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 cc33a3d9ec3..beeb69a573d 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 130f8781a7f..f1c436b5389 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 d40836a3076..e36ad6804bb 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 6ef7500c2c6..3b67428f413 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 1d4a80e0c7c..0b35ac17cf5 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 89d8720a969..cad529c4dc0 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 @@ class NullableClass(ModelNormal): '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 @@ class NullableClass(ModelNormal): 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 b50f8fb7786..dfe8ab46c5f 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 8a9b46fd4c6..bdcb7b18b0b 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 d334ceac0d9..138419c1a27 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 cd92ebf412e..a55f0ac8bed 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 c37a9f93fb2..e270cfcf854 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 b8d64ff38c3..bce02d2b8d4 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 @@ class User(ModelNormal): '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 @@ class User(ModelNormal): 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 """ -- GitLab From 87f900ff42f575c36aa6f851edba1c7badb03202 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 818a2bca581..2c6ee0e6ea8 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 d037ad2af86..c1fd4e3c945 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 @@ class DeserializationTests(unittest.TestCase): """ # 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 @@ class DeserializationTests(unittest.TestCase): '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 @@ class DeserializationTests(unittest.TestCase): 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 @@ class DeserializationTests(unittest.TestCase): # 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 769ee23937d..9f26ab2f213 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 @@ MockResponse = namedtuple('MockResponse', 'data') 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()) -- GitLab From ed47df0e36add511872d8387b38e767260e8167a Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 bcd495c7d26..9d3dde5056c 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 class PythonClientExperimentalCodegen extends PythonClientCodegen { @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 -- GitLab From 80a6f9bdc7b4b11dfd19ee742d5c77fe763dc5b9 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 2c6ee0e6ea8..83d151f6afb 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' -- GitLab From 82507564a052d60c719e5199ff35ded6f147c56b Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 83d151f6afb..8e82b862388 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 5295d1f06db..3d6717ebd60 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 cb3f8462e0e..787699f2eb3 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 7117b79ca68..22eeb37f1cc 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 61a2c33e6a4..ea21af6ad1f 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 e825da665ed..335edad8c0f 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 779a8db51e9..05a4dbfd6ba 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 35def0646b1..e0209f490b4 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 beeb69a573d..cc33a3d9ec3 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 f1c436b5389..130f8781a7f 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 e36ad6804bb..d40836a3076 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 3b67428f413..6ef7500c2c6 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 53c8a1dc2de..bb2e1a7615c 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 c1fd4e3c945..f539f5af946 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 @@ class DeserializationTests(unittest.TestCase): 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 @@ class DeserializationTests(unittest.TestCase): '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 9f26ab2f213..35c628bf24e 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 @@ class DiscardUnknownPropertiesTests(unittest.TestCase): 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 @@ class DiscardUnknownPropertiesTests(unittest.TestCase): 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 @@ class DiscardUnknownPropertiesTests(unittest.TestCase): 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 @@ class DiscardUnknownPropertiesTests(unittest.TestCase): 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 -- GitLab From 64723518dcd26fa487430e1a6a655c702019854e Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 b3a0e54c476..c661e8965a4 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<String, V> 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<String, Integer> 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 4572b952a77..6bdd13fe2af 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 class DefaultCodegen implements CodegenConfig { * 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<String, V>' 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<String, V>. 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. -- GitLab From e158fef4a814f1f404c9c1bac76dda08490f3eae Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 f539f5af946..cf46fc9735b 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 @@ class DeserializationTests(unittest.TestCase): 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 @@ class DeserializationTests(unittest.TestCase): 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 -- GitLab From 250dd7cd6a82848189eb5a964977dac5bc8853d1 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 9d3dde5056c..b9c5ae4ad59 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 class PythonClientExperimentalCodegen extends PythonClientCodegen { 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 -- GitLab From 6b4fa1fd9a59d4c70deda65ba57ed7204f9b1d32 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 c040b61b33e..c7988952b7f 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 class PythonClientExperimentalTest { 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); } } -- GitLab From 3b2261bc0deb3cc611c471f9714961efc173a19a Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 8e82b862388..723d37586f0 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' -- GitLab From b8b6d221aabab0c3db5b85c5f6400a645a60f834 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 7c805f9e0fa..244a31c548e 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 e47ede9cc92..cbcd01161a9 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(): -- GitLab From 66ec230f74d25a22e49734e06bb39fbc7c18cfc6 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 b9c5ae4ad59..6fb39b001cf 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 class PythonClientExperimentalCodegen extends PythonClientCodegen { 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 -- GitLab From 594332a6fc70c8320ac57cab35deab7d7bf44fa8 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 b3177163df8..1322dc94c42 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 @@ abstract public class AbstractAdaCodegen extends DefaultCodegen implements Codeg 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 bb2a21d4afa..24a25c5d5a6 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 abstract class AbstractApexCodegen extends DefaultCodegen implements Code } 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 abstract class AbstractApexCodegen extends DefaultCodegen implements Code } 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 abstract class AbstractApexCodegen extends DefaultCodegen implements Code } 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 66af4e39a87..3323eb2ff03 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 abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co 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) + "<string, " + getTypeDeclaration(inner) + ">"; } 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 6d8f5e97632..a0a17f1c9ce 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 abstract class AbstractEiffelCodegen extends DefaultCodegen implements Co 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 abstract class AbstractEiffelCodegen extends DefaultCodegen implements Co @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 6ec69705188..446fb841673 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 abstract class AbstractFSharpCodegen extends DefaultCodegen implements Co 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) + "<string, " + getTypeDeclaration(inner) + ">"; } 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 d9d916d9079..249cf3a437b 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 abstract class AbstractGoCodegen extends DefaultCodegen implements Codege } 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 abstract class AbstractGoCodegen extends DefaultCodegen implements Codege 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 2ba884ebb86..82513ed6a05 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 abstract class AbstractJavaCodegen extends DefaultCodegen implements Code } 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 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code 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 bc582f75616..07238fb7cf7 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 abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co 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) + "<kotlin.String, " + getTypeDeclaration(inner) + ">"; 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 7395186f484..8311fb29f4c 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 abstract class AbstractPhpCodegen extends DefaultCodegen implements Codeg } 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 c293ff84eec..6e14557065c 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 @@ abstract public class AbstractRubyCodegen extends DefaultCodegen implements Code 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) + "<String, " + getTypeDeclaration(inner) + ">"; } 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 af24ba9c21a..a96dea59a92 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 abstract class AbstractScalaCodegen extends DefaultCodegen { 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 abstract class AbstractScalaCodegen extends DefaultCodegen { @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 abstract class AbstractScalaCodegen extends DefaultCodegen { } 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 8bc11a66223..62e0251bcbf 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 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp 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 1e7349a53bd..793d593a2c0 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 class AndroidClientCodegen extends DefaultCodegen implements CodegenConfi 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/ApexClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ApexClientCodegen.java index 1deb382a6a5..9e4f889a287 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 class ApexClientCodegen extends AbstractApexCodegen { 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<String, %s>()", 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 bf59d7db699..79b02bd3274 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 class BashClientCodegen extends DefaultCodegen implements CodegenConfig { 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 a12d712c3ff..748b54fa00a 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 class CSharpClientCodegen extends AbstractCSharpCodegen { @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 3c8d8a3e33d..e9235266d44 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 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { @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 1de98be94e7..a323067cb8f 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 class ConfluenceWikiCodegen extends DefaultCodegen implements CodegenConf 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 88637961ccc..45aaa1c5b13 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 class CppPistacheServerCodegen extends AbstractCppCodegen { return getSchemaType(p) + "<" + getTypeDeclaration(inner) + ">"; } if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return getSchemaType(p) + "<std::string, " + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isByteArraySchema(p)) { return "std::string"; @@ -399,7 +399,7 @@ public class CppPistacheServerCodegen extends AbstractCppCodegen { } 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<std::string, " + inner + ">()"; } 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 c308a53996e..8acde46deee 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 class CppQt5AbstractCodegen extends AbstractCppCodegen implements Codegen 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) + "<QString, " + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isBinarySchema(p)) { return getSchemaType(p); @@ -222,7 +222,7 @@ public class CppQt5AbstractCodegen extends AbstractCppCodegen implements Codegen } return "0"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(p); + Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); return "QMap<QString, " + getTypeDeclaration(inner) + ">()"; } 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 0dd42392622..f183491f7e2 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 class CppRestSdkClientCodegen extends AbstractCppCodegen { 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) + "<utility::string_t, " + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isFileSchema(p) || ModelUtils.isBinarySchema(p)) { return "std::shared_ptr<" + openAPIType + ">"; @@ -382,7 +382,7 @@ public class CppRestSdkClientCodegen extends AbstractCppCodegen { } return "0"; } else if (ModelUtils.isMapSchema(p)) { - String inner = getSchemaType(ModelUtils.getAdditionalProperties(p)); + String inner = getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, p)); return "std::map<utility::string_t, " + inner + ">()"; } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; @@ -395,7 +395,7 @@ public class CppRestSdkClientCodegen extends AbstractCppCodegen { 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 3234cfb4c9f..47520177e93 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 class CppRestbedServerCodegen extends AbstractCppCodegen { 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) + "<std::string, " + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isByteArraySchema(p)) { return "std::string"; @@ -430,7 +430,7 @@ public class CppRestbedServerCodegen extends AbstractCppCodegen { return "\"\""; } } else if (ModelUtils.isMapSchema(p)) { - String inner = getSchemaType(ModelUtils.getAdditionalProperties(p)); + String inner = getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, p)); return "std::map<std::string, " + inner + ">()"; } 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 ae1a2e8fbb0..3db621ed840 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 class DartClientCodegen extends DefaultCodegen implements CodegenConfig { 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/DartDioClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java index 9c06fb029b7..31394c5fc07 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 class DartDioClientCodegen extends DartClientCodegen { @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 6f487e0d475..c1e21a14e18 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 class ElixirClientCodegen extends DefaultCodegen implements CodegenConfig 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 b31277f51e8..cac59737d3b 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 class ElmClientCodegen extends DefaultCodegen implements CodegenConfig { 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 15a37e681e8..5e590e6f08b 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 class HaskellHttpClientCodegen extends DefaultCodegen implements CodegenC 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 class HaskellHttpClientCodegen extends DefaultCodegen implements CodegenC @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 024447f3dd3..6eb0f48fcf0 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 class HaskellServantCodegen extends DefaultCodegen implements CodegenConf 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 class HaskellServantCodegen extends DefaultCodegen implements CodegenConf @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 5617b2973da..1096e2d81ac 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 class JMeterClientCodegen extends DefaultCodegen implements CodegenConfig 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 6103ae1edc9..378307c3edd 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 class JavascriptApolloClientCodegen extends DefaultCodegen implements Cod 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 class JavascriptApolloClientCodegen extends DefaultCodegen implements Cod 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 2beed8ba2f4..26d2a334fa5 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 class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo 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 class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo 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 7cc1215f464..60abe7528a7 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 class JavascriptClosureAngularClientCodegen extends DefaultCodegen implem 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 "Object<!string, "+ getTypeDeclaration(inner) + ">"; } 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 322b7b98e99..418e79201ab 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 class JavascriptFlowtypedClientCodegen extends AbstractTypeScriptClientCo @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 18330873bcf..900ed1120a2 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 class LuaClientCodegen extends DefaultCodegen implements CodegenConfig { 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 101dbab1fb9..dee46f19c37 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 class NimClientCodegen extends DefaultCodegen implements CodegenConfig { } 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 d3e022bf6d6..6dd901199f8 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 class OCamlClientCodegen extends DefaultCodegen implements CodegenConfig } 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 2fa81b97dd4..0501c0cf3b0 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 class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig { 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 8eef21d0e89..a4641d79049 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 class PerlClientCodegen extends DefaultCodegen implements CodegenConfig { 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 fef8185b61d..4396979d2b1 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 class PhpSilexServerCodegen extends DefaultCodegen implements CodegenConf 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 ef09fa0caa1..8c9bd4b7c5a 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 class PhpSymfonyServerCodegen extends AbstractPhpCodegen implements Codeg } 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 c2bccf21152..c2bd0793147 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 class ProtobufSchemaCodegen extends DefaultCodegen implements CodegenConf 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 267d14bc83b..fbd5c513c99 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 class PythonAbstractConnexionServerCodegen extends DefaultCodegen impleme 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 a7e186c3735..84d465fc7ef 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 class PythonClientCodegen extends DefaultCodegen implements CodegenConfig 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 6fb39b001cf..02c58e98bc9 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 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { 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 class PythonClientExperimentalCodegen extends PythonClientCodegen { @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 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { 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 85be42aca6f..2a568384756 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 class RClientCodegen extends DefaultCodegen implements CodegenConfig { 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 ce35525629a..8a73b469445 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 class RubyClientCodegen extends AbstractRubyCodegen { @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 706083b50dc..5416b2cfc0e 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 class RustClientCodegen extends DefaultCodegen implements CodegenConfig { } 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 a0ef19a483a..fb18ed01758 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 class RustServerCodegen extends DefaultCodegen implements CodegenConfig { 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 class RustServerCodegen extends DefaultCodegen implements CodegenConfig { 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 class RustServerCodegen extends DefaultCodegen implements CodegenConfig { 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 299a8e79e57..e2dc1210993 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 class ScalaAkkaClientCodegen extends AbstractScalaCodegen implements Code } 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 d49f37e5622..bf697e60ddb 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 class ScalaFinchServerCodegen extends DefaultCodegen implements CodegenCo 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 4cd79f8644e..42392373d8f 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 class ScalaGatlingCodegen extends AbstractScalaCodegen implements Codegen 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 4c1da136a2e..9d8becf5961 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 class ScalaPlayFrameworkServerCodegen extends AbstractScalaCodegen implem } 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 0b19394c08e..b046930aacf 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 class ScalazClientCodegen extends AbstractScalaCodegen implements Codegen } 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 347b371c776..b19fb328d87 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 class StaticHtml2Generator extends DefaultCodegen implements CodegenConfi 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 c50f4492b40..3637bf4da74 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 class StaticHtmlGenerator extends DefaultCodegen implements CodegenConfig 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 e2f798df5dc..e0ca5c85dc8 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 class Swift3Codegen extends DefaultCodegen implements CodegenConfig { @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 class Swift3Codegen extends DefaultCodegen implements CodegenConfig { 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 class Swift3Codegen extends DefaultCodegen implements CodegenConfig { @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 b15c045efd7..dbab5b8e818 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 class Swift4Codegen extends DefaultCodegen implements CodegenConfig { 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 class Swift4Codegen extends DefaultCodegen implements CodegenConfig { 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 class Swift4Codegen extends DefaultCodegen implements CodegenConfig { @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 445069455d4..92773a9ab99 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 class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig 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 class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig 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 class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig @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 039d271fa05..5b263c829f7 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 class SwiftClientCodegen extends DefaultCodegen implements CodegenConfig 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 class SwiftClientCodegen extends DefaultCodegen implements CodegenConfig @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 556ae673ec6..0d101b890ba 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 class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode @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 1b6e8092639..c07b0b43512 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 class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodege @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 990c206fca5..aa9aebcdf6d 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 class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege @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 93f47c09b5e..b5c0489cad6 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 class TypeScriptInversifyClientCodegen extends AbstractTypeScriptClientCo @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 c680840da7a..b3a5cfef97d 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 class TypeScriptJqueryClientCodegen extends AbstractTypeScriptClientCodeg @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 6a46fbc78dd..e4e80793ec4 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 @@ public class TypeScriptNodeClientCodegen extends AbstractTypeScriptClientCodegen @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 26f6fb6f06b..92c788de925 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 class TypeScriptReduxQueryClientCodegen extends AbstractTypeScriptClientC @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 2d00d6b30a0..65794344730 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 class TypeScriptRxjsClientCodegen extends AbstractTypeScriptClientCodegen @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); } -- GitLab From 12c55cab66977394f144b35b0d300b8f9310e0f8 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 638e208469e..22891daab38 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 class DefaultCodegenTest { 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<String, Schema> 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<String, Schema> 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 5b0114d96ac..221f13a7004 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 class ModelUtilsTest { */ @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<String, Schema> 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 -- GitLab From b0b198a8ed3c1d281fa42fb604f40f5c33bbdac2 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 6bdd13fe2af..1c4f9dd20d9 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 class DefaultCodegen implements CodegenConfig { 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 class DefaultCodegen implements CodegenConfig { */ 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") + "<String, " + inner + ">"; } else if (ModelUtils.isArraySchema(schema)) { @@ -1854,7 +1854,7 @@ public class DefaultCodegen implements CodegenConfig { } 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 @@ public class DefaultCodegen implements CodegenConfig { 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 class DefaultCodegen implements CodegenConfig { 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 class DefaultCodegen implements CodegenConfig { 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 class DefaultCodegen implements CodegenConfig { 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 class DefaultCodegen implements CodegenConfig { 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 class DefaultCodegen implements CodegenConfig { } 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 @@ public class DefaultCodegen implements CodegenConfig { 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 class DefaultCodegen implements CodegenConfig { } } 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 class DefaultCodegen implements CodegenConfig { 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 class DefaultCodegen implements CodegenConfig { 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 70a42907c97..f83a918e83d 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 @@ public class DefaultGenerator extends AbstractGenerator implements Generator { 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 c1f26c8ad77..9d632888f20 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 @@ public class InlineModelResolver { 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 @@ public class InlineModelResolver { 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 @@ public class InlineModelResolver { 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 @@ public class InlineModelResolver { 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 @@ public class InlineModelResolver { 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 @@ public class InlineModelResolver { 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 @@ public class InlineModelResolver { } } 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 @@ public class InlineModelResolver { // 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 @@ public class InlineModelResolver { } else if (model instanceof Schema) { Schema m = (Schema) model; Map<String, Schema> 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 @@ public class InlineModelResolver { 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 @@ public class InlineModelResolver { // 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<String, Schema> properties, String path) { + private void flattenProperties(OpenAPI openAPI, Map<String, Schema> properties, String path) { if (properties == null) { return; } @@ -538,7 +538,7 @@ public class InlineModelResolver { && ((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 @@ public class InlineModelResolver { 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 @@ public class InlineModelResolver { } } 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 @@ public class InlineModelResolver { } } - 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 @@ public class InlineModelResolver { 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 ffc664c3cf4..c475da2105a 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 @@ public class ExampleGenerator { Map<String, Object> mp = new HashMap<String, Object>(); 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 5dc7d792e2d..2e5d80a9e7d 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 class ModelUtils { * @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 class ModelUtils { * @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 class ModelUtils { 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 class ModelUtils { * 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. -- GitLab From 628520d636588208bc2d1caa39dd7e9505d9e97c Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 e21b8fb7d25..7f990bf0fa7 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: {} -- GitLab From fa07164010cac1dbb964e67082e55b5ef2a4522e Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 74598c6ce70..2f94340420d 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: -- GitLab From d45636bff706df8f728258e7f628f4c2663eebb4 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 02c58e98bc9..9788396a52c 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 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { 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 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { } else { return prefix + getTypeString(inner, "[", "]") + fullSuffix; } - } + } if (ModelUtils.isFileSchema(p)) { return prefix + "file_type" + fullSuffix; } @@ -973,15 +982,11 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { 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. -- GitLab From 8a1c42530e414b36e91ec6329d77f9828fab4349 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 2e5d80a9e7d..471b6764c7d 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 class ModelUtils { 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<String, Object> 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. -- GitLab From ed36b759063b2b9a98050c3b16d1b4957f41fed4 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 22891daab38..77d93f2ed23 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 class DefaultCodegenTest { @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 class DefaultCodegenTest { 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<String, Schema> m = schema.getProperties(); Schema child = m.get("map_string"); @@ -254,8 +263,6 @@ public class DefaultCodegenTest { 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 class DefaultCodegenTest { 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 class DefaultCodegenTest { 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<String, Schema> m = schema.getProperties(); Schema child = m.get("map_string"); @@ -301,6 +308,9 @@ public class DefaultCodegenTest { // 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 class DefaultCodegenTest { // additionalProperties: false. Assert.assertNotNull(child.getAdditionalProperties()); Assert.assertEquals(child.getAdditionalProperties(), Boolean.FALSE); + addProps = ModelUtils.getAdditionalProperties(openAPI, child); + Assert.assertNull(addProps); } @Test -- GitLab From 230c2b8f948f095e9cdb65b47c86bcf5196c687c Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 2f94340420d..cd67c5478f4 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: -- GitLab From 726d47eab53dadda3f427a11653b8b458b14f9cb Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 ba8906a1a2d..cd6d793ec81 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 -- GitLab From a67cc80ce4e6bb6de6f95841c3b9a8367e96dfc7 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 244a31c548e..36211a81253 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 cbcd01161a9..b870ecb8701 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(): -- GitLab From cd1f8fd2c585e0a3f3f146bacad63f5ded40bc1b Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 c661e8965a4..e868c2b1131 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 -- GitLab From 70f6207f6d7ceb75f47f8f6f2a768b568af46fa7 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 c0304aebb36..6ac76d37cbf 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 class CodegenConstants { 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 fcb3c889ee9..6c8e21dc4b0 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.MustacheEngineAdapter; 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 @@ public class DefaultCodegen implements CodegenConfig { // 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 class DefaultCodegen implements CodegenConfig { 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 class DefaultCodegen implements CodegenConfig { } } + /** + * 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 class DefaultCodegen implements CodegenConfig { 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 class DefaultCodegen implements CodegenConfig { 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 class DefaultCodegen implements CodegenConfig { 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<String, String> 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 class DefaultCodegen implements CodegenConfig { */ 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") + "<String, " + inner + ">"; } else if (ModelUtils.isArraySchema(schema)) { @@ -1854,7 +1893,7 @@ public class DefaultCodegen implements CodegenConfig { } 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 @@ public class DefaultCodegen implements CodegenConfig { 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 class DefaultCodegen implements CodegenConfig { 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 class DefaultCodegen implements CodegenConfig { 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 class DefaultCodegen implements CodegenConfig { 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 class DefaultCodegen implements CodegenConfig { 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 class DefaultCodegen implements CodegenConfig { } 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 @@ public class DefaultCodegen implements CodegenConfig { 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 class DefaultCodegen implements CodegenConfig { } } 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 class DefaultCodegen implements CodegenConfig { 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 class DefaultCodegen implements CodegenConfig { 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 class DefaultCodegen implements CodegenConfig { 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<String, Object> 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 c475da2105a..6a6a807c6f2 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 @@ public class ExampleGenerator { Map<String, Object> mp = new HashMap<String, Object>(); 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 1322dc94c42..d09d7ab2c02 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 @@ abstract public class AbstractAdaCodegen extends DefaultCodegen implements Codeg 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 24a25c5d5a6..196ac1aa181 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 abstract class AbstractApexCodegen extends DefaultCodegen implements Code } 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 abstract class AbstractApexCodegen extends DefaultCodegen implements Code } 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 abstract class AbstractApexCodegen extends DefaultCodegen implements Code } 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 3323eb2ff03..ee16ccdd0eb 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 abstract class AbstractCSharpCodegen extends DefaultCodegen implements Co 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) + "<string, " + getTypeDeclaration(inner) + ">"; } 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 a0a17f1c9ce..82eba4b189c 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 abstract class AbstractEiffelCodegen extends DefaultCodegen implements Co 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 abstract class AbstractEiffelCodegen extends DefaultCodegen implements Co @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 446fb841673..c258b22eb09 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 abstract class AbstractFSharpCodegen extends DefaultCodegen implements Co 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) + "<string, " + getTypeDeclaration(inner) + ">"; } 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 249cf3a437b..47fda5b3119 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 abstract class AbstractGoCodegen extends DefaultCodegen implements Codege } 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 abstract class AbstractGoCodegen extends DefaultCodegen implements Codege 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 82513ed6a05..03fba2462c4 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 abstract class AbstractJavaCodegen extends DefaultCodegen implements Code } 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 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code 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 9a0909dcbff..347ce1d07cf 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 abstract class AbstractKotlinCodegen extends DefaultCodegen implements Co 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) + "<kotlin.String, " + getTypeDeclaration(inner) + ">"; 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 8311fb29f4c..eff7939d6e3 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 abstract class AbstractPhpCodegen extends DefaultCodegen implements Codeg } 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 6e14557065c..d035b2e8424 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 @@ abstract public class AbstractRubyCodegen extends DefaultCodegen implements Code 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) + "<String, " + getTypeDeclaration(inner) + ">"; } 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 a96dea59a92..6f87d96f13e 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 abstract class AbstractScalaCodegen extends DefaultCodegen { 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 abstract class AbstractScalaCodegen extends DefaultCodegen { @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 abstract class AbstractScalaCodegen extends DefaultCodegen { } 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 1ebded4cb87..e16404b2797 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 @@ public abstract class AbstractTypeScriptClientCodegen extends DefaultCodegen imp 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 793d593a2c0..6a5e2ee83af 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 class AndroidClientCodegen extends DefaultCodegen implements CodegenConfi 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/ApexClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ApexClientCodegen.java index 9e4f889a287..d7e5889c173 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 class ApexClientCodegen extends AbstractApexCodegen { 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<String, %s>()", 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 79b02bd3274..93e9d09e470 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 class BashClientCodegen extends DefaultCodegen implements CodegenConfig { 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 748b54fa00a..495ccf72f6b 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 class CSharpClientCodegen extends AbstractCSharpCodegen { @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 e9235266d44..2d2f563bf21 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 @@ public class CSharpNetCoreClientCodegen extends AbstractCSharpCodegen { @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 a323067cb8f..c2cadfa1702 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 class ConfluenceWikiCodegen extends DefaultCodegen implements CodegenConf 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 45aaa1c5b13..6a2368cd319 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 class CppPistacheServerCodegen extends AbstractCppCodegen { return getSchemaType(p) + "<" + getTypeDeclaration(inner) + ">"; } if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return getSchemaType(p) + "<std::string, " + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isByteArraySchema(p)) { return "std::string"; @@ -399,7 +399,7 @@ public class CppPistacheServerCodegen extends AbstractCppCodegen { } 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<std::string, " + inner + ">()"; } 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 8acde46deee..c3227182214 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 class CppQt5AbstractCodegen extends AbstractCppCodegen implements Codegen 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) + "<QString, " + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isBinarySchema(p)) { return getSchemaType(p); @@ -222,7 +222,7 @@ public class CppQt5AbstractCodegen extends AbstractCppCodegen implements Codegen } return "0"; } else if (ModelUtils.isMapSchema(p)) { - Schema inner = ModelUtils.getAdditionalProperties(this.openAPI, p); + Schema inner = getAdditionalProperties(p); return "QMap<QString, " + getTypeDeclaration(inner) + ">()"; } 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 f183491f7e2..149a10be6dd 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 class CppRestSdkClientCodegen extends AbstractCppCodegen { 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) + "<utility::string_t, " + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isFileSchema(p) || ModelUtils.isBinarySchema(p)) { return "std::shared_ptr<" + openAPIType + ">"; @@ -382,7 +382,7 @@ public class CppRestSdkClientCodegen extends AbstractCppCodegen { } return "0"; } else if (ModelUtils.isMapSchema(p)) { - String inner = getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, p)); + String inner = getSchemaType(getAdditionalProperties(p)); return "std::map<utility::string_t, " + inner + ">()"; } else if (ModelUtils.isArraySchema(p)) { ArraySchema ap = (ArraySchema) p; @@ -395,7 +395,7 @@ public class CppRestSdkClientCodegen extends AbstractCppCodegen { 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 47520177e93..09626e7a327 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 class CppRestbedServerCodegen extends AbstractCppCodegen { 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) + "<std::string, " + getTypeDeclaration(inner) + ">"; } else if (ModelUtils.isByteArraySchema(p)) { return "std::string"; @@ -430,7 +430,7 @@ public class CppRestbedServerCodegen extends AbstractCppCodegen { return "\"\""; } } else if (ModelUtils.isMapSchema(p)) { - String inner = getSchemaType(ModelUtils.getAdditionalProperties(this.openAPI, p)); + String inner = getSchemaType(getAdditionalProperties(p)); return "std::map<std::string, " + inner + ">()"; } 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 3db621ed840..2ba3d7be485 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 class DartClientCodegen extends DefaultCodegen implements CodegenConfig { 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/DartDioClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java index 31394c5fc07..2a8de81aff6 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 class DartDioClientCodegen extends DartClientCodegen { @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 c1e21a14e18..5524a78cba8 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 class ElixirClientCodegen extends DefaultCodegen implements CodegenConfig 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 cac59737d3b..630c720ccef 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 class ElmClientCodegen extends DefaultCodegen implements CodegenConfig { 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 5e590e6f08b..512c2645f0c 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 class HaskellHttpClientCodegen extends DefaultCodegen implements CodegenC 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 class HaskellHttpClientCodegen extends DefaultCodegen implements CodegenC @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 6eb0f48fcf0..857bc4a55e4 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 class HaskellServantCodegen extends DefaultCodegen implements CodegenConf 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 class HaskellServantCodegen extends DefaultCodegen implements CodegenConf @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 1096e2d81ac..9678d29c880 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 class JMeterClientCodegen extends DefaultCodegen implements CodegenConfig 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 378307c3edd..a08486854ab 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 class JavascriptApolloClientCodegen extends DefaultCodegen implements Cod 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 class JavascriptApolloClientCodegen extends DefaultCodegen implements Cod 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 26d2a334fa5..886fd869ec8 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 class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo 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 class JavascriptClientCodegen extends DefaultCodegen implements CodegenCo 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 60abe7528a7..877db877e4d 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 class JavascriptClosureAngularClientCodegen extends DefaultCodegen implem 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 "Object<!string, "+ getTypeDeclaration(inner) + ">"; } 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 418e79201ab..84c10840c44 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 class JavascriptFlowtypedClientCodegen extends AbstractTypeScriptClientCo @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 900ed1120a2..f69352db3a9 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 class LuaClientCodegen extends DefaultCodegen implements CodegenConfig { 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 dee46f19c37..6e754097c5c 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 class NimClientCodegen extends DefaultCodegen implements CodegenConfig { } 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 6dd901199f8..4d6d038c73b 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 class OCamlClientCodegen extends DefaultCodegen implements CodegenConfig } 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 0501c0cf3b0..abeeeffa269 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 class ObjcClientCodegen extends DefaultCodegen implements CodegenConfig { 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 a4641d79049..5546e79a92a 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 class PerlClientCodegen extends DefaultCodegen implements CodegenConfig { 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 4396979d2b1..71512e350ae 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 class PhpSilexServerCodegen extends DefaultCodegen implements CodegenConf 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 8c9bd4b7c5a..31e66bc67bf 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 class PhpSymfonyServerCodegen extends AbstractPhpCodegen implements Codeg } 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 c2bd0793147..6cefe264da5 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 class ProtobufSchemaCodegen extends DefaultCodegen implements CodegenConf 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 fbd5c513c99..6105a43bf9a 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 class PythonAbstractConnexionServerCodegen extends DefaultCodegen impleme 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 84d465fc7ef..b03f83ef271 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 class PythonClientCodegen extends DefaultCodegen implements CodegenConfig 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 9788396a52c..085bd92aca6 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 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { 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 class PythonClientExperimentalCodegen extends PythonClientCodegen { @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 2a568384756..c719f5ebfb4 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 class RClientCodegen extends DefaultCodegen implements CodegenConfig { 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 8a73b469445..d893636abf6 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 class RubyClientCodegen extends AbstractRubyCodegen { @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 5416b2cfc0e..1307f27f692 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 class RustClientCodegen extends DefaultCodegen implements CodegenConfig { } 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 fb18ed01758..80fd3dd58e2 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 class RustServerCodegen extends DefaultCodegen implements CodegenConfig { 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 class RustServerCodegen extends DefaultCodegen implements CodegenConfig { 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 class RustServerCodegen extends DefaultCodegen implements CodegenConfig { 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 e2dc1210993..6c06262a5ec 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 class ScalaAkkaClientCodegen extends AbstractScalaCodegen implements Code } 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 bf697e60ddb..50e4ffc684e 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 class ScalaFinchServerCodegen extends DefaultCodegen implements CodegenCo 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 42392373d8f..30d8c83d130 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 class ScalaGatlingCodegen extends AbstractScalaCodegen implements Codegen 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 9d8becf5961..18ad995d1f5 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 class ScalaPlayFrameworkServerCodegen extends AbstractScalaCodegen implem } 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 b046930aacf..036970066f5 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 class ScalazClientCodegen extends AbstractScalaCodegen implements Codegen } 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 b19fb328d87..a0aaec72486 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 class StaticHtml2Generator extends DefaultCodegen implements CodegenConfi 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 3637bf4da74..3804de3160a 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 class StaticHtmlGenerator extends DefaultCodegen implements CodegenConfig 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 8f3621cd471..0c389b58e72 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 class Swift4Codegen extends DefaultCodegen implements CodegenConfig { 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 class Swift4Codegen extends DefaultCodegen implements CodegenConfig { 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 class Swift4Codegen extends DefaultCodegen implements CodegenConfig { @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 92773a9ab99..ccd1b7ad3d0 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 class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig 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 class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig 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 class Swift5ClientCodegen extends DefaultCodegen implements CodegenConfig @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 f0480376484..6f948578b29 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 class TypeScriptAngularClientCodegen extends AbstractTypeScriptClientCode @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 d7ba3f167ff..95ded86dce5 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 class TypeScriptAxiosClientCodegen extends AbstractTypeScriptClientCodege @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 aa9aebcdf6d..c5b857ef2cd 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 class TypeScriptFetchClientCodegen extends AbstractTypeScriptClientCodege @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 b5c0489cad6..8bff85a02ad 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 class TypeScriptInversifyClientCodegen extends AbstractTypeScriptClientCo @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 b3a5cfef97d..6e4e2fad7b1 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 class TypeScriptJqueryClientCodegen extends AbstractTypeScriptClientCodeg @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 e4e80793ec4..09d5ae4df4e 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 @@ public class TypeScriptNodeClientCodegen extends AbstractTypeScriptClientCodegen @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 92c788de925..aac1d6bc8d9 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 class TypeScriptReduxQueryClientCodegen extends AbstractTypeScriptClientC @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 65794344730..ec5ddb557fd 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 class TypeScriptRxjsClientCodegen extends AbstractTypeScriptClientCodegen @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 471b6764c7d..9a13e85370b 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.media.*; 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.IJsonSchemaValidationProperties; 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 class ModelUtils { 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<Schema> 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 class ModelUtils { 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<Schema> 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 class ModelUtils { 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<String, Object> 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 class ModelUtils { } 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 class ModelUtils { 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<AuthorizationValue> 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<AuthorizationValue> 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<AuthorizationValue> 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 b2b58a8da3b..0dc35067779 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 class SemVer implements Comparable<SemVer> { 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 77d93f2ed23..11d11a4e145 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.LowercaseLambda; 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 class DefaultCodegenTest { 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 class DefaultCodegenTest { 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 class DefaultCodegenTest { 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 077268f2408..714558172d5 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.oas.models.servers.Server; 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 class TestUtils { * @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 45b03efccce..901bfaf7046 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 class BashClientOptionsProvider implements OptionsProvider { .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 79cf084234f..368e1d5022e 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 class DartClientOptionsProvider implements OptionsProvider { .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 9e54e028f7f..dc5f8cd783d 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 class DartDioClientOptionsProvider implements OptionsProvider { .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 f6efa94aa51..95f186b27f2 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 class ElixirClientOptionsProvider implements OptionsProvider { .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 0684591597b..df39bc9b02c 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 class GoGinServerOptionsProvider implements OptionsProvider { .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 767c81b336b..d56996c4d43 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 class GoServerOptionsProvider implements OptionsProvider { .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 f883ebbed19..8a7459228b7 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 class HaskellServantOptionsProvider implements OptionsProvider { .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 245957be407..0c61168604f 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 class PhpClientOptionsProvider implements OptionsProvider { .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 97ad8132ce4..0bfe24f2fe3 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 class PhpLumenServerOptionsProvider implements OptionsProvider { .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 a3f32f9b4a0..3d68f10321a 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 class PhpSilexServerOptionsProvider implements OptionsProvider { .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 4bf91932a3f..f4bbb41abc5 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 class PhpSlim4ServerOptionsProvider implements OptionsProvider { .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 537b7b10c66..fe41ab8ef96 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 class PhpSlimServerOptionsProvider implements OptionsProvider { .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 09bd0dceabc..db3cc18e6a8 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 class RubyClientOptionsProvider implements OptionsProvider { .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 4b982932b98..689ef6eebef 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 class ScalaAkkaClientOptionsProvider implements OptionsProvider { .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 11825e2ec12..92efba318ed 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 class ScalaHttpClientOptionsProvider implements OptionsProvider { .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 aa2d61f2829..7f545974f20 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 class Swift4OptionsProvider implements OptionsProvider { .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 58b3ae01fd3..826affdaba6 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 class Swift5OptionsProvider implements OptionsProvider { .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 51b62748e3c..d7ccf464f80 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 class TypeScriptAngularClientOptionsProvider implements OptionsProvider { .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 1e008de1ed1..c87ef629bc5 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 class TypeScriptAngularJsClientOptionsProvider implements OptionsProvider .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 58b5aa61826..2d39d635a10 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 class TypeScriptAureliaClientOptionsProvider implements OptionsProvider { .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 7bec81c9ae3..97baf5fea7a 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 class TypeScriptFetchClientOptionsProvider implements OptionsProvider { .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 a2dc76d63f4..c74f404df38 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 class TypeScriptNodeClientOptionsProvider implements OptionsProvider { .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(); } -- GitLab From c4d049f26d0086b0331435b097f6fdb2deca54c0 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 0d17d281f2f..f4824e48771 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 4df80090d8e..39f1b70930e 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 a42f97eb120..1583a1dea01 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 6b29731c533..82b0d949406 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 990e93ee87d..0f52dcbd316 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 0dc65073d31..56d1272ca5e 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 @@ class AdditionalPropertiesClass(ModelNormal): 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 @@ class AdditionalPropertiesClass(ModelNormal): 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 @@ class AdditionalPropertiesClass(ModelNormal): _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 d809be68ac6..66f00673b8b 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 @@ class Drawing(ModelNormal): 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 @@ class Drawing(ModelNormal): _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 5ea4593b1fa..c7859f39f7d 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 6f884f082ab..de463e35281 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(): -- GitLab From 98e862abc3f3a0fceed4720c09c2300182054b01 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 6c8e21dc4b0..dcf57e0b263 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 @@ public class DefaultCodegen implements CodegenConfig { * 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 9a13e85370b..b5f69d58deb 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 class ModelUtils { * 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 @@ public class ModelUtils { * @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<AuthorizationValue> auths) throws Exception { @@ -1495,8 +1498,11 @@ public class ModelUtils { * 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<AuthorizationValue> auths) { String version; @@ -1525,7 +1531,6 @@ public class ModelUtils { * @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<AuthorizationValue> auths) { SemVer version = getOpenApiVersion(openapi, location, auths); -- GitLab From 86d6733f1d24229e1cc82b0a0a812a83acbf739f Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 b5f69d58deb..a2ca8e5991a 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 class ModelUtils { * * @return the version of the OpenAPI document. */ - public static SemVer getOpenApiVersion(OpenAPI openapi, String location, List<AuthorizationValue> auths) { + public static SemVer getOpenApiVersion(OpenAPI openAPI, String location, List<AuthorizationValue> auths) { String version; try { JsonNode document = readWithInfo(location, auths); @@ -1519,7 +1519,7 @@ public class ModelUtils { } catch (Exception ex) { // Fallback to using the 'openapi' attribute. LOGGER.warn("Unable to read swagger/openapi attribute"); - version = openapi.getOpenapi(); + version = openAPI.getOpenapi(); } return new SemVer(version); } -- GitLab From 1f51fb030dc53f0c55a345ecb8a8d45848759b7d Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 a2ca8e5991a..3d3e30754d3 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 @@ public class ModelUtils { public static JsonNode readWithInfo(String location, List<AuthorizationValue> 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); -- GitLab From 886d41209f384ba82455686cfa74e941640cd019 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 eb3e0524de1..7b56820212d 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 be4455c683b..b3e6326015b 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 @@ class AdditionalPropertiesClass(object): 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 @@ class AdditionalPropertiesClass(object): 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 @@ class AdditionalPropertiesClass(object): 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 eb3e0524de1..7b56820212d 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 be4455c683b..b3e6326015b 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 @@ class AdditionalPropertiesClass(object): 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 @@ class AdditionalPropertiesClass(object): 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 @@ class AdditionalPropertiesClass(object): 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 eb3e0524de1..7b56820212d 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 be4455c683b..b3e6326015b 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 @@ class AdditionalPropertiesClass(object): 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 @@ class AdditionalPropertiesClass(object): 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 @@ class AdditionalPropertiesClass(object): 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 -- GitLab From 4bdf1114144164cfa95eb1bc140d21f54f0883fb Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 dcf57e0b263..ee026429960 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 @@ public class DefaultCodegen implements CodegenConfig { * 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<String, Object> 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 840790ed4c8..3456b2fc41e 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 class CodegenConfigurator { // TODO: Move custom validations to a separate type as part of a "Workflow" Set<String> 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 62eee911ea2..d27928ab752 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 46be89a5b23..6eac3ace2ec 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 cf00d9d4c81..4b232aa174a 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 15763836ddb..36026fe72f8 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 846a97c82a8..1d7b5b26d71 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 4e43e94825b..bc3c7f3922d 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 bee23082474..8f5ea4b2ced 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 631b0362886..2680d987a45 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 2e315eb2f21..97b8891a27e 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 4c0497d6769..ec98b99dcec 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 74beb2c531c..2437d3c81ac 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 78693cf8f0e..12bfa5c7fe5 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 8e2932ce592..4fec91d8735 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 3664cdd7907..345d5c970c9 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 0c8f013cd48..4ef564793dc 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 @@ class AdditionalPropertiesClass(ModelNormal): '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 @@ class AdditionalPropertiesClass(ModelNormal): 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 38483bcfd92..749e3ada66e 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 a947a3f1ce1..bb0b08667d2 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 e250585bd01..3587e28fdcb 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 f2f66828aa2..f382aa023ce 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 f3f1fc4104a..c95da553350 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 1c0c437e28b..04b98e500c4 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 fc05f288989..de8d27972b1 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 50c99bdf072..16bb62ed0fb 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 c463a789b71..5012af9ae1b 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(): -- GitLab From b05b4150b8c7e99d34bb6c6658a5da400ff2bac9 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 6ac76d37cbf..575d4464a21 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 class CodegenConstants { // 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 ee026429960..19810521a31 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 class DefaultCodegen implements CodegenConfig { @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())); } -- GitLab From f57338d2110e0694dec7c0e07c9966c914c74359 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 085bd92aca6..41017200a94 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 @@ import static org.openapitools.codegen.utils.StringUtils.underscore; 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 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { } } - // override with any special post-processing for all models + /** + * Override with special post-processing for all models. + */ @SuppressWarnings({"static-method", "unchecked"}) public Map<String, Object> postProcessAllModels(Map<String, Object> objs) { // loop through all models and delete ones where type!=object and the model has no validations and enums @@ -373,6 +377,14 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { for (Map<String, Object> mo : models) { CodegenModel cm = (CodegenModel) mo.get("model"); + // Make sure the models listed in 'additionalPropertiesType' are included in imports. + List<String> refModelNames = (List<String>) 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 class PythonClientExperimentalCodegen extends PythonClientCodegen { * @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<String> referencedModelNames) { // this is used to set dataType, which defines a python tuple of classes String fullSuffix = suffix; if (")".equals(suffix)) { @@ -915,6 +929,9 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { 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 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { } 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 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { // "[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 class PythonClientExperimentalCodegen extends PythonClientCodegen { // 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 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { // store it in codegenModel.additionalPropertiesType. // The 'addProps' may be a reference, getTypeDeclaration will resolve // the reference. - codegenModel.additionalPropertiesType = getTypeDeclaration(addProps); + List<String> referencedModelNames = new ArrayList<String>(); + 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 66f00673b8b..8b81b46da6f 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 @@ from petstore_api.model_utils import ( # noqa: F401 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: -- GitLab From be49ab4b3f75b2861c46a87e79ae9fe98affd0fa Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 19810521a31..4e96356ca50 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 class DefaultCodegen implements CodegenConfig { // '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 471c16c10a9..9fc3f83433a 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 1c163a915a2..af6e0f32538 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 baf22c61d19..d1b74a5df84 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 4fec91d8735..bd6a44a0f9f 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 345d5c970c9..cc4654bf99c 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 22b604b631f..ec59cff57fd 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 4ef564793dc..14479b04c10 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 c309826f2e8..32e75b99d0c 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 8bbd629023e..b85acf7cee6 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 749e3ada66e..2a60e948cf7 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 88fb6a5e15b..c88e688698c 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 dc87c6bf9e1..dc2ceeabbe6 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 aa85a8d32c8..86fffc9425a 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 8648ca8e101..8c7543dcfbb 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 b457b27a8cb..eff67c1208d 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 3733298e843..dc9429e9122 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 3ca42fba60b..7477b0c6fba 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 bb0b08667d2..12c170e6883 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 f008695b43a..1e18f17dcdd 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 b34ba8ac020..452e5a5a93e 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 3587e28fdcb..d06bcd74375 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 c416862240f..8ed440045db 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 f382aa023ce..ec9a0577bf4 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 2f0cf1bdc60..f2d167c5857 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 c95da553350..c94e72607ea 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 1ab97028ee4..4a9d0c6e025 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 04b98e500c4..de0626ed942 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 41bd842225f..ca8d8a610b1 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 a492a47164e..d976b65e405 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 195e3d4209c..65a454d5eb3 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 de8d27972b1..3ceb88c7ee2 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 6278289267d..8b17c6fd9d4 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 107e1f3e0f8..2acb81da6ab 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 4323ac7f085..5ec80335d17 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 160db49fd14..4cc8ae93b1e 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 0f21a84df49..d0ec72ffaac 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 2715cfdbfd5..059c5226692 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 b22bc0b3052..915cf431c56 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 bb5188acaf0..f2ac86acc3a 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 f7157154f13..cdaba89d918 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 974136a56a6..62064f877f4 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 3f85acb2e4d..38d9a345bb0 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 e3510cef772..e611a2d88fc 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 36f5add3db8..304c28dccdb 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 96d39402d56..e9c0d507593 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 f9213c37ea7..b1c7c21543e 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 b2fce89ec9b..cf2ca0db860 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 89675736076..f6608a0753c 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 6ff62a57233..fef235e51f6 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 d34d654e084..c8b34fbc3e7 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 e85ac1b87eb..03dea72d1c7 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 df65a2d3d04..da810f245ec 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 16bb62ed0fb..8a83c2cee86 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 6ee6983a4ab..112aa2f71d8 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 5012af9ae1b..e4488518643 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 1b34db90131..29b3dd29c5d 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 147bf2ff6f9..f9e6289e773 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 8c6d80c71f1..ddc94abd312 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 168554fa343..aaa77621506 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 10d0a988226..06508575539 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 fdd4ff69000..dc116859206 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 442f9837881..35b3d31bb84 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 0c08758bf04..0c51486f25d 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 1f1095d3773..249413c7078 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 aad4db483aa..2db2980bbf8 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 baf22c61d19..d1b74a5df84 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 56d1272ca5e..3ddfdf1360f 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 a8a541d6c21..1190653cc37 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 dc87c6bf9e1..dc2ceeabbe6 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 aa85a8d32c8..86fffc9425a 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 1f4652a636e..45a1ae1d18e 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 e0209f490b4..6f38eeb0622 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 8648ca8e101..8c7543dcfbb 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 b457b27a8cb..eff67c1208d 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 3733298e843..dc9429e9122 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 ea8e0969a48..25a9756814b 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 180a51d33a6..c25a3555281 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 8fc8df66812..835107f4762 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 82542e8e709..c5f804be52f 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 f2adcf60418..920ce08dee3 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 b6c40431aec..2494ae53c62 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 7fa03fda3f8..0a84065cec8 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 3ca42fba60b..7477b0c6fba 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 6a95e862ac3..0e1228b18bd 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 f008695b43a..1e18f17dcdd 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 b34ba8ac020..452e5a5a93e 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 a492a47164e..d976b65e405 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 195e3d4209c..65a454d5eb3 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 401be7b0dd9..8702e7a64e2 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 fc05f288989..b824e584180 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 6278289267d..8b17c6fd9d4 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 8b81b46da6f..273de67f9a7 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 107e1f3e0f8..2acb81da6ab 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 4323ac7f085..5ec80335d17 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 83043b7c431..169b3b1ab20 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 85d5be3b80a..c6aca47f553 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 0f21a84df49..d0ec72ffaac 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 2715cfdbfd5..059c5226692 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 6e88c734c96..e199e3ca8d6 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 24601b9499c..fc7dfe54ed8 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 cc33a3d9ec3..93ea32d9d56 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 130f8781a7f..7e3a4756a33 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 d40836a3076..73e43a17eca 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 974136a56a6..62064f877f4 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 662cf79189f..f408f274109 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 5de65e44476..f06a40c13ab 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 03ec7a1908c..3457f059cb5 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 701f8f8985b..5bc6b6415a5 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 e720690a055..27378859772 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 dd5ade49137..5e464a10131 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 b133b402688..271ca0435e4 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 1ef604607e6..406bb68ef65 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 6ef7500c2c6..2b5e315162f 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 3f85acb2e4d..38d9a345bb0 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 0b35ac17cf5..8aceb5d85ca 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 e3510cef772..e611a2d88fc 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 36f5add3db8..304c28dccdb 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 96d39402d56..e9c0d507593 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 f9213c37ea7..b1c7c21543e 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 b2fce89ec9b..cf2ca0db860 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 cad529c4dc0..ceb15a3356d 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 c7859f39f7d..32b9a5312de 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 89675736076..f6608a0753c 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 6ff62a57233..fef235e51f6 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 da7cbd15905..8f3fc3032cb 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 7c09a5b8d59..8bbc48699a6 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 fdc882ee5db..1f667c9f1a2 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 187a714b33b..cc1dbaa76c6 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 41da57604fc..81a65b315eb 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 1b34db90131..29b3dd29c5d 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 dfe8ab46c5f..69a7fa7956a 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 2f60ea9362d..59dad2d832b 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 8c6d80c71f1..ddc94abd312 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 bdcb7b18b0b..29f7fd1098b 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 138419c1a27..7693d05fbf5 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 1152adfc8a4..c3da504ce6c 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 de463e35281..f535ab5f670 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 a55f0ac8bed..e6e9dd6d3e4 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 168554fa343..aaa77621506 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 10d0a988226..06508575539 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 26cdd6f5092..c2b32863873 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 e270cfcf854..20d205195c5 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 5881e3c9472..94e9b0ae7f1 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 bce02d2b8d4..3cddc7287bf 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 c89497b6b55..55eb69bc6cb 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 bb2e1a7615c..b169310cdf7 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(): """ -- GitLab From faecafdf61dbcb04be46c7e72087106aca9b4ee3 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 af6e0f32538..e89a2a2e959 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 d1b74a5df84..02c609f16ff 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 d1b74a5df84..02c609f16ff 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. -- GitLab From cbfa01857ef4ff5b775360402695a5338dd088b3 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 575d4464a21..db6c931339d 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 class CodegenConstants { // 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 4e96356ca50..01ebbed33e8 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 class DefaultCodegen implements CodegenConfig { CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR, CodegenConstants.LEGACY_ADDITIONAL_PROPERTIES_BEHAVIOR_DESC).defaultValue(Boolean.TRUE.toString()); Map<String, String> 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 08d6d28d82d..200a6c4be30 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 5313659ef23..636f81711d5 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 a035ff98c8f..1691c330890 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 046e91b9075..cc9d1e8167b 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 f7bec563071..dfbdf4d07dd 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 19719e709f8..d2b6ab0cca5 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 941f00027db..48de99351d7 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) } -- GitLab From 45959d85ae919e2e063eff0352300fdf12a44595 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 01ebbed33e8..3cbe22bdfc9 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 @@ public class DefaultCodegen implements CodegenConfig { // 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; -- GitLab From 1cc405c9858b7478976fcf963070907d905c32be Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 12f3292db0b..4b2311590cc 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 8a4e6b78b30..7f971ad070a 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 @@ namespace Org.OpenAPITools.Model /// <param name="mapArrayAnytype">mapArrayAnytype.</param> /// <param name="mapMapString">mapMapString.</param> /// <param name="mapMapAnytype">mapMapAnytype.</param> + /// <param name="mapWithAdditionalProperties">mapWithAdditionalProperties.</param> + /// <param name="mapWithoutAdditionalProperties">mapWithoutAdditionalProperties.</param> /// <param name="anytype1">anytype1.</param> /// <param name="anytype2">anytype2.</param> /// <param name="anytype3">anytype3.</param> - public AdditionalPropertiesClass(Dictionary<string, string> mapString = default(Dictionary<string, string>), Dictionary<string, decimal> mapNumber = default(Dictionary<string, decimal>), Dictionary<string, int> mapInteger = default(Dictionary<string, int>), Dictionary<string, bool> mapBoolean = default(Dictionary<string, bool>), Dictionary<string, List<int>> mapArrayInteger = default(Dictionary<string, List<int>>), Dictionary<string, List<Object>> mapArrayAnytype = default(Dictionary<string, List<Object>>), Dictionary<string, Dictionary<string, string>> mapMapString = default(Dictionary<string, Dictionary<string, string>>), Dictionary<string, Dictionary<string, Object>> mapMapAnytype = default(Dictionary<string, Dictionary<string, Object>>), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) + public AdditionalPropertiesClass(Dictionary<string, string> mapString = default(Dictionary<string, string>), Dictionary<string, decimal> mapNumber = default(Dictionary<string, decimal>), Dictionary<string, int> mapInteger = default(Dictionary<string, int>), Dictionary<string, bool> mapBoolean = default(Dictionary<string, bool>), Dictionary<string, List<int>> mapArrayInteger = default(Dictionary<string, List<int>>), Dictionary<string, List<Object>> mapArrayAnytype = default(Dictionary<string, List<Object>>), Dictionary<string, Dictionary<string, string>> mapMapString = default(Dictionary<string, Dictionary<string, string>>), Dictionary<string, Dictionary<string, Object>> mapMapAnytype = default(Dictionary<string, Dictionary<string, Object>>), 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 @@ namespace Org.OpenAPITools.Model this.MapArrayAnytype = mapArrayAnytype; this.MapMapString = mapMapString; this.MapMapAnytype = mapMapAnytype; + this.MapWithAdditionalProperties = mapWithAdditionalProperties; + this.MapWithoutAdditionalProperties = mapWithoutAdditionalProperties; this.Anytype1 = anytype1; this.Anytype2 = anytype2; this.Anytype3 = anytype3; @@ -107,6 +111,18 @@ namespace Org.OpenAPITools.Model [DataMember(Name="map_map_anytype", EmitDefaultValue=false)] public Dictionary<string, Dictionary<string, Object>> MapMapAnytype { get; set; } + /// <summary> + /// Gets or Sets MapWithAdditionalProperties + /// </summary> + [DataMember(Name="map_with_additional_properties", EmitDefaultValue=false)] + public Object MapWithAdditionalProperties { get; set; } + + /// <summary> + /// Gets or Sets MapWithoutAdditionalProperties + /// </summary> + [DataMember(Name="map_without_additional_properties", EmitDefaultValue=false)] + public Object MapWithoutAdditionalProperties { get; set; } + /// <summary> /// Gets or Sets Anytype1 /// </summary> @@ -141,6 +157,8 @@ namespace Org.OpenAPITools.Model 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 @@ namespace Org.OpenAPITools.Model 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 @@ namespace Org.OpenAPITools.Model 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 d07f57619d5..4b2311590cc 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 d56cf173ddf..c9efb170ac4 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 @@ namespace Org.OpenAPITools.Model /// <param name="mapArrayAnytype">mapArrayAnytype.</param> /// <param name="mapMapString">mapMapString.</param> /// <param name="mapMapAnytype">mapMapAnytype.</param> + /// <param name="mapWithAdditionalProperties">mapWithAdditionalProperties.</param> + /// <param name="mapWithoutAdditionalProperties">mapWithoutAdditionalProperties.</param> /// <param name="anytype1">anytype1.</param> /// <param name="anytype2">anytype2.</param> /// <param name="anytype3">anytype3.</param> - public AdditionalPropertiesClass(Dictionary<string, string> mapString = default(Dictionary<string, string>), Dictionary<string, decimal> mapNumber = default(Dictionary<string, decimal>), Dictionary<string, int> mapInteger = default(Dictionary<string, int>), Dictionary<string, bool> mapBoolean = default(Dictionary<string, bool>), Dictionary<string, List<int>> mapArrayInteger = default(Dictionary<string, List<int>>), Dictionary<string, List<Object>> mapArrayAnytype = default(Dictionary<string, List<Object>>), Dictionary<string, Dictionary<string, string>> mapMapString = default(Dictionary<string, Dictionary<string, string>>), Dictionary<string, Dictionary<string, Object>> mapMapAnytype = default(Dictionary<string, Dictionary<string, Object>>), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) + public AdditionalPropertiesClass(Dictionary<string, string> mapString = default(Dictionary<string, string>), Dictionary<string, decimal> mapNumber = default(Dictionary<string, decimal>), Dictionary<string, int> mapInteger = default(Dictionary<string, int>), Dictionary<string, bool> mapBoolean = default(Dictionary<string, bool>), Dictionary<string, List<int>> mapArrayInteger = default(Dictionary<string, List<int>>), Dictionary<string, List<Object>> mapArrayAnytype = default(Dictionary<string, List<Object>>), Dictionary<string, Dictionary<string, string>> mapMapString = default(Dictionary<string, Dictionary<string, string>>), Dictionary<string, Dictionary<string, Object>> mapMapAnytype = default(Dictionary<string, Dictionary<string, Object>>), 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 @@ namespace Org.OpenAPITools.Model this.MapArrayAnytype = mapArrayAnytype; this.MapMapString = mapMapString; this.MapMapAnytype = mapMapAnytype; + this.MapWithAdditionalProperties = mapWithAdditionalProperties; + this.MapWithoutAdditionalProperties = mapWithoutAdditionalProperties; this.Anytype1 = anytype1; this.Anytype2 = anytype2; this.Anytype3 = anytype3; @@ -107,6 +111,18 @@ namespace Org.OpenAPITools.Model [DataMember(Name="map_map_anytype", EmitDefaultValue=false)] public Dictionary<string, Dictionary<string, Object>> MapMapAnytype { get; set; } + /// <summary> + /// Gets or Sets MapWithAdditionalProperties + /// </summary> + [DataMember(Name="map_with_additional_properties", EmitDefaultValue=false)] + public Object MapWithAdditionalProperties { get; set; } + + /// <summary> + /// Gets or Sets MapWithoutAdditionalProperties + /// </summary> + [DataMember(Name="map_without_additional_properties", EmitDefaultValue=false)] + public Object MapWithoutAdditionalProperties { get; set; } + /// <summary> /// Gets or Sets Anytype1 /// </summary> @@ -141,6 +157,8 @@ namespace Org.OpenAPITools.Model 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 @@ namespace Org.OpenAPITools.Model 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 @@ namespace Org.OpenAPITools.Model 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 d07f57619d5..4b2311590cc 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 8a4e6b78b30..7f971ad070a 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 @@ namespace Org.OpenAPITools.Model /// <param name="mapArrayAnytype">mapArrayAnytype.</param> /// <param name="mapMapString">mapMapString.</param> /// <param name="mapMapAnytype">mapMapAnytype.</param> + /// <param name="mapWithAdditionalProperties">mapWithAdditionalProperties.</param> + /// <param name="mapWithoutAdditionalProperties">mapWithoutAdditionalProperties.</param> /// <param name="anytype1">anytype1.</param> /// <param name="anytype2">anytype2.</param> /// <param name="anytype3">anytype3.</param> - public AdditionalPropertiesClass(Dictionary<string, string> mapString = default(Dictionary<string, string>), Dictionary<string, decimal> mapNumber = default(Dictionary<string, decimal>), Dictionary<string, int> mapInteger = default(Dictionary<string, int>), Dictionary<string, bool> mapBoolean = default(Dictionary<string, bool>), Dictionary<string, List<int>> mapArrayInteger = default(Dictionary<string, List<int>>), Dictionary<string, List<Object>> mapArrayAnytype = default(Dictionary<string, List<Object>>), Dictionary<string, Dictionary<string, string>> mapMapString = default(Dictionary<string, Dictionary<string, string>>), Dictionary<string, Dictionary<string, Object>> mapMapAnytype = default(Dictionary<string, Dictionary<string, Object>>), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) + public AdditionalPropertiesClass(Dictionary<string, string> mapString = default(Dictionary<string, string>), Dictionary<string, decimal> mapNumber = default(Dictionary<string, decimal>), Dictionary<string, int> mapInteger = default(Dictionary<string, int>), Dictionary<string, bool> mapBoolean = default(Dictionary<string, bool>), Dictionary<string, List<int>> mapArrayInteger = default(Dictionary<string, List<int>>), Dictionary<string, List<Object>> mapArrayAnytype = default(Dictionary<string, List<Object>>), Dictionary<string, Dictionary<string, string>> mapMapString = default(Dictionary<string, Dictionary<string, string>>), Dictionary<string, Dictionary<string, Object>> mapMapAnytype = default(Dictionary<string, Dictionary<string, Object>>), 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 @@ namespace Org.OpenAPITools.Model this.MapArrayAnytype = mapArrayAnytype; this.MapMapString = mapMapString; this.MapMapAnytype = mapMapAnytype; + this.MapWithAdditionalProperties = mapWithAdditionalProperties; + this.MapWithoutAdditionalProperties = mapWithoutAdditionalProperties; this.Anytype1 = anytype1; this.Anytype2 = anytype2; this.Anytype3 = anytype3; @@ -107,6 +111,18 @@ namespace Org.OpenAPITools.Model [DataMember(Name="map_map_anytype", EmitDefaultValue=false)] public Dictionary<string, Dictionary<string, Object>> MapMapAnytype { get; set; } + /// <summary> + /// Gets or Sets MapWithAdditionalProperties + /// </summary> + [DataMember(Name="map_with_additional_properties", EmitDefaultValue=false)] + public Object MapWithAdditionalProperties { get; set; } + + /// <summary> + /// Gets or Sets MapWithoutAdditionalProperties + /// </summary> + [DataMember(Name="map_without_additional_properties", EmitDefaultValue=false)] + public Object MapWithoutAdditionalProperties { get; set; } + /// <summary> /// Gets or Sets Anytype1 /// </summary> @@ -141,6 +157,8 @@ namespace Org.OpenAPITools.Model 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 @@ namespace Org.OpenAPITools.Model 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 @@ namespace Org.OpenAPITools.Model 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 4f3b7e0fdef..8d85f5b71f0 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 d07f57619d5..4b2311590cc 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 f56db9cd165..ccd3f80fda9 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 @@ namespace Org.OpenAPITools.Model /// <param name="mapArrayAnytype">mapArrayAnytype.</param> /// <param name="mapMapString">mapMapString.</param> /// <param name="mapMapAnytype">mapMapAnytype.</param> + /// <param name="mapWithAdditionalProperties">mapWithAdditionalProperties.</param> + /// <param name="mapWithoutAdditionalProperties">mapWithoutAdditionalProperties.</param> /// <param name="anytype1">anytype1.</param> /// <param name="anytype2">anytype2.</param> /// <param name="anytype3">anytype3.</param> - public AdditionalPropertiesClass(Dictionary<string, string> mapString = default(Dictionary<string, string>), Dictionary<string, decimal> mapNumber = default(Dictionary<string, decimal>), Dictionary<string, int> mapInteger = default(Dictionary<string, int>), Dictionary<string, bool> mapBoolean = default(Dictionary<string, bool>), Dictionary<string, List<int>> mapArrayInteger = default(Dictionary<string, List<int>>), Dictionary<string, List<Object>> mapArrayAnytype = default(Dictionary<string, List<Object>>), Dictionary<string, Dictionary<string, string>> mapMapString = default(Dictionary<string, Dictionary<string, string>>), Dictionary<string, Dictionary<string, Object>> mapMapAnytype = default(Dictionary<string, Dictionary<string, Object>>), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) + public AdditionalPropertiesClass(Dictionary<string, string> mapString = default(Dictionary<string, string>), Dictionary<string, decimal> mapNumber = default(Dictionary<string, decimal>), Dictionary<string, int> mapInteger = default(Dictionary<string, int>), Dictionary<string, bool> mapBoolean = default(Dictionary<string, bool>), Dictionary<string, List<int>> mapArrayInteger = default(Dictionary<string, List<int>>), Dictionary<string, List<Object>> mapArrayAnytype = default(Dictionary<string, List<Object>>), Dictionary<string, Dictionary<string, string>> mapMapString = default(Dictionary<string, Dictionary<string, string>>), Dictionary<string, Dictionary<string, Object>> mapMapAnytype = default(Dictionary<string, Dictionary<string, Object>>), 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 @@ namespace Org.OpenAPITools.Model this.MapArrayAnytype = mapArrayAnytype; this.MapMapString = mapMapString; this.MapMapAnytype = mapMapAnytype; + this.MapWithAdditionalProperties = mapWithAdditionalProperties; + this.MapWithoutAdditionalProperties = mapWithoutAdditionalProperties; this.Anytype1 = anytype1; this.Anytype2 = anytype2; this.Anytype3 = anytype3; @@ -105,6 +109,18 @@ namespace Org.OpenAPITools.Model [DataMember(Name="map_map_anytype", EmitDefaultValue=false)] public Dictionary<string, Dictionary<string, Object>> MapMapAnytype { get; set; } + /// <summary> + /// Gets or Sets MapWithAdditionalProperties + /// </summary> + [DataMember(Name="map_with_additional_properties", EmitDefaultValue=false)] + public Object MapWithAdditionalProperties { get; set; } + + /// <summary> + /// Gets or Sets MapWithoutAdditionalProperties + /// </summary> + [DataMember(Name="map_without_additional_properties", EmitDefaultValue=false)] + public Object MapWithoutAdditionalProperties { get; set; } + /// <summary> /// Gets or Sets Anytype1 /// </summary> @@ -139,6 +155,8 @@ namespace Org.OpenAPITools.Model 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 @@ namespace Org.OpenAPITools.Model 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 @@ namespace Org.OpenAPITools.Model 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 0b8a73d6143..7c827a81c33 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 <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProjectGuid>{3AB1F259-1769-484B-9411-84505FCCBD55}</ProjectGuid> + <ProjectGuid>{321C8C3F-0156-40C1-AE42-D59761FB9B6C}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Org.OpenAPITools</RootNamespace> diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesClass.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesClass.md index d07f57619d5..4b2311590cc 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 53e2fbc1d03..7b53578ded3 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 @@ namespace Org.OpenAPITools.Model /// <param name="mapArrayAnytype">mapArrayAnytype.</param> /// <param name="mapMapString">mapMapString.</param> /// <param name="mapMapAnytype">mapMapAnytype.</param> + /// <param name="mapWithAdditionalProperties">mapWithAdditionalProperties.</param> + /// <param name="mapWithoutAdditionalProperties">mapWithoutAdditionalProperties.</param> /// <param name="anytype1">anytype1.</param> /// <param name="anytype2">anytype2.</param> /// <param name="anytype3">anytype3.</param> - public AdditionalPropertiesClass(Dictionary<string, string> mapString = default(Dictionary<string, string>), Dictionary<string, decimal> mapNumber = default(Dictionary<string, decimal>), Dictionary<string, int> mapInteger = default(Dictionary<string, int>), Dictionary<string, bool> mapBoolean = default(Dictionary<string, bool>), Dictionary<string, List<int>> mapArrayInteger = default(Dictionary<string, List<int>>), Dictionary<string, List<Object>> mapArrayAnytype = default(Dictionary<string, List<Object>>), Dictionary<string, Dictionary<string, string>> mapMapString = default(Dictionary<string, Dictionary<string, string>>), Dictionary<string, Dictionary<string, Object>> mapMapAnytype = default(Dictionary<string, Dictionary<string, Object>>), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) + public AdditionalPropertiesClass(Dictionary<string, string> mapString = default(Dictionary<string, string>), Dictionary<string, decimal> mapNumber = default(Dictionary<string, decimal>), Dictionary<string, int> mapInteger = default(Dictionary<string, int>), Dictionary<string, bool> mapBoolean = default(Dictionary<string, bool>), Dictionary<string, List<int>> mapArrayInteger = default(Dictionary<string, List<int>>), Dictionary<string, List<Object>> mapArrayAnytype = default(Dictionary<string, List<Object>>), Dictionary<string, Dictionary<string, string>> mapMapString = default(Dictionary<string, Dictionary<string, string>>), Dictionary<string, Dictionary<string, Object>> mapMapAnytype = default(Dictionary<string, Dictionary<string, Object>>), 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 @@ namespace Org.OpenAPITools.Model this.MapArrayAnytype = mapArrayAnytype; this.MapMapString = mapMapString; this.MapMapAnytype = mapMapAnytype; + this.MapWithAdditionalProperties = mapWithAdditionalProperties; + this.MapWithoutAdditionalProperties = mapWithoutAdditionalProperties; this.Anytype1 = anytype1; this.Anytype2 = anytype2; this.Anytype3 = anytype3; @@ -110,6 +114,18 @@ namespace Org.OpenAPITools.Model [DataMember(Name="map_map_anytype", EmitDefaultValue=true)] public Dictionary<string, Dictionary<string, Object>> MapMapAnytype { get; set; } + /// <summary> + /// Gets or Sets MapWithAdditionalProperties + /// </summary> + [DataMember(Name="map_with_additional_properties", EmitDefaultValue=true)] + public Object MapWithAdditionalProperties { get; set; } + + /// <summary> + /// Gets or Sets MapWithoutAdditionalProperties + /// </summary> + [DataMember(Name="map_without_additional_properties", EmitDefaultValue=true)] + public Object MapWithoutAdditionalProperties { get; set; } + /// <summary> /// Gets or Sets Anytype1 /// </summary> @@ -144,6 +160,8 @@ namespace Org.OpenAPITools.Model 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 @@ namespace Org.OpenAPITools.Model 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 @@ namespace Org.OpenAPITools.Model 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 5313659ef23..636f81711d5 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 0dd3f328f41..54a41452ee8 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 35aafa9f602..9636d9f1b2e 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 5313659ef23..636f81711d5 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 0dd3f328f41..54a41452ee8 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 00ca7fb4406..71be988998b 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 30aad25824c..aebe8a8917a 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 e35f2cca9ab..019d1418dfb 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 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } + 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 30aad25824c..aebe8a8917a 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 781d4686e98..694d9208051 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 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } + 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 30aad25824c..aebe8a8917a 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 ffab911c1be..ae396ec513c 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 781d4686e98..694d9208051 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 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } + 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 30aad25824c..aebe8a8917a 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 ffab911c1be..ae396ec513c 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 781d4686e98..694d9208051 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 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } + 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 30aad25824c..aebe8a8917a 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 ffab911c1be..ae396ec513c 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 58772627a0d..e18e379ebb3 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } + 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 30aad25824c..aebe8a8917a 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 ffab911c1be..ae396ec513c 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 781d4686e98..694d9208051 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 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } + 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 30aad25824c..aebe8a8917a 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 ffab911c1be..ae396ec513c 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 fa85ab77596..0ced388db4e 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 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } + 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 30aad25824c..aebe8a8917a 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 ffab911c1be..ae396ec513c 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 fa85ab77596..0ced388db4e 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 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } + 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 30aad25824c..aebe8a8917a 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 70d8b5839fa..fdc052d56b5 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 4d1400b1d91..d3d7bc37970 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass implements Parcelable { } + 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 class AdditionalPropertiesClass implements Parcelable { 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 class AdditionalPropertiesClass implements Parcelable { @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 class AdditionalPropertiesClass implements Parcelable { 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 class AdditionalPropertiesClass implements Parcelable { 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 class AdditionalPropertiesClass implements Parcelable { mapArrayAnytype = (Map<String, List<Object>>)in.readValue(List.class.getClassLoader()); mapMapString = (Map<String, Map<String, String>>)in.readValue(Map.class.getClassLoader()); mapMapAnytype = (Map<String, Map<String, Object>>)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 30aad25824c..aebe8a8917a 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 ffab911c1be..ae396ec513c 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 a067b01ec97..383a75e58c7 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } + 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 30aad25824c..aebe8a8917a 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 ffab911c1be..ae396ec513c 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 803715a970f..8fa80fa4531 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 @@ import org.hibernate.validator.constraints.*; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } + 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 2e3844ba975..38091db3bd3 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 class AdditionalPropertiesClassTest { // 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 30aad25824c..aebe8a8917a 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 ffab911c1be..ae396ec513c 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 a72f9a9889e..7864d47805f 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } + 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 30aad25824c..aebe8a8917a 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 ffab911c1be..ae396ec513c 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 781d4686e98..694d9208051 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 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } + 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 30aad25824c..aebe8a8917a 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 ffab911c1be..ae396ec513c 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 c8b96f0db2d..c816033dfd0 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 @@ import javax.xml.bind.annotation.*; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } + 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 30aad25824c..aebe8a8917a 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 ffab911c1be..ae396ec513c 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 781d4686e98..694d9208051 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 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } + 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 30aad25824c..aebe8a8917a 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 a067b01ec97..383a75e58c7 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } + 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 30aad25824c..aebe8a8917a 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 ffab911c1be..ae396ec513c 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 294c05c7334..55852c49543 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 @@ import javax.validation.Valid; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } + 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 30aad25824c..aebe8a8917a 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 ffab911c1be..ae396ec513c 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 294c05c7334..55852c49543 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 @@ import javax.validation.Valid; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } + 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 30aad25824c..aebe8a8917a 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 ffab911c1be..ae396ec513c 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 294c05c7334..55852c49543 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 @@ import javax.validation.Valid; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } + 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 30aad25824c..aebe8a8917a 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 ffab911c1be..ae396ec513c 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 a067b01ec97..383a75e58c7 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } + 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 30aad25824c..aebe8a8917a 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 ffab911c1be..ae396ec513c 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 a067b01ec97..383a75e58c7 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } + 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 30aad25824c..aebe8a8917a 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 ffab911c1be..ae396ec513c 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 a067b01ec97..383a75e58c7 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } + 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 30aad25824c..aebe8a8917a 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 ffab911c1be..ae396ec513c 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 fa85ab77596..0ced388db4e 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 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } + 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 30aad25824c..aebe8a8917a 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 ffab911c1be..ae396ec513c 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 fa85ab77596..0ced388db4e 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 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } + 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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"); -- GitLab From f55c2f0dc705348f0deeacc6cdaa89ea6b94b0f5 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 8dd83cb6610..52e44cfac41 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<String, Map<String, Object>> mapMapAnytype = null; + @ApiModelProperty(value = "") + private Object mapWithAdditionalProperties; + + @ApiModelProperty(value = "") + private Object mapWithoutAdditionalProperties; + @ApiModelProperty(value = "") private Object anytype1; @@ -240,6 +246,42 @@ public class AdditionalPropertiesClass { return this; } + /** + * Get mapWithAdditionalProperties + * @return mapWithAdditionalProperties + **/ + @JsonProperty("map_with_additional_properties") + public Object getMapWithAdditionalProperties() { + return mapWithAdditionalProperties; + } + + public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + } + + public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { + this.mapWithAdditionalProperties = mapWithAdditionalProperties; + return this; + } + + /** + * Get mapWithoutAdditionalProperties + * @return mapWithoutAdditionalProperties + **/ + @JsonProperty("map_without_additional_properties") + public Object getMapWithoutAdditionalProperties() { + return mapWithoutAdditionalProperties; + } + + public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + } + + public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { + this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; + return this; + } + /** * Get anytype1 * @return anytype1 @@ -308,6 +350,8 @@ public class AdditionalPropertiesClass { 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-datelib-j8/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java index 7927ec401ed..4fc48c78a53 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -39,6 +39,8 @@ import javax.validation.Valid; 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 @@ -77,6 +79,14 @@ public class AdditionalPropertiesClass implements Serializable { @JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE) private Map<String, Map<String, Object>> 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 class AdditionalPropertiesClass implements Serializable { 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 class AdditionalPropertiesClass implements Serializable { 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 class AdditionalPropertiesClass implements Serializable { @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 class AdditionalPropertiesClass implements Serializable { 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 f2332eb2a60..651625c5921 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<String, List<Object>> mapArrayAnytype = new HashMap<String, List<Object>>(); private @Valid Map<String, Map<String, String>> mapMapString = new HashMap<String, Map<String, String>>(); private @Valid Map<String, Map<String, Object>> mapMapAnytype = new HashMap<String, Map<String, Object>>(); + 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 class AdditionalPropertiesClass implements Serializable { 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 class AdditionalPropertiesClass implements Serializable { 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 class AdditionalPropertiesClass implements Serializable { @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 class AdditionalPropertiesClass implements Serializable { 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 f6f5c60294f..333eb07e0c2 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 f2332eb2a60..651625c5921 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<String, List<Object>> mapArrayAnytype = new HashMap<String, List<Object>>(); private @Valid Map<String, Map<String, String>> mapMapString = new HashMap<String, Map<String, String>>(); private @Valid Map<String, Map<String, Object>> mapMapAnytype = new HashMap<String, Map<String, Object>>(); + 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 class AdditionalPropertiesClass implements Serializable { 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 class AdditionalPropertiesClass implements Serializable { 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 class AdditionalPropertiesClass implements Serializable { @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 class AdditionalPropertiesClass implements Serializable { 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 f6f5c60294f..333eb07e0c2 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 239ebd87616..f0c28565014 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 @@ import javax.validation.Valid; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 239ebd87616..f0c28565014 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 @@ import javax.validation.Valid; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 239ebd87616..f0c28565014 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 @@ import javax.validation.Valid; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 239ebd87616..f0c28565014 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 @@ import javax.validation.Valid; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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"); -- GitLab From c41d5fc7278fa3ff320fa16f9ffa888343018e69 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 1331ed4b237..d67cc938740 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 32c3b215980..0cf20648375 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 5313659ef23..636f81711d5 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 bb674c55b3a..33e2143e22c 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 9f8a26bcc61..1316a3c382e 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 a6e1a88e3b4..25530a2622e 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 9f8a26bcc61..1316a3c382e 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 a6e1a88e3b4..25530a2622e 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 9f8a26bcc61..1316a3c382e 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 2b19a95b486..9dd5c539404 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.<String, Object.<String, 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 9f8a26bcc61..1316a3c382e 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 2b19a95b486..9dd5c539404 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.<String, Object.<String, 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 a878436c1a1..211621aa76d 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 f388c3a4d1d..2f024e8fe0e 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 fc9b2c66e81..237015ce841 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 b063cb41986..d4d80409107 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 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess '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 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess '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 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess '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 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess $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 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess 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 d71078b0c21..5b922ddbabb 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 @@ class AdditionalPropertiesClassTest extends TestCase { } + /** + * 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 353033010b2..915bfabaa8e 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 ff8841189f7..1495d8523ac 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 @@ module Petstore 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 @@ module Petstore :'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 @@ module Petstore :'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' @@ -139,6 +147,14 @@ module Petstore 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 @@ module Petstore 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 @@ module Petstore # 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 353033010b2..915bfabaa8e 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 ff8841189f7..1495d8523ac 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 @@ module Petstore 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 @@ module Petstore :'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 @@ module Petstore :'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' @@ -139,6 +147,14 @@ module Petstore 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 @@ module Petstore 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 @@ module Petstore # 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 ee65b12fcc1..ff252ca8af4 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 @@ describe 'AdditionalPropertiesClass' do 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 1a863721712..dde6ecc444f 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 1a863721712..dde6ecc444f 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 1a863721712..dde6ecc444f 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 5fbc69ab84f..3e48a58493d 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 edbfa20608b..39480011bc4 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 1a863721712..dde6ecc444f 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 1a863721712..dde6ecc444f 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 1a863721712..dde6ecc444f 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 1a863721712..dde6ecc444f 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 1a863721712..dde6ecc444f 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 cc003383b96..b73bb2f1cfa 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 0e9e1377ea9..25ca643466b 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 894bb1537ab..8e0342c51f2 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 884dab3b875..6c37adcb734 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<Self, Self::Err> { + 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<Self, Self::Err> { + 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<Self, Self::Err> { + 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<Self, Self::Err> { + 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<Self, Self::Err> { + 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<Self, Self::Err> { + 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<Self, Self::Err> { + 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<Self, Self::Err> { + 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<Self, Self::Err> { + 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<Self, Self::Err> { + 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<Self, Self::Err> { + 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 c0129798aa6..034234f656c 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 27f96b0bef1..2166608b4ce 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 276349f7a0e..bb43f7aab92 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 44e1e29d741..164cd1500d6 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 44e1e29d741..164cd1500d6 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 16b3408f323..21f6f266a31 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 16b3408f323..21f6f266a31 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 44e1e29d741..164cd1500d6 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 16b3408f323..21f6f266a31 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 44e1e29d741..164cd1500d6 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 44e1e29d741..164cd1500d6 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 f6f5c60294f..333eb07e0c2 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 44e1e29d741..164cd1500d6 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 bf1af7c2e70..a93408ddf18 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 44e1e29d741..164cd1500d6 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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"); -- GitLab From 2cb7acd6c1c82a368f23206739dd33324d185402 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 85bfb5b5d02..c6b9fb5f4bc 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 66114165a03..bc016e48361 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 48cef4ce53c..e12c6b01217 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|true| |library|library template (sub-template) to use|<dl><dt>**volley**</dt><dd>HTTP client: Volley 1.0.19 (default)</dd><dt>**httpclient**</dt><dd>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.</dd></dl>|null| |modelPackage|package for generated models| |null| diff --git a/docs/generators/apache2.md b/docs/generators/apache2.md index d097e39d84a..7a5585fb7aa 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 9ead87c94e9..ebcf3c22cfd 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 01683b0a323..814bc0d401f 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 da33df52001..0705b3a9940 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 724e3d9a470..b8c03a992d3 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 80e50635f4c..0f6d97ec204 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 f2a755332bf..b6d76ced872 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 8e2bf7ab98b..dd69dc5103f 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 9e2f0e75e5c..3ea9cbee65e 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 dd887f70478..556952ea68e 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 2804a1bb2b8..bff265cbbcc 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 5bab2b35a21..11ae81bd03c 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|<dl><dt>**core**</dt><dd>Dart core library (DateTime)</dd><dt>**timemachine**</dt><dd>Time Machine is date and time library for Flutter, Web, and Server with support for timezones, calendars, cultures, formatting and parsing.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 a23282c5095..ba951a1a77d 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 b6ff9ba8eef..36ce04b65c3 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 9766b76b426..904d6718683 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 c13f447d0c8..627d9debcf8 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 07b7aa3ded2..314ffaa5541 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 d5efbbd4ba4..c6f3b79860f 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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 a1ecfc5a4b0..c023a6823d8 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 1fef8d922d2..1c0046c2c6a 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 b5603e1888a..ea8e8ae0dcb 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 6641bcfa3e4..08f3d27526a 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 240a6bb85e2..3531aa17cde 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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 2a7c7484227..4eae70a3f83 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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|true| |library|library template (sub-template)|<dl><dt>**jersey1**</dt><dd>Jersey core 1.x</dd><dt>**jersey2**</dt><dd>Jersey core 2.x</dd></dl>|jersey2| |licenseName|The name of the license| |Unlicense| diff --git a/docs/generators/java-pkmst.md b/docs/generators/java-pkmst.md index 360cecdad37..aafda3a1ff9 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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 db5a6cce52d..9717875c6f4 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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 2975825ef19..8ef69f09438 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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 96c7193b288..7f191c70225 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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 626eca2911f..503ad340236 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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 716c1beb9b5..d62d14394da 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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|true| |library|library template (sub-template) to use|<dl><dt>**jersey1**</dt><dd>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.</dd><dt>**jersey2**</dt><dd>HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x</dd><dt>**feign**</dt><dd>HTTP client: OpenFeign 9.x (deprecated) or 10.x (default). JSON processing: Jackson 2.9.x.</dd><dt>**okhttp-gson**</dt><dd>[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'.</dd><dt>**retrofit**</dt><dd>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.</dd><dt>**retrofit2**</dt><dd>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)</dd><dt>**resttemplate**</dt><dd>HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x</dd><dt>**webclient**</dt><dd>HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x</dd><dt>**resteasy**</dt><dd>HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.9.x</dd><dt>**vertx**</dt><dd>HTTP client: VertX client 3.x. JSON processing: Jackson 2.9.x</dd><dt>**google-api-client**</dt><dd>HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x</dd><dt>**rest-assured**</dt><dd>HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.10.x. Only for Java 8</dd><dt>**native**</dt><dd>HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+</dd><dt>**microprofile**</dt><dd>HTTP client: Microprofile client X.x. JSON processing: Jackson 2.9.x</dd></dl>|okhttp-gson| |licenseName|The name of the license| |Unlicense| diff --git a/docs/generators/javascript-apollo.md b/docs/generators/javascript-apollo.md index ca26bb0c061..86074ce7da8 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 e870e567eac..b4c622a62ca 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 8c7f5973aa7..993f6188b69 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 49dabe82ea2..07ea5e6abab 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 d42714ad38e..77230221482 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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|true| |library|library template (sub-template)|<dl><dt>**<default>**</dt><dd>JAXRS spec only, to be deployed in an app server (TomEE, JBoss, WLS, ...)</dd><dt>**quarkus**</dt><dd>Server using Quarkus</dd><dt>**thorntail**</dt><dd>Server using Thorntail</dd><dt>**openliberty**</dt><dd>Server using Open Liberty</dd><dt>**helidon**</dt><dd>Server using Helidon</dd></dl>|<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 cea106975e6..fc9e828b4c1 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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 b514e1d4b0f..5297b836979 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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 b65f8d844bc..bab82049365 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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 9618f052ab6..3886f2c5005 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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|true| |library|library template (sub-template)|<dl><dt>**jersey1**</dt><dd>Jersey core 1.x</dd><dt>**jersey2**</dt><dd>Jersey core 2.x</dd></dl>|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 8961c6da03d..acb98c4d496 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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 bcff6b2d13a..4fab9c31c06 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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 3deb5c4260a..37fad5b3419 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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|true| |library|library template (sub-template)|<dl><dt>**<default>**</dt><dd>JAXRS spec only, to be deployed in an app server (TomEE, JBoss, WLS, ...)</dd><dt>**quarkus**</dt><dd>Server using Quarkus</dd><dt>**thorntail**</dt><dd>Server using Thorntail</dd><dt>**openliberty**</dt><dd>Server using Open Liberty</dd><dt>**helidon**</dt><dd>Server using Helidon</dd></dl>|<default>| |licenseName|The name of the license| |Unlicense| diff --git a/docs/generators/jmeter.md b/docs/generators/jmeter.md index 16825e5dee4..4f9bbde97d0 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 7d2b09f46eb..f95db7ddcd1 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 fef2cddc340..6a2ea809212 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 5b72fb3575a..ce12410444c 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 5ded08347aa..c7fcd09b4e0 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 981b7b9fffe..22fea94fb8f 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 403a8eff9e7..c6a462b0234 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 3fde0dfd3bb..ffed6c525f5 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 fe7fe0cfa50..b832185c0d4 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 f6447b33d5c..a88e08abec2 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 33efe2cc794..89b4d57f79a 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 df20864fb93..b1550056cfe 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 d97ebb8060d..fa494ab05a1 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 ff5ee683ab1..03c119d6383 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 1c781a04c97..606ae0319e8 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 b6852f1087d..24643714ec6 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 329969e42fd..f65f48fc83c 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 9f64e821834..125b735465c 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 522e75b3866..466973fce5e 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 2192715c985..c7453a01d75 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 8a230e5fbad..7176801fd51 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 72dc31253a7..3c6947590aa 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|true| |library|HTTP library template (sub-template) to use|<dl><dt>**faraday**</dt><dd>Faraday (https://github.com/lostisland/faraday) (Beta support)</dd><dt>**typhoeus**</dt><dd>Typhoeus >= 1.0.1 (https://github.com/typhoeus/typhoeus)</dd></dl>|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 ce885201ee9..52927c770d8 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 0faa17e202b..4602c0c26d4 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|<dl><dt>**joda**</dt><dd>Joda (for legacy app)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (prefered for JDK 1.8+)</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 3a957c1cb09..c560ed6ea23 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|<dl><dt>**joda**</dt><dd>Joda (for legacy app)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (prefered for JDK 1.8+)</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 0a4015fbac0..4e240dae2c6 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|<dl><dt>**joda**</dt><dd>Joda (for legacy app)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (prefered for JDK 1.8+)</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 cef8bf855c0..35cef23ee31 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|<dl><dt>**joda**</dt><dd>Joda (for legacy app)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (prefered for JDK 1.8+)</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 dea0eb49248..3977d6e99e6 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 27a8b862b10..5a1ad7eef67 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|<dl><dt>**joda**</dt><dd>Joda (for legacy app)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (prefered for JDK 1.8+)</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 39eb4dc8ca6..ab5e0a793f3 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|<dl><dt>**joda**</dt><dd>Joda (for legacy app)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (prefered for JDK 1.8+)</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 f8279d1df61..f219aedadf2 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|<dl><dt>**joda**</dt><dd>Joda (for legacy app)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (prefered for JDK 1.8+)</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 6116bd3f430..5594f656fad 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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64. Use java8 default interface when a responseWrapper is used</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|true| |library|library template (sub-template)|<dl><dt>**spring-boot**</dt><dd>Spring-boot Server application using the SpringFox integration.</dd><dt>**spring-mvc**</dt><dd>Spring-MVC Server application using the SpringFox integration.</dd><dt>**spring-cloud**</dt><dd>Spring-Cloud-Feign client with Spring-Boot auto-configured settings.</dd></dl>|spring-boot| |licenseName|The name of the license| |Unlicense| diff --git a/docs/generators/swift4-deprecated.md b/docs/generators/swift4-deprecated.md index a4da5435f68..e8ee511c67e 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 9b172cdf785..b319585d34e 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|true| |lenientTypeCast|Accept and cast values for simple types (string->bool, string->int, int->string)| |false| |library|Library template (sub-template) to use|<dl><dt>**urlsession**</dt><dd>[DEFAULT] HTTP client: URLSession</dd><dt>**alamofire**</dt><dd>HTTP client: Alamofire</dd></dl>|urlsession| diff --git a/docs/generators/typescript-angular.md b/docs/generators/typescript-angular.md index 9fbecda0707..4555b7eaa28 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 08a4bdad894..884f71bc529 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 55cc57522bb..472ea75eee8 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 896b46d3eb6..4ab127067eb 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 5fe6e898708..8d887cdb72a 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 a979fd102cb..cfc543d905e 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 5616ceb5862..709789df599 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 4462d0e3798..2a1e72c3856 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 15900a22a7d..e8bd1a3a648 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 e080a0761bd..a5e1c349aaf 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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| -- GitLab From ddbb667407e02e40064492b0947d8d6e68cec673 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 3cbe22bdfc9..9338581cbec 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 @@ public class DefaultCodegen implements CodegenConfig { // 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 class DefaultCodegen implements CodegenConfig { "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 41017200a94..ad4ed8f4a91 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 class PythonClientExperimentalCodegen extends PythonClientCodegen { 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 901bfaf7046..04863c63923 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 class BashClientOptionsProvider implements OptionsProvider { .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 368e1d5022e..16106c90390 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 class DartClientOptionsProvider implements OptionsProvider { .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 dc5f8cd783d..3696cebeda9 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 class DartDioClientOptionsProvider implements OptionsProvider { .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 95f186b27f2..a999090b445 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 class ElixirClientOptionsProvider implements OptionsProvider { .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 df39bc9b02c..08e610fa45d 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 class GoGinServerOptionsProvider implements OptionsProvider { .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 d56996c4d43..2c069426259 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 class GoServerOptionsProvider implements OptionsProvider { .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 8a7459228b7..861bf597b13 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 class HaskellServantOptionsProvider implements OptionsProvider { .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 0c61168604f..d57f9e18359 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 class PhpClientOptionsProvider implements OptionsProvider { .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 0bfe24f2fe3..741eaae6800 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 class PhpLumenServerOptionsProvider implements OptionsProvider { .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 3d68f10321a..46d76b43206 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 class PhpSilexServerOptionsProvider implements OptionsProvider { .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 f4bbb41abc5..c6bcd39d93e 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 class PhpSlim4ServerOptionsProvider implements OptionsProvider { .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 fe41ab8ef96..1787636b68d 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 class PhpSlimServerOptionsProvider implements OptionsProvider { .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 db3cc18e6a8..f697a9979b3 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 class RubyClientOptionsProvider implements OptionsProvider { .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 689ef6eebef..7aa11d3c6ab 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 class ScalaAkkaClientOptionsProvider implements OptionsProvider { .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 92efba318ed..a6dd4d31e5e 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 class ScalaHttpClientOptionsProvider implements OptionsProvider { .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 7f545974f20..43f9f2ca2d0 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 class Swift4OptionsProvider implements OptionsProvider { .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 826affdaba6..7fc4c343ebc 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 class Swift5OptionsProvider implements OptionsProvider { .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 d7ccf464f80..67cb7a16f19 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 class TypeScriptAngularClientOptionsProvider implements OptionsProvider { .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 c87ef629bc5..1bba3c1d2ea 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 class TypeScriptAngularJsClientOptionsProvider implements OptionsProvider .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 2d39d635a10..5ac421260cf 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 class TypeScriptAureliaClientOptionsProvider implements OptionsProvider { .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 97baf5fea7a..1907ebb3fdc 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 class TypeScriptFetchClientOptionsProvider implements OptionsProvider { .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 c74f404df38..fd212b8da67 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 class TypeScriptNodeClientOptionsProvider implements OptionsProvider { .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(); } -- GitLab From f12663a61616db4287e2151c47cec4148e274769 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 11d11a4e145..b76e6eaf957 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 class DefaultCodegenTest { @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 00000000000..7f990bf0fa7 --- /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 7f990bf0fa7..e21b8fb7d25 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 636f81711d5..97a5ebe3fd0 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 1691c330890..a035ff98c8f 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 cc9d1e8167b..046e91b9075 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 aebe8a8917a..f8877ba452e 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 019d1418dfb..e35f2cca9ab 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 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } - 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 aebe8a8917a..f8877ba452e 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 694d9208051..781d4686e98 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 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } - 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 aebe8a8917a..f8877ba452e 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 ae396ec513c..ffab911c1be 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 694d9208051..781d4686e98 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 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } - 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 aebe8a8917a..f8877ba452e 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 ae396ec513c..ffab911c1be 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 694d9208051..781d4686e98 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 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } - 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 aebe8a8917a..f8877ba452e 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 ae396ec513c..ffab911c1be 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 e18e379ebb3..58772627a0d 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } - 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 aebe8a8917a..f8877ba452e 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 ae396ec513c..ffab911c1be 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 694d9208051..781d4686e98 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 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } - 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 aebe8a8917a..f8877ba452e 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 ae396ec513c..ffab911c1be 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 0ced388db4e..fa85ab77596 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 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } - 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 aebe8a8917a..f8877ba452e 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 ae396ec513c..ffab911c1be 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 0ced388db4e..fa85ab77596 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 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } - 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 aebe8a8917a..f8877ba452e 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 fdc052d56b5..70d8b5839fa 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 d3d7bc37970..4d1400b1d91 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass implements Parcelable { } - 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 class AdditionalPropertiesClass implements Parcelable { 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 class AdditionalPropertiesClass implements Parcelable { @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 class AdditionalPropertiesClass implements Parcelable { 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 class AdditionalPropertiesClass implements Parcelable { 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 class AdditionalPropertiesClass implements Parcelable { mapArrayAnytype = (Map<String, List<Object>>)in.readValue(List.class.getClassLoader()); mapMapString = (Map<String, Map<String, String>>)in.readValue(Map.class.getClassLoader()); mapMapAnytype = (Map<String, Map<String, Object>>)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 aebe8a8917a..f8877ba452e 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 ae396ec513c..ffab911c1be 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 383a75e58c7..a067b01ec97 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } - 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 aebe8a8917a..f8877ba452e 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 ae396ec513c..ffab911c1be 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 8fa80fa4531..803715a970f 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 @@ import org.hibernate.validator.constraints.*; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } - 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 38091db3bd3..2e3844ba975 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 class AdditionalPropertiesClassTest { // 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 aebe8a8917a..f8877ba452e 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 ae396ec513c..ffab911c1be 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 7864d47805f..a72f9a9889e 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } - 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 aebe8a8917a..f8877ba452e 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 ae396ec513c..ffab911c1be 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 694d9208051..781d4686e98 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 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } - 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 aebe8a8917a..f8877ba452e 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 ae396ec513c..ffab911c1be 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 c816033dfd0..c8b96f0db2d 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 @@ import javax.xml.bind.annotation.*; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } - 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 aebe8a8917a..f8877ba452e 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 ae396ec513c..ffab911c1be 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 694d9208051..781d4686e98 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 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } - 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 aebe8a8917a..f8877ba452e 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 383a75e58c7..a067b01ec97 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } - 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 aebe8a8917a..f8877ba452e 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 ae396ec513c..ffab911c1be 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 55852c49543..294c05c7334 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 @@ import javax.validation.Valid; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } - 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 aebe8a8917a..f8877ba452e 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 ae396ec513c..ffab911c1be 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 55852c49543..294c05c7334 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 @@ import javax.validation.Valid; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } - 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 aebe8a8917a..f8877ba452e 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 ae396ec513c..ffab911c1be 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 55852c49543..294c05c7334 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 @@ import javax.validation.Valid; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } - 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 aebe8a8917a..f8877ba452e 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 ae396ec513c..ffab911c1be 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 383a75e58c7..a067b01ec97 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } - 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 aebe8a8917a..f8877ba452e 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 ae396ec513c..ffab911c1be 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 383a75e58c7..a067b01ec97 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } - 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 aebe8a8917a..f8877ba452e 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 ae396ec513c..ffab911c1be 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 383a75e58c7..a067b01ec97 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } - 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 aebe8a8917a..f8877ba452e 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 ae396ec513c..ffab911c1be 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 0ced388db4e..fa85ab77596 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 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } - 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 aebe8a8917a..f8877ba452e 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 ae396ec513c..ffab911c1be 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 0ced388db4e..fa85ab77596 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 @@ import com.fasterxml.jackson.annotation.JsonPropertyOrder; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { } - 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 dfbdf4d07dd..386fa6e594d 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" -- GitLab From 88dd98fe22117a8787365e3eb5b156641f7dad18 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 211621aa76d..a878436c1a1 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 2f024e8fe0e..f388c3a4d1d 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 237015ce841..fc9b2c66e81 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 d4d80409107..b063cb41986 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 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess '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 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess '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 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess '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 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess $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 @@ class AdditionalPropertiesClass implements ModelInterface, ArrayAccess 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 5b922ddbabb..d71078b0c21 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 @@ class AdditionalPropertiesClassTest extends TestCase { } - /** - * Test attribute "map_with_additional_properties" - */ - public function testPropertyMapWithAdditionalProperties() - { - } - - /** - * Test attribute "map_without_additional_properties" - */ - public function testPropertyMapWithoutAdditionalProperties() - { - } - /** * Test attribute "anytype_1" */ -- GitLab From 782bdf6ccbaf835d003ed30e12c97c25a4e250d8 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 4b2311590cc..12f3292db0b 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 7f971ad070a..8a4e6b78b30 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 @@ namespace Org.OpenAPITools.Model /// <param name="mapArrayAnytype">mapArrayAnytype.</param> /// <param name="mapMapString">mapMapString.</param> /// <param name="mapMapAnytype">mapMapAnytype.</param> - /// <param name="mapWithAdditionalProperties">mapWithAdditionalProperties.</param> - /// <param name="mapWithoutAdditionalProperties">mapWithoutAdditionalProperties.</param> /// <param name="anytype1">anytype1.</param> /// <param name="anytype2">anytype2.</param> /// <param name="anytype3">anytype3.</param> - public AdditionalPropertiesClass(Dictionary<string, string> mapString = default(Dictionary<string, string>), Dictionary<string, decimal> mapNumber = default(Dictionary<string, decimal>), Dictionary<string, int> mapInteger = default(Dictionary<string, int>), Dictionary<string, bool> mapBoolean = default(Dictionary<string, bool>), Dictionary<string, List<int>> mapArrayInteger = default(Dictionary<string, List<int>>), Dictionary<string, List<Object>> mapArrayAnytype = default(Dictionary<string, List<Object>>), Dictionary<string, Dictionary<string, string>> mapMapString = default(Dictionary<string, Dictionary<string, string>>), Dictionary<string, Dictionary<string, Object>> mapMapAnytype = default(Dictionary<string, Dictionary<string, Object>>), Object mapWithAdditionalProperties = default(Object), Object mapWithoutAdditionalProperties = default(Object), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) + public AdditionalPropertiesClass(Dictionary<string, string> mapString = default(Dictionary<string, string>), Dictionary<string, decimal> mapNumber = default(Dictionary<string, decimal>), Dictionary<string, int> mapInteger = default(Dictionary<string, int>), Dictionary<string, bool> mapBoolean = default(Dictionary<string, bool>), Dictionary<string, List<int>> mapArrayInteger = default(Dictionary<string, List<int>>), Dictionary<string, List<Object>> mapArrayAnytype = default(Dictionary<string, List<Object>>), Dictionary<string, Dictionary<string, string>> mapMapString = default(Dictionary<string, Dictionary<string, string>>), Dictionary<string, Dictionary<string, Object>> mapMapAnytype = default(Dictionary<string, Dictionary<string, Object>>), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) { this.MapString = mapString; this.MapNumber = mapNumber; @@ -56,8 +54,6 @@ namespace Org.OpenAPITools.Model this.MapArrayAnytype = mapArrayAnytype; this.MapMapString = mapMapString; this.MapMapAnytype = mapMapAnytype; - this.MapWithAdditionalProperties = mapWithAdditionalProperties; - this.MapWithoutAdditionalProperties = mapWithoutAdditionalProperties; this.Anytype1 = anytype1; this.Anytype2 = anytype2; this.Anytype3 = anytype3; @@ -111,18 +107,6 @@ namespace Org.OpenAPITools.Model [DataMember(Name="map_map_anytype", EmitDefaultValue=false)] public Dictionary<string, Dictionary<string, Object>> MapMapAnytype { get; set; } - /// <summary> - /// Gets or Sets MapWithAdditionalProperties - /// </summary> - [DataMember(Name="map_with_additional_properties", EmitDefaultValue=false)] - public Object MapWithAdditionalProperties { get; set; } - - /// <summary> - /// Gets or Sets MapWithoutAdditionalProperties - /// </summary> - [DataMember(Name="map_without_additional_properties", EmitDefaultValue=false)] - public Object MapWithoutAdditionalProperties { get; set; } - /// <summary> /// Gets or Sets Anytype1 /// </summary> @@ -157,8 +141,6 @@ namespace Org.OpenAPITools.Model 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 @@ namespace Org.OpenAPITools.Model 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 @@ namespace Org.OpenAPITools.Model 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 4b2311590cc..12f3292db0b 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 c9efb170ac4..d56cf173ddf 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 @@ namespace Org.OpenAPITools.Model /// <param name="mapArrayAnytype">mapArrayAnytype.</param> /// <param name="mapMapString">mapMapString.</param> /// <param name="mapMapAnytype">mapMapAnytype.</param> - /// <param name="mapWithAdditionalProperties">mapWithAdditionalProperties.</param> - /// <param name="mapWithoutAdditionalProperties">mapWithoutAdditionalProperties.</param> /// <param name="anytype1">anytype1.</param> /// <param name="anytype2">anytype2.</param> /// <param name="anytype3">anytype3.</param> - public AdditionalPropertiesClass(Dictionary<string, string> mapString = default(Dictionary<string, string>), Dictionary<string, decimal> mapNumber = default(Dictionary<string, decimal>), Dictionary<string, int> mapInteger = default(Dictionary<string, int>), Dictionary<string, bool> mapBoolean = default(Dictionary<string, bool>), Dictionary<string, List<int>> mapArrayInteger = default(Dictionary<string, List<int>>), Dictionary<string, List<Object>> mapArrayAnytype = default(Dictionary<string, List<Object>>), Dictionary<string, Dictionary<string, string>> mapMapString = default(Dictionary<string, Dictionary<string, string>>), Dictionary<string, Dictionary<string, Object>> mapMapAnytype = default(Dictionary<string, Dictionary<string, Object>>), Object mapWithAdditionalProperties = default(Object), Object mapWithoutAdditionalProperties = default(Object), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) + public AdditionalPropertiesClass(Dictionary<string, string> mapString = default(Dictionary<string, string>), Dictionary<string, decimal> mapNumber = default(Dictionary<string, decimal>), Dictionary<string, int> mapInteger = default(Dictionary<string, int>), Dictionary<string, bool> mapBoolean = default(Dictionary<string, bool>), Dictionary<string, List<int>> mapArrayInteger = default(Dictionary<string, List<int>>), Dictionary<string, List<Object>> mapArrayAnytype = default(Dictionary<string, List<Object>>), Dictionary<string, Dictionary<string, string>> mapMapString = default(Dictionary<string, Dictionary<string, string>>), Dictionary<string, Dictionary<string, Object>> mapMapAnytype = default(Dictionary<string, Dictionary<string, Object>>), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) { this.MapString = mapString; this.MapNumber = mapNumber; @@ -56,8 +54,6 @@ namespace Org.OpenAPITools.Model this.MapArrayAnytype = mapArrayAnytype; this.MapMapString = mapMapString; this.MapMapAnytype = mapMapAnytype; - this.MapWithAdditionalProperties = mapWithAdditionalProperties; - this.MapWithoutAdditionalProperties = mapWithoutAdditionalProperties; this.Anytype1 = anytype1; this.Anytype2 = anytype2; this.Anytype3 = anytype3; @@ -111,18 +107,6 @@ namespace Org.OpenAPITools.Model [DataMember(Name="map_map_anytype", EmitDefaultValue=false)] public Dictionary<string, Dictionary<string, Object>> MapMapAnytype { get; set; } - /// <summary> - /// Gets or Sets MapWithAdditionalProperties - /// </summary> - [DataMember(Name="map_with_additional_properties", EmitDefaultValue=false)] - public Object MapWithAdditionalProperties { get; set; } - - /// <summary> - /// Gets or Sets MapWithoutAdditionalProperties - /// </summary> - [DataMember(Name="map_without_additional_properties", EmitDefaultValue=false)] - public Object MapWithoutAdditionalProperties { get; set; } - /// <summary> /// Gets or Sets Anytype1 /// </summary> @@ -157,8 +141,6 @@ namespace Org.OpenAPITools.Model 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 @@ namespace Org.OpenAPITools.Model 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 @@ namespace Org.OpenAPITools.Model 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 4b2311590cc..12f3292db0b 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 7f971ad070a..8a4e6b78b30 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 @@ namespace Org.OpenAPITools.Model /// <param name="mapArrayAnytype">mapArrayAnytype.</param> /// <param name="mapMapString">mapMapString.</param> /// <param name="mapMapAnytype">mapMapAnytype.</param> - /// <param name="mapWithAdditionalProperties">mapWithAdditionalProperties.</param> - /// <param name="mapWithoutAdditionalProperties">mapWithoutAdditionalProperties.</param> /// <param name="anytype1">anytype1.</param> /// <param name="anytype2">anytype2.</param> /// <param name="anytype3">anytype3.</param> - public AdditionalPropertiesClass(Dictionary<string, string> mapString = default(Dictionary<string, string>), Dictionary<string, decimal> mapNumber = default(Dictionary<string, decimal>), Dictionary<string, int> mapInteger = default(Dictionary<string, int>), Dictionary<string, bool> mapBoolean = default(Dictionary<string, bool>), Dictionary<string, List<int>> mapArrayInteger = default(Dictionary<string, List<int>>), Dictionary<string, List<Object>> mapArrayAnytype = default(Dictionary<string, List<Object>>), Dictionary<string, Dictionary<string, string>> mapMapString = default(Dictionary<string, Dictionary<string, string>>), Dictionary<string, Dictionary<string, Object>> mapMapAnytype = default(Dictionary<string, Dictionary<string, Object>>), Object mapWithAdditionalProperties = default(Object), Object mapWithoutAdditionalProperties = default(Object), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) + public AdditionalPropertiesClass(Dictionary<string, string> mapString = default(Dictionary<string, string>), Dictionary<string, decimal> mapNumber = default(Dictionary<string, decimal>), Dictionary<string, int> mapInteger = default(Dictionary<string, int>), Dictionary<string, bool> mapBoolean = default(Dictionary<string, bool>), Dictionary<string, List<int>> mapArrayInteger = default(Dictionary<string, List<int>>), Dictionary<string, List<Object>> mapArrayAnytype = default(Dictionary<string, List<Object>>), Dictionary<string, Dictionary<string, string>> mapMapString = default(Dictionary<string, Dictionary<string, string>>), Dictionary<string, Dictionary<string, Object>> mapMapAnytype = default(Dictionary<string, Dictionary<string, Object>>), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) { this.MapString = mapString; this.MapNumber = mapNumber; @@ -56,8 +54,6 @@ namespace Org.OpenAPITools.Model this.MapArrayAnytype = mapArrayAnytype; this.MapMapString = mapMapString; this.MapMapAnytype = mapMapAnytype; - this.MapWithAdditionalProperties = mapWithAdditionalProperties; - this.MapWithoutAdditionalProperties = mapWithoutAdditionalProperties; this.Anytype1 = anytype1; this.Anytype2 = anytype2; this.Anytype3 = anytype3; @@ -111,18 +107,6 @@ namespace Org.OpenAPITools.Model [DataMember(Name="map_map_anytype", EmitDefaultValue=false)] public Dictionary<string, Dictionary<string, Object>> MapMapAnytype { get; set; } - /// <summary> - /// Gets or Sets MapWithAdditionalProperties - /// </summary> - [DataMember(Name="map_with_additional_properties", EmitDefaultValue=false)] - public Object MapWithAdditionalProperties { get; set; } - - /// <summary> - /// Gets or Sets MapWithoutAdditionalProperties - /// </summary> - [DataMember(Name="map_without_additional_properties", EmitDefaultValue=false)] - public Object MapWithoutAdditionalProperties { get; set; } - /// <summary> /// Gets or Sets Anytype1 /// </summary> @@ -157,8 +141,6 @@ namespace Org.OpenAPITools.Model 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 @@ namespace Org.OpenAPITools.Model 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 @@ namespace Org.OpenAPITools.Model 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 4b2311590cc..12f3292db0b 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 ccd3f80fda9..f56db9cd165 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 @@ namespace Org.OpenAPITools.Model /// <param name="mapArrayAnytype">mapArrayAnytype.</param> /// <param name="mapMapString">mapMapString.</param> /// <param name="mapMapAnytype">mapMapAnytype.</param> - /// <param name="mapWithAdditionalProperties">mapWithAdditionalProperties.</param> - /// <param name="mapWithoutAdditionalProperties">mapWithoutAdditionalProperties.</param> /// <param name="anytype1">anytype1.</param> /// <param name="anytype2">anytype2.</param> /// <param name="anytype3">anytype3.</param> - public AdditionalPropertiesClass(Dictionary<string, string> mapString = default(Dictionary<string, string>), Dictionary<string, decimal> mapNumber = default(Dictionary<string, decimal>), Dictionary<string, int> mapInteger = default(Dictionary<string, int>), Dictionary<string, bool> mapBoolean = default(Dictionary<string, bool>), Dictionary<string, List<int>> mapArrayInteger = default(Dictionary<string, List<int>>), Dictionary<string, List<Object>> mapArrayAnytype = default(Dictionary<string, List<Object>>), Dictionary<string, Dictionary<string, string>> mapMapString = default(Dictionary<string, Dictionary<string, string>>), Dictionary<string, Dictionary<string, Object>> mapMapAnytype = default(Dictionary<string, Dictionary<string, Object>>), Object mapWithAdditionalProperties = default(Object), Object mapWithoutAdditionalProperties = default(Object), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) + public AdditionalPropertiesClass(Dictionary<string, string> mapString = default(Dictionary<string, string>), Dictionary<string, decimal> mapNumber = default(Dictionary<string, decimal>), Dictionary<string, int> mapInteger = default(Dictionary<string, int>), Dictionary<string, bool> mapBoolean = default(Dictionary<string, bool>), Dictionary<string, List<int>> mapArrayInteger = default(Dictionary<string, List<int>>), Dictionary<string, List<Object>> mapArrayAnytype = default(Dictionary<string, List<Object>>), Dictionary<string, Dictionary<string, string>> mapMapString = default(Dictionary<string, Dictionary<string, string>>), Dictionary<string, Dictionary<string, Object>> mapMapAnytype = default(Dictionary<string, Dictionary<string, Object>>), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) { this.MapString = mapString; this.MapNumber = mapNumber; @@ -54,8 +52,6 @@ namespace Org.OpenAPITools.Model this.MapArrayAnytype = mapArrayAnytype; this.MapMapString = mapMapString; this.MapMapAnytype = mapMapAnytype; - this.MapWithAdditionalProperties = mapWithAdditionalProperties; - this.MapWithoutAdditionalProperties = mapWithoutAdditionalProperties; this.Anytype1 = anytype1; this.Anytype2 = anytype2; this.Anytype3 = anytype3; @@ -109,18 +105,6 @@ namespace Org.OpenAPITools.Model [DataMember(Name="map_map_anytype", EmitDefaultValue=false)] public Dictionary<string, Dictionary<string, Object>> MapMapAnytype { get; set; } - /// <summary> - /// Gets or Sets MapWithAdditionalProperties - /// </summary> - [DataMember(Name="map_with_additional_properties", EmitDefaultValue=false)] - public Object MapWithAdditionalProperties { get; set; } - - /// <summary> - /// Gets or Sets MapWithoutAdditionalProperties - /// </summary> - [DataMember(Name="map_without_additional_properties", EmitDefaultValue=false)] - public Object MapWithoutAdditionalProperties { get; set; } - /// <summary> /// Gets or Sets Anytype1 /// </summary> @@ -155,8 +139,6 @@ namespace Org.OpenAPITools.Model 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 @@ namespace Org.OpenAPITools.Model 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 @@ namespace Org.OpenAPITools.Model 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 4b2311590cc..12f3292db0b 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 7b53578ded3..53e2fbc1d03 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 @@ namespace Org.OpenAPITools.Model /// <param name="mapArrayAnytype">mapArrayAnytype.</param> /// <param name="mapMapString">mapMapString.</param> /// <param name="mapMapAnytype">mapMapAnytype.</param> - /// <param name="mapWithAdditionalProperties">mapWithAdditionalProperties.</param> - /// <param name="mapWithoutAdditionalProperties">mapWithoutAdditionalProperties.</param> /// <param name="anytype1">anytype1.</param> /// <param name="anytype2">anytype2.</param> /// <param name="anytype3">anytype3.</param> - public AdditionalPropertiesClass(Dictionary<string, string> mapString = default(Dictionary<string, string>), Dictionary<string, decimal> mapNumber = default(Dictionary<string, decimal>), Dictionary<string, int> mapInteger = default(Dictionary<string, int>), Dictionary<string, bool> mapBoolean = default(Dictionary<string, bool>), Dictionary<string, List<int>> mapArrayInteger = default(Dictionary<string, List<int>>), Dictionary<string, List<Object>> mapArrayAnytype = default(Dictionary<string, List<Object>>), Dictionary<string, Dictionary<string, string>> mapMapString = default(Dictionary<string, Dictionary<string, string>>), Dictionary<string, Dictionary<string, Object>> mapMapAnytype = default(Dictionary<string, Dictionary<string, Object>>), Object mapWithAdditionalProperties = default(Object), Object mapWithoutAdditionalProperties = default(Object), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) + public AdditionalPropertiesClass(Dictionary<string, string> mapString = default(Dictionary<string, string>), Dictionary<string, decimal> mapNumber = default(Dictionary<string, decimal>), Dictionary<string, int> mapInteger = default(Dictionary<string, int>), Dictionary<string, bool> mapBoolean = default(Dictionary<string, bool>), Dictionary<string, List<int>> mapArrayInteger = default(Dictionary<string, List<int>>), Dictionary<string, List<Object>> mapArrayAnytype = default(Dictionary<string, List<Object>>), Dictionary<string, Dictionary<string, string>> mapMapString = default(Dictionary<string, Dictionary<string, string>>), Dictionary<string, Dictionary<string, Object>> mapMapAnytype = default(Dictionary<string, Dictionary<string, Object>>), Object anytype1 = default(Object), Object anytype2 = default(Object), Object anytype3 = default(Object)) { this.MapString = mapString; this.MapNumber = mapNumber; @@ -59,8 +57,6 @@ namespace Org.OpenAPITools.Model this.MapArrayAnytype = mapArrayAnytype; this.MapMapString = mapMapString; this.MapMapAnytype = mapMapAnytype; - this.MapWithAdditionalProperties = mapWithAdditionalProperties; - this.MapWithoutAdditionalProperties = mapWithoutAdditionalProperties; this.Anytype1 = anytype1; this.Anytype2 = anytype2; this.Anytype3 = anytype3; @@ -114,18 +110,6 @@ namespace Org.OpenAPITools.Model [DataMember(Name="map_map_anytype", EmitDefaultValue=true)] public Dictionary<string, Dictionary<string, Object>> MapMapAnytype { get; set; } - /// <summary> - /// Gets or Sets MapWithAdditionalProperties - /// </summary> - [DataMember(Name="map_with_additional_properties", EmitDefaultValue=true)] - public Object MapWithAdditionalProperties { get; set; } - - /// <summary> - /// Gets or Sets MapWithoutAdditionalProperties - /// </summary> - [DataMember(Name="map_without_additional_properties", EmitDefaultValue=true)] - public Object MapWithoutAdditionalProperties { get; set; } - /// <summary> /// Gets or Sets Anytype1 /// </summary> @@ -160,8 +144,6 @@ namespace Org.OpenAPITools.Model 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 @@ namespace Org.OpenAPITools.Model 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 @@ namespace Org.OpenAPITools.Model 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 200a6c4be30..08d6d28d82d 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 636f81711d5..97a5ebe3fd0 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 54a41452ee8..0dd3f328f41 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 9636d9f1b2e..35aafa9f602 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 d67cc938740..1331ed4b237 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 0cf20648375..32c3b215980 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 636f81711d5..97a5ebe3fd0 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 33e2143e22c..bb674c55b3a 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 0c61c209957..13732e479c9 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 0c61c209957..13732e479c9 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" -- GitLab From 58d38c25cc839ee94526a3bc4b4047bf2b0951b0 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 dde6ecc444f..32b480d464d 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 dde6ecc444f..32b480d464d 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 dde6ecc444f..32b480d464d 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 3e48a58493d..5fbc69ab84f 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 39480011bc4..334631c11d6 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 dde6ecc444f..32b480d464d 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 dde6ecc444f..32b480d464d 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 dde6ecc444f..32b480d464d 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 dde6ecc444f..32b480d464d 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 dde6ecc444f..32b480d464d 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 -- GitLab From 4be1ef93ab1ac26f722500b210ddd34a4395db8a Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 915bfabaa8e..353033010b2 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 1495d8523ac..ff8841189f7 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 @@ module Petstore 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 @@ module Petstore :'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 @@ module Petstore :'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' @@ -147,14 +139,6 @@ module Petstore 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 @@ module Petstore 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 @@ module Petstore # 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 915bfabaa8e..353033010b2 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 1495d8523ac..ff8841189f7 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 @@ module Petstore 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 @@ module Petstore :'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 @@ module Petstore :'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' @@ -147,14 +139,6 @@ module Petstore 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 @@ module Petstore 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 @@ module Petstore # 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 ff252ca8af4..ee65b12fcc1 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 @@ describe 'AdditionalPropertiesClass' do 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 d168f1d8bda..d99e7162d01 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 fbf324f2d19..27e270c494e 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 @@ class InitTables < ActiveRecord::Migration 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 d168f1d8bda..d99e7162d01 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 2a48cecf82b..13732e479c9 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" -- GitLab From 9fd0685dc0ec5c2d1c138bf6eec08c9ae450813a Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 af7148414b9..952fa7afadf 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 58592f031f6..d99e7162d01 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 06a1bb8d469..952fa7afadf 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 94b55953254..fb3c3346a36 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 78261ede612..a221fb052d2 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 04b2a9ba9aa..71fbac70d50 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 58592f031f6..d99e7162d01 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 06a1bb8d469..952fa7afadf 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 17107d021c5..05b4a1a6c15 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 78261ede612..a221fb052d2 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 04b2a9ba9aa..71fbac70d50 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 4d05d282f98..c45b80df363 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, -- GitLab From ac278121f25798eb7a6976e488c3a9c3ff04804f Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 db6c931339d..fded4a05766 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 class CodegenConstants { 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 9338581cbec..72ddd5d5b92 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 @@ public class DefaultCodegen implements CodegenConfig { // 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 class DefaultCodegen implements CodegenConfig { 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 class DefaultCodegen implements CodegenConfig { 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 class DefaultCodegen implements CodegenConfig { 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 class DefaultCodegen implements CodegenConfig { 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<String, String> 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<String, String> 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 ad4ed8f4a91..d7850b60996 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 class PythonClientExperimentalCodegen extends PythonClientCodegen { 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 3d3e30754d3..986bd9689d5 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 class ModelUtils { 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<String, Object> 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 class ModelUtils { // 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 class ModelUtils { /** * 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. + * and set the ${EXTENSION_OPENAPI_DOC_VERSION} with the original version. * * @param openapi the OpenAPI document. * @param location the URL of the OAS document. @@ -1534,6 +1536,6 @@ public class ModelUtils { */ public static void addOpenApiVersionExtension(OpenAPI openapi, String location, List<AuthorizationValue> 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 b76e6eaf957..3ea926263fc 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 class DefaultCodegenTest { 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 class DefaultCodegenTest { 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 class DefaultCodegenTest { 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 04863c63923..2a4564db2b9 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 class BashClientOptionsProvider implements OptionsProvider { .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 16106c90390..ef59bc8c812 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 class DartClientOptionsProvider implements OptionsProvider { .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 3696cebeda9..6b63cbee5f8 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 class DartDioClientOptionsProvider implements OptionsProvider { .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 a999090b445..bd39161584f 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 class ElixirClientOptionsProvider implements OptionsProvider { .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 08e610fa45d..910f9441c18 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 class GoGinServerOptionsProvider implements OptionsProvider { .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 2c069426259..e445afd3fc2 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 class GoServerOptionsProvider implements OptionsProvider { .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 861bf597b13..728b44ef38f 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 class HaskellServantOptionsProvider implements OptionsProvider { .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 d57f9e18359..b2a987d924e 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 class PhpClientOptionsProvider implements OptionsProvider { .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 741eaae6800..25d34b16d80 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 class PhpLumenServerOptionsProvider implements OptionsProvider { .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 46d76b43206..b6c55c7a27b 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 class PhpSilexServerOptionsProvider implements OptionsProvider { .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 c6bcd39d93e..3295ed95101 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 class PhpSlim4ServerOptionsProvider implements OptionsProvider { .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 1787636b68d..4a40588c0eb 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 class PhpSlimServerOptionsProvider implements OptionsProvider { .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 f697a9979b3..9d5c63f9d2d 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 class RubyClientOptionsProvider implements OptionsProvider { .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 7aa11d3c6ab..62909fb5b3f 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 class ScalaAkkaClientOptionsProvider implements OptionsProvider { .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 a6dd4d31e5e..ac3c7f713c5 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 class ScalaHttpClientOptionsProvider implements OptionsProvider { .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 43f9f2ca2d0..038c40121d6 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 class Swift4OptionsProvider implements OptionsProvider { .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 7fc4c343ebc..e432b326d1c 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 class Swift5OptionsProvider implements OptionsProvider { .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 67cb7a16f19..7553e379e4f 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 class TypeScriptAngularClientOptionsProvider implements OptionsProvider { .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 1bba3c1d2ea..2c56e0c1268 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 class TypeScriptAngularJsClientOptionsProvider implements OptionsProvider .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 5ac421260cf..cae9790d8da 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 class TypeScriptAureliaClientOptionsProvider implements OptionsProvider { .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 1907ebb3fdc..1671fc5293c 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 class TypeScriptFetchClientOptionsProvider implements OptionsProvider { .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 fd212b8da67..0600f14838c 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 class TypeScriptNodeClientOptionsProvider implements OptionsProvider { .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(); } -- GitLab From d9518f1e814db5f72d7d764f198d99ae8ea69ef5 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 c6b9fb5f4bc..66d41103a77 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 bc016e48361..971e3267b2f 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 e12c6b01217..1d5b7fb158f 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|true| |library|library template (sub-template) to use|<dl><dt>**volley**</dt><dd>HTTP client: Volley 1.0.19 (default)</dd><dt>**httpclient**</dt><dd>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.</dd></dl>|null| |modelPackage|package for generated models| |null| diff --git a/docs/generators/apache2.md b/docs/generators/apache2.md index 7a5585fb7aa..3568754b316 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 ebcf3c22cfd..45d0d2a5123 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 814bc0d401f..ac2d3cca0b6 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 0705b3a9940..ba46bc6dc93 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 b8c03a992d3..ef7a409c2a7 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 0f6d97ec204..8d467ca2fd0 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 b6d76ced872..2c5039e4587 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 dd69dc5103f..bfda02a1d16 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 3ea9cbee65e..bbb1852e231 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 556952ea68e..5bc03d3fbab 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 bff265cbbcc..c0bb03f3930 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 11ae81bd03c..e1c1e26c7f1 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|<dl><dt>**core**</dt><dd>Dart core library (DateTime)</dd><dt>**timemachine**</dt><dd>Time Machine is date and time library for Flutter, Web, and Server with support for timezones, calendars, cultures, formatting and parsing.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 ba951a1a77d..5659caf8668 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 36ce04b65c3..c4ee6f36b2e 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 904d6718683..50ad9583c32 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 627d9debcf8..de82283e850 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 314ffaa5541..ec2f54a8cd7 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 c6f3b79860f..57a8c43179f 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 c023a6823d8..883ffd35f0e 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 1c0046c2c6a..bea5cef5a62 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 ea8e8ae0dcb..7d03a4b1591 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 08f3d27526a..1b3b2d572a9 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 3531aa17cde..3a2e7c2f091 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 4eae70a3f83..04497d2f1b7 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|true| |library|library template (sub-template)|<dl><dt>**jersey1**</dt><dd>Jersey core 1.x</dd><dt>**jersey2**</dt><dd>Jersey core 2.x</dd></dl>|jersey2| |licenseName|The name of the license| |Unlicense| diff --git a/docs/generators/java-pkmst.md b/docs/generators/java-pkmst.md index aafda3a1ff9..d0fb575d325 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 9717875c6f4..4a232777b65 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 8ef69f09438..1a28cc05e32 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 7f191c70225..3dcf9bbe923 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 503ad340236..3407e13eb9c 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 d62d14394da..3ed4738d851 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|true| |library|library template (sub-template) to use|<dl><dt>**jersey1**</dt><dd>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.</dd><dt>**jersey2**</dt><dd>HTTP client: Jersey client 2.25.1. JSON processing: Jackson 2.9.x</dd><dt>**feign**</dt><dd>HTTP client: OpenFeign 9.x (deprecated) or 10.x (default). JSON processing: Jackson 2.9.x.</dd><dt>**okhttp-gson**</dt><dd>[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'.</dd><dt>**retrofit**</dt><dd>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.</dd><dt>**retrofit2**</dt><dd>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)</dd><dt>**resttemplate**</dt><dd>HTTP client: Spring RestTemplate 4.x. JSON processing: Jackson 2.9.x</dd><dt>**webclient**</dt><dd>HTTP client: Spring WebClient 5.x. JSON processing: Jackson 2.9.x</dd><dt>**resteasy**</dt><dd>HTTP client: Resteasy client 3.x. JSON processing: Jackson 2.9.x</dd><dt>**vertx**</dt><dd>HTTP client: VertX client 3.x. JSON processing: Jackson 2.9.x</dd><dt>**google-api-client**</dt><dd>HTTP client: Google API client 1.x. JSON processing: Jackson 2.9.x</dd><dt>**rest-assured**</dt><dd>HTTP client: rest-assured : 4.x. JSON processing: Gson 2.x or Jackson 2.10.x. Only for Java 8</dd><dt>**native**</dt><dd>HTTP client: Java native HttpClient. JSON processing: Jackson 2.9.x. Only for Java11+</dd><dt>**microprofile**</dt><dd>HTTP client: Microprofile client X.x. JSON processing: Jackson 2.9.x</dd></dl>|okhttp-gson| |licenseName|The name of the license| |Unlicense| diff --git a/docs/generators/javascript-apollo.md b/docs/generators/javascript-apollo.md index 86074ce7da8..83a11b96146 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 b4c622a62ca..10eae6c4653 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 993f6188b69..50392d647cb 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 07ea5e6abab..302446484cb 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 77230221482..a57f84684b7 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|true| |library|library template (sub-template)|<dl><dt>**<default>**</dt><dd>JAXRS spec only, to be deployed in an app server (TomEE, JBoss, WLS, ...)</dd><dt>**quarkus**</dt><dd>Server using Quarkus</dd><dt>**thorntail**</dt><dd>Server using Thorntail</dd><dt>**openliberty**</dt><dd>Server using Open Liberty</dd><dt>**helidon**</dt><dd>Server using Helidon</dd></dl>|<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 fc9e828b4c1..02ab5b75e3f 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 5297b836979..9308414c7f0 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 bab82049365..2c09af412cf 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 3886f2c5005..196fdce0b36 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|true| |library|library template (sub-template)|<dl><dt>**jersey1**</dt><dd>Jersey core 1.x</dd><dt>**jersey2**</dt><dd>Jersey core 2.x</dd></dl>|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 acb98c4d496..121af777cbb 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 4fab9c31c06..c13dfd783ca 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 37fad5b3419..661807272d6 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|true| |library|library template (sub-template)|<dl><dt>**<default>**</dt><dd>JAXRS spec only, to be deployed in an app server (TomEE, JBoss, WLS, ...)</dd><dt>**quarkus**</dt><dd>Server using Quarkus</dd><dt>**thorntail**</dt><dd>Server using Thorntail</dd><dt>**openliberty**</dt><dd>Server using Open Liberty</dd><dt>**helidon**</dt><dd>Server using Helidon</dd></dl>|<default>| |licenseName|The name of the license| |Unlicense| diff --git a/docs/generators/jmeter.md b/docs/generators/jmeter.md index 4f9bbde97d0..7436946c530 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 f95db7ddcd1..eb69751e2c8 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 6a2ea809212..31cf13cdaf5 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 ce12410444c..0a0c5271873 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 c7fcd09b4e0..59f06146006 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 22fea94fb8f..98cb15a765b 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 c6a462b0234..d78989c9531 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 ffed6c525f5..315146f1e4c 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 b832185c0d4..961e1cc5c21 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 a88e08abec2..ff0f84ca971 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 89b4d57f79a..cb6ba9ab1d7 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 b1550056cfe..459e5111687 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 fa494ab05a1..834d7d17e87 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 03c119d6383..4bb03dc60e2 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 606ae0319e8..dd0faa80256 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 24643714ec6..2bd1e7f43df 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 f65f48fc83c..6d84ee3fbf4 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 125b735465c..00d8357ec4a 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 466973fce5e..a2eb340a005 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 c7453a01d75..fee549d0a32 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 7176801fd51..2d8bcf08ed4 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 3c6947590aa..a4808ee1af3 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|true| |library|HTTP library template (sub-template) to use|<dl><dt>**faraday**</dt><dd>Faraday (https://github.com/lostisland/faraday) (Beta support)</dd><dt>**typhoeus**</dt><dd>Typhoeus >= 1.0.1 (https://github.com/typhoeus/typhoeus)</dd></dl>|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 52927c770d8..96e31f09055 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|<dl><dt>**joda**</dt><dd>Joda (for legacy app)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (prefered for JDK 1.8+)</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 4602c0c26d4..2bad9c82b6a 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|<dl><dt>**joda**</dt><dd>Joda (for legacy app)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (prefered for JDK 1.8+)</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 c560ed6ea23..b59c37ee122 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|<dl><dt>**joda**</dt><dd>Joda (for legacy app)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (prefered for JDK 1.8+)</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 4e240dae2c6..e0d631f8645 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|<dl><dt>**joda**</dt><dd>Joda (for legacy app)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (prefered for JDK 1.8+)</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 35cef23ee31..2ed7519b665 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|<dl><dt>**joda**</dt><dd>Joda (for legacy app)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (prefered for JDK 1.8+)</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 3977d6e99e6..d46eb3a9fbe 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 5a1ad7eef67..05cbbe99dea 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|<dl><dt>**joda**</dt><dd>Joda (for legacy app)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (prefered for JDK 1.8+)</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 ab5e0a793f3..f9edf8f3875 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|<dl><dt>**joda**</dt><dd>Joda (for legacy app)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (prefered for JDK 1.8+)</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 f219aedadf2..1d62a3e5ff0 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|<dl><dt>**joda**</dt><dd>Joda (for legacy app)</dd><dt>**java8**</dt><dd>Java 8 native JSR310 (prefered for JDK 1.8+)</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 5594f656fad..e73e96717c2 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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|<dl><dt>**true**</dt><dd>Use Java 8 classes such as Base64. Use java8 default interface when a responseWrapper is used</dd><dt>**false**</dt><dd>Various third party libraries as needed</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|true| |library|library template (sub-template)|<dl><dt>**spring-boot**</dt><dd>Spring-boot Server application using the SpringFox integration.</dd><dt>**spring-mvc**</dt><dd>Spring-MVC Server application using the SpringFox integration.</dd><dt>**spring-cloud**</dt><dd>Spring-Cloud-Feign client with Spring-Boot auto-configured settings.</dd></dl>|spring-boot| |licenseName|The name of the license| |Unlicense| diff --git a/docs/generators/swift4-deprecated.md b/docs/generators/swift4-deprecated.md index e8ee511c67e..2ad3deb81c7 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 b319585d34e..53e8733dec2 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|true| |lenientTypeCast|Accept and cast values for simple types (string->bool, string->int, int->string)| |false| |library|Library template (sub-template) to use|<dl><dt>**urlsession**</dt><dd>[DEFAULT] HTTP client: URLSession</dd><dt>**alamofire**</dt><dd>HTTP client: Alamofire</dd></dl>|urlsession| diff --git a/docs/generators/typescript-angular.md b/docs/generators/typescript-angular.md index 4555b7eaa28..d963b13cba9 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 884f71bc529..bd9f87fdb25 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 472ea75eee8..3e39180156b 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 4ab127067eb..b2ab58b6adc 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 8d887cdb72a..037b7d01ca6 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 cfc543d905e..3788b8a67d5 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 709789df599..16460679ccd 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 2a1e72c3856..af0f5286f1b 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 e8bd1a3a648..8f35944f8b7 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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 a5e1c349aaf..41d58058a86 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|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| -- GitLab From 79e5ecf7edb7fa4eaf430577e5ef906e4a06c8b9 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 3456b2fc41e..38c1b56107b 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 class CodegenConfigurator { // TODO: Move custom validations to a separate type as part of a "Workflow" Set<String> 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); -- GitLab From 34740a1553e0dd3f9d10a0764641dff87bd0916c Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 d7850b60996..470849ce571 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 @@ import static org.openapitools.codegen.utils.StringUtils.underscore; 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 class PythonClientExperimentalCodegen extends PythonClientCodegen { for (Map<String, Object> 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<String> refModelNames = (List<String>) cm.vendorExtensions.get(referencedModelNamesExtension); if (refModelNames != null) { for (String refModelName : refModelNames) { -- GitLab From 598b0e489c516bd775a2585a9dc89a2ce0137ebc Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 97a5ebe3fd0..6de5c131c2e 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 97a5ebe3fd0..6de5c131c2e 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 636f81711d5..6de5c131c2e 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 54a41452ee8..0dd3f328f41 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 71be988998b..00ca7fb4406 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 386fa6e594d..a81f77cfde4 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" -- GitLab From 8d93337187059bf06ae66984aec7f47112b60957 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 986bd9689d5..d66947dc107 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 6de5c131c2e..7940eaa52ea 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 6de5c131c2e..7940eaa52ea 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 6de5c131c2e..7940eaa52ea 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 97a5ebe3fd0..7940eaa52ea 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 f8877ba452e..d86a7b959f9 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 f8877ba452e..d86a7b959f9 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 f8877ba452e..d86a7b959f9 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 f8877ba452e..d86a7b959f9 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 f8877ba452e..d86a7b959f9 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 f8877ba452e..d86a7b959f9 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 f8877ba452e..d86a7b959f9 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 f8877ba452e..d86a7b959f9 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 f8877ba452e..d86a7b959f9 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 f8877ba452e..d86a7b959f9 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 f8877ba452e..d86a7b959f9 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 f8877ba452e..d86a7b959f9 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 f8877ba452e..d86a7b959f9 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 f8877ba452e..d86a7b959f9 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 f8877ba452e..d86a7b959f9 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 f8877ba452e..d86a7b959f9 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 f8877ba452e..d86a7b959f9 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 f8877ba452e..d86a7b959f9 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 f8877ba452e..d86a7b959f9 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 f8877ba452e..d86a7b959f9 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 f8877ba452e..d86a7b959f9 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 f8877ba452e..d86a7b959f9 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 f8877ba452e..d86a7b959f9 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 f8877ba452e..d86a7b959f9 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 a81f77cfde4..cb59ab84d67 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 952fa7afadf..11635de3f45 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 952fa7afadf..11635de3f45 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 952fa7afadf..11635de3f45 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 13732e479c9..42549d93a8e 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 13732e479c9..42549d93a8e 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 32b480d464d..d67ec8330bd 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 32b480d464d..d67ec8330bd 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 32b480d464d..d67ec8330bd 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 334631c11d6..8780b4d4828 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 32b480d464d..d67ec8330bd 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 32b480d464d..d67ec8330bd 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 32b480d464d..d67ec8330bd 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 32b480d464d..d67ec8330bd 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 32b480d464d..d67ec8330bd 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 651625c5921..f2332eb2a60 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<String, List<Object>> mapArrayAnytype = new HashMap<String, List<Object>>(); private @Valid Map<String, Map<String, String>> mapMapString = new HashMap<String, Map<String, String>>(); private @Valid Map<String, Map<String, Object>> mapMapAnytype = new HashMap<String, Map<String, Object>>(); - 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 class AdditionalPropertiesClass implements Serializable { 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 class AdditionalPropertiesClass implements Serializable { 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 class AdditionalPropertiesClass implements Serializable { @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 class AdditionalPropertiesClass implements Serializable { 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 333eb07e0c2..a73c4ac72f9 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 651625c5921..f2332eb2a60 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<String, List<Object>> mapArrayAnytype = new HashMap<String, List<Object>>(); private @Valid Map<String, Map<String, String>> mapMapString = new HashMap<String, Map<String, String>>(); private @Valid Map<String, Map<String, Object>> mapMapAnytype = new HashMap<String, Map<String, Object>>(); - 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 class AdditionalPropertiesClass implements Serializable { 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 class AdditionalPropertiesClass implements Serializable { 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 class AdditionalPropertiesClass implements Serializable { @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 class AdditionalPropertiesClass implements Serializable { 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 333eb07e0c2..a73c4ac72f9 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 13732e479c9..42549d93a8e 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 b73bb2f1cfa..a49378d9892 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 25ca643466b..fe08c5f056c 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 8e0342c51f2..2bae29ad9ee 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 6c37adcb734..884dab3b875 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<Self, Self::Err> { - 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<Self, Self::Err> { - 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<Self, Self::Err> { - 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<Self, Self::Err> { - 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<Self, Self::Err> { - 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<Self, Self::Err> { - 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<Self, Self::Err> { - 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<Self, Self::Err> { - 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<Self, Self::Err> { - 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<Self, Self::Err> { - 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<Self, Self::Err> { - 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 034234f656c..13660eeb6d7 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 2166608b4ce..7d1aabb7c0b 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 bb43f7aab92..64e50c80787 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 21f6f266a31..16b3408f323 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 164cd1500d6..44e1e29d741 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 164cd1500d6..44e1e29d741 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 333eb07e0c2..a73c4ac72f9 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" -- GitLab From 7195e03be7ca6351e14746b8352615f628b80fc2 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 1316a3c382e..9f8a26bcc61 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 25530a2622e..a6e1a88e3b4 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 */ -- GitLab From 9212c85a7642527ae4385bc78ec3d6b6a4601d64 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 1316a3c382e..9f8a26bcc61 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 25530a2622e..a6e1a88e3b4 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 1316a3c382e..9f8a26bcc61 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 9dd5c539404..2b19a95b486 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.<String, Object.<String, 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 1316a3c382e..9f8a26bcc61 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 9dd5c539404..2b19a95b486 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.<String, Object.<String, 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 */ -- GitLab From cc80080e232460c1ee309dbf993101963725e6df Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 7b56820212d..eb3e0524de1 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 b3e6326015b..be4455c683b 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 @@ class AdditionalPropertiesClass(object): 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 @@ class AdditionalPropertiesClass(object): 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 @@ class AdditionalPropertiesClass(object): 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 -- GitLab From 3604c95c164bcb116061c0c28e85d9b0540e12e2 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 164cd1500d6..44e1e29d741 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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"); -- GitLab From dee6dc4901ef3542d1c2c63a753fb6c5f46f3402 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 a93408ddf18..bf1af7c2e70 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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"); -- GitLab From 0b6797466de507cec4f10169c9911dc76016eb5b Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 164cd1500d6..44e1e29d741 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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"); -- GitLab From 22777e7e7cd274f05cf577376ecc8e6080838401 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 7b56820212d..eb3e0524de1 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 b3e6326015b..be4455c683b 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 @@ class AdditionalPropertiesClass(object): 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 @@ class AdditionalPropertiesClass(object): 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 @@ class AdditionalPropertiesClass(object): 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 7b56820212d..eb3e0524de1 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 b3e6326015b..be4455c683b 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 @@ class AdditionalPropertiesClass(object): 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 @@ class AdditionalPropertiesClass(object): 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 @@ class AdditionalPropertiesClass(object): 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 -- GitLab From a389e185b834933cccc880f061bee33ca2369d17 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 164cd1500d6..44e1e29d741 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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"); -- GitLab From 5f428a4b5829f7ba7a41475083b7d55bef28304d Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 164cd1500d6..44e1e29d741 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 164cd1500d6..44e1e29d741 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 21f6f266a31..16b3408f323 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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"); -- GitLab From 9b82711fe6630f1e36c3ecc7af9e150c97826862 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 21f6f266a31..16b3408f323 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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"); -- GitLab From 0b19b7f4b60787fabea995206bf3f2bde3e5e9d2 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 72ddd5d5b92..fd3558f01ef 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 class DefaultCodegen implements CodegenConfig { @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 38c1b56107b..df0d00f44e7 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 class CodegenConfigurator { // 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 d66947dc107..0e365d53540 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 class ModelUtils { // additional properties are allowed or not. // // The original behavior was to assume additionalProperties had been set to false. - Map<String, Object> 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 class ModelUtils { 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 class ModelUtils { } /** - * 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 class ModelUtils { LOGGER.warn("Unable to read swagger/openapi attribute"); version = openAPI.getOpenapi(); } - return new SemVer(version); - } + // Cache the OAS version in global settings so it can be looked up in the helper functions. + //GlobalSettings.setProperty(openapiDocVersion, version); - /** - * Get the original version of the OAS document as specified in the source document, - * and set the ${EXTENSION_OPENAPI_DOC_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. - */ - public static void addOpenApiVersionExtension(OpenAPI openapi, String location, List<AuthorizationValue> 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 714558172d5..dc5ec9965a2 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 class TestUtils { */ 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; } -- GitLab From 006900a4f850df380fa507241020c1a66c6ebe7d Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 7940eaa52ea..5313659ef23 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 7940eaa52ea..5313659ef23 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 7940eaa52ea..5313659ef23 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 7940eaa52ea..5313659ef23 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 d86a7b959f9..30aad25824c 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 d86a7b959f9..30aad25824c 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 d86a7b959f9..30aad25824c 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 d86a7b959f9..30aad25824c 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 d86a7b959f9..30aad25824c 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 d86a7b959f9..30aad25824c 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 d86a7b959f9..30aad25824c 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 d86a7b959f9..30aad25824c 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 d86a7b959f9..30aad25824c 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 d86a7b959f9..30aad25824c 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 d86a7b959f9..30aad25824c 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 d86a7b959f9..30aad25824c 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 d86a7b959f9..30aad25824c 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 d86a7b959f9..30aad25824c 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 d86a7b959f9..30aad25824c 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 d86a7b959f9..30aad25824c 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 d86a7b959f9..30aad25824c 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 d86a7b959f9..30aad25824c 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 d86a7b959f9..30aad25824c 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 d86a7b959f9..30aad25824c 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 d86a7b959f9..30aad25824c 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 d86a7b959f9..30aad25824c 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 d86a7b959f9..30aad25824c 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 d86a7b959f9..30aad25824c 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 cb59ab84d67..5c1cc82811a 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 11635de3f45..af7148414b9 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 11635de3f45..af7148414b9 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 11635de3f45..af7148414b9 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 42549d93a8e..0c61c209957 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 42549d93a8e..0c61c209957 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 d67ec8330bd..1a863721712 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 d67ec8330bd..1a863721712 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 d67ec8330bd..1a863721712 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 8780b4d4828..edbfa20608b 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 d67ec8330bd..1a863721712 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 d67ec8330bd..1a863721712 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 d67ec8330bd..1a863721712 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 d67ec8330bd..1a863721712 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 d67ec8330bd..1a863721712 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 a73c4ac72f9..f6f5c60294f 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 a73c4ac72f9..f6f5c60294f 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 42549d93a8e..0c61c209957 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 a49378d9892..cc003383b96 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 fe08c5f056c..0e9e1377ea9 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 2bae29ad9ee..894bb1537ab 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 13660eeb6d7..c0129798aa6 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 7d1aabb7c0b..27f96b0bef1 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 64e50c80787..276349f7a0e 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 a73c4ac72f9..f6f5c60294f 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" -- GitLab From a63f6701432c58be78c100cc498821befdcfb259 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 d99e7162d01..d168f1d8bda 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 27e270c494e..fbf324f2d19 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 @@ class InitTables < ActiveRecord::Migration 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 d99e7162d01..d168f1d8bda 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 0c61c209957..2a48cecf82b 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 -- GitLab From 38ecb91b638fdad96c676c7620ad589c307cb095 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 f0c28565014..239ebd87616 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 @@ import javax.validation.Valid; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 f0c28565014..239ebd87616 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 @@ import javax.validation.Valid; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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"); -- GitLab From 66d35c5c197b1918b14fabb25e1f316e23823724 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 f0c28565014..239ebd87616 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 @@ import javax.validation.Valid; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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 f0c28565014..239ebd87616 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 @@ import javax.validation.Valid; 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<String, Map<String, Object>> 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { 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 class AdditionalPropertiesClass { @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 class AdditionalPropertiesClass { 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"); -- GitLab From fe87ff0d573bb53ed1576aa250aba200f85d5aaa Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 52e44cfac41..8dd83cb6610 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<String, Map<String, Object>> mapMapAnytype = null; - @ApiModelProperty(value = "") - private Object mapWithAdditionalProperties; - - @ApiModelProperty(value = "") - private Object mapWithoutAdditionalProperties; - @ApiModelProperty(value = "") private Object anytype1; @@ -246,42 +240,6 @@ public class AdditionalPropertiesClass { return this; } - /** - * Get mapWithAdditionalProperties - * @return mapWithAdditionalProperties - **/ - @JsonProperty("map_with_additional_properties") - public Object getMapWithAdditionalProperties() { - return mapWithAdditionalProperties; - } - - public void setMapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - } - - public AdditionalPropertiesClass mapWithAdditionalProperties(Object mapWithAdditionalProperties) { - this.mapWithAdditionalProperties = mapWithAdditionalProperties; - return this; - } - - /** - * Get mapWithoutAdditionalProperties - * @return mapWithoutAdditionalProperties - **/ - @JsonProperty("map_without_additional_properties") - public Object getMapWithoutAdditionalProperties() { - return mapWithoutAdditionalProperties; - } - - public void setMapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - } - - public AdditionalPropertiesClass mapWithoutAdditionalProperties(Object mapWithoutAdditionalProperties) { - this.mapWithoutAdditionalProperties = mapWithoutAdditionalProperties; - return this; - } - /** * Get anytype1 * @return anytype1 @@ -350,8 +308,6 @@ public class AdditionalPropertiesClass { 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-datelib-j8/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java index 4fc48c78a53..7927ec401ed 100644 --- a/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java +++ b/samples/server/petstore/jaxrs-datelib-j8/src/gen/java/org/openapitools/model/AdditionalPropertiesClass.java @@ -39,8 +39,6 @@ import javax.validation.Valid; 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 @@ -79,14 +77,6 @@ public class AdditionalPropertiesClass implements Serializable { @JsonProperty(JSON_PROPERTY_MAP_MAP_ANYTYPE) private Map<String, Map<String, Object>> 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 class AdditionalPropertiesClass implements Serializable { 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 class AdditionalPropertiesClass implements Serializable { 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 class AdditionalPropertiesClass implements Serializable { @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 class AdditionalPropertiesClass implements Serializable { 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"); -- GitLab From ed54ab81957afc1a46cd255863c975e562c186e4 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 d99e7162d01..58592f031f6 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 af7148414b9..06a1bb8d469 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 fb3c3346a36..94b55953254 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 a221fb052d2..78261ede612 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 71fbac70d50..04b2a9ba9aa 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 d99e7162d01..58592f031f6 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 af7148414b9..06a1bb8d469 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 05b4a1a6c15..17107d021c5 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 a221fb052d2..78261ede612 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 71fbac70d50..04b2a9ba9aa 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 c45b80df363..4d05d282f98 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, -- GitLab From 65d1401dcb6f621e2f0a5e00a2b9be409eb681e7 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 f4824e48771..bf27c585440 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' -- GitLab From 0ce0b6b6f85b47277a496201fb105b622bdbc9f6 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 0e365d53540..54f49c43b8a 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 class ModelUtils { 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<Schema> 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 class ModelUtils { 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<Schema> 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. * -- GitLab From 92cb99bfa80e33c1000cd1ddbe56ec5ceabc4827 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 54f49c43b8a..961ff1974b2 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 class ModelUtils { } } } + 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. * -- GitLab From 765757f420b7baddec739f6edaa6eaa7bd382048 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 12f3292db0b..d07f57619d5 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 12f3292db0b..d07f57619d5 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 8d85f5b71f0..4f3b7e0fdef 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 12f3292db0b..d07f57619d5 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 7c827a81c33..0b8a73d6143 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 <MinimumVisualStudioVersion>14.0</MinimumVisualStudioVersion> <Configuration Condition=" '$(Configuration)' == '' ">Debug</Configuration> <Platform Condition=" '$(Platform)' == '' ">AnyCPU</Platform> - <ProjectGuid>{321C8C3F-0156-40C1-AE42-D59761FB9B6C}</ProjectGuid> + <ProjectGuid>{3AB1F259-1769-484B-9411-84505FCCBD55}</ProjectGuid> <OutputType>Library</OutputType> <AppDesignerFolder>Properties</AppDesignerFolder> <RootNamespace>Org.OpenAPITools</RootNamespace> diff --git a/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesClass.md b/samples/client/petstore/csharp/OpenAPIClientWithPropertyChanged/docs/AdditionalPropertiesClass.md index 12f3292db0b..d07f57619d5 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) -- GitLab From ec200306f9e3803ff525857d910b5563bbe8575c Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 cd67c5478f4..60b98d75c01 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 5c1cc82811a..f7bec563071 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 d2b6ab0cca5..19719e709f8 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 48de99351d7..941f00027db 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) } -- GitLab From d14898cadc8ae3b4ce64555288766284beadfc27 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 3ea926263fc..5dc9f537e91 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 class DefaultCodegenTest { @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 60b98d75c01..74598c6ce70 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 bf27c585440..187a6488f0e 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 d27928ab752..62eee911ea2 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 6eac3ace2ec..46be89a5b23 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 4b232aa174a..cf00d9d4c81 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 36026fe72f8..15763836ddb 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 1d7b5b26d71..846a97c82a8 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 bc3c7f3922d..4e43e94825b 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 8f5ea4b2ced..bee23082474 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 2680d987a45..631b0362886 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 97b8891a27e..2e315eb2f21 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 ec98b99dcec..4c0497d6769 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 2437d3c81ac..74beb2c531c 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 12bfa5c7fe5..78693cf8f0e 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 bd6a44a0f9f..7673f5eea8b 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 cc4654bf99c..8722f0be282 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 14479b04c10..0141ce53ffe 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 @@ class AdditionalPropertiesClass(ModelNormal): '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 @@ class AdditionalPropertiesClass(ModelNormal): 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 2a60e948cf7..61bd78230d0 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 12c170e6883..0e5c29b79eb 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 d06bcd74375..0a4edd639fd 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 ec9a0577bf4..a8d882fd9e7 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 c94e72607ea..11279675ba6 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 de0626ed942..45bf9d342b1 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 3ceb88c7ee2..b824e584180 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 8a83c2cee86..964559ceff1 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 e4488518643..506a4fbb7bd 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 39f1b70930e..e84cb566f5d 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 3ddfdf1360f..e5350f672dc 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 @@ class AdditionalPropertiesClass(ModelNormal): '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 @@ class AdditionalPropertiesClass(ModelNormal): '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 @@ class AdditionalPropertiesClass(ModelNormal): 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 = {} -- GitLab From 89117b9b54879154459c08fe790586cf6e03fbb8 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 531cf295d64..8a64ca98898 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 62eee911ea2..d27928ab752 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 46be89a5b23..6eac3ace2ec 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 cf00d9d4c81..4b232aa174a 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 15763836ddb..36026fe72f8 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 846a97c82a8..1d7b5b26d71 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 4e43e94825b..bc3c7f3922d 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 bee23082474..8f5ea4b2ced 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 631b0362886..2680d987a45 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 2e315eb2f21..97b8891a27e 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 4c0497d6769..ec98b99dcec 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 74beb2c531c..2437d3c81ac 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 78693cf8f0e..12bfa5c7fe5 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 7673f5eea8b..bd6a44a0f9f 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 8722f0be282..cc4654bf99c 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 0141ce53ffe..14479b04c10 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 @@ class AdditionalPropertiesClass(ModelNormal): '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 @@ class AdditionalPropertiesClass(ModelNormal): 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 61bd78230d0..2a60e948cf7 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 0e5c29b79eb..12c170e6883 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 0a4edd639fd..d06bcd74375 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 a8d882fd9e7..ec9a0577bf4 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 11279675ba6..c94e72607ea 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 45bf9d342b1..de0626ed942 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 b824e584180..3ceb88c7ee2 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 964559ceff1..8a83c2cee86 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 506a4fbb7bd..e4488518643 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 -- GitLab From 5206a30eaaec420ee4cc7ef8716e55f92fe80d37 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 5dc9f537e91..e9bfaaded95 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 class DefaultCodegenTest { @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 00000000000..5cfa74c27c8 --- /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 7f990bf0fa7..00000000000 --- 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 -- GitLab From 5339ab728076ed348387f8c742ed9e7a2dfd6872 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 470849ce571..5b7138c0686 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 @@ import static org.openapitools.codegen.utils.StringUtils.underscore; 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 class PythonClientExperimentalCodegen extends PythonClientCodegen { for (Map<String, Object> mo : models) { CodegenModel cm = (CodegenModel) mo.get("model"); - // Models that are referenced in the 'additionalPropertiesType' keyword - // must be added to the imports. - List<String> refModelNames = (List<String>) 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 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen { List<String> referencedModelNames = new ArrayList<String>(); 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 -- GitLab From 0f014dddbb9d7855afe43f88ebec5ddc1cbd5907 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 e9bfaaded95..de269086006 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 class DefaultCodegenTest { CodegenModel cm = codegen.fromModel("AdditionalPropertiesClass", schema); Map<String, Schema> 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 class DefaultCodegenTest { 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 187a6488f0e..6b38a82009e 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 e84cb566f5d..042d7c437d6 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 e5350f672dc..f170265f9ab 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 @@ class AdditionalPropertiesClass(ModelNormal): 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 @@ class AdditionalPropertiesClass(ModelNormal): '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 @@ class AdditionalPropertiesClass(ModelNormal): _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 = {} -- GitLab From ffae039487a7c5333a920eece5bea4b5a73966ab Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 e18ba8c360c..44fdfb57936 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 6b38a82009e..bd0ea05c9d9 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 59cd1a55715..c876b3eeffc 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 @@ 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', ()) @@ -216,6 +208,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,) @@ -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 59cd1a55715..c876b3eeffc 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 @@ 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', ()) @@ -216,6 +208,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,) @@ -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 45a1ae1d18e..ea2e74eb380 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 20f83968fd3..70e2bb46a1e 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 @@ class TestFruit(unittest.TestCase): 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 ad8f7cc68b2..fbb8cb7ad5c 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 @@ class TestOuterEnum(unittest.TestCase): 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__': -- GitLab From b1b487a14ca2689e06bc5760d3be3f41c63c03d9 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 35c628bf24e..a85ae29c46e 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 @@ class DiscardUnknownPropertiesTests(unittest.TestCase): 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 @@ class DiscardUnknownPropertiesTests(unittest.TestCase): 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)) -- GitLab From 5466a8876b4c4fe2a3a243155b0a4e6b37467b5d Mon Sep 17 00:00:00 2001 From: Justin Black <justin.a.black@gmail.com> 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 9afb17b5277..0790c614357 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 3a77f7e8a8d..78059150f20 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 ee30496c58e..c48b515a7aa 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -116,7 +117,7 @@ class AdditionalPropertiesClass(ModelNormal): ]) @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 @@ class AdditionalPropertiesClass(ModelNormal): 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 694df633a24..a71502767ae 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -100,7 +101,7 @@ class Address(ModelNormal): ]) @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 @@ class Address(ModelNormal): _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 48f42ef6844..641c9c16e27 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -120,7 +121,7 @@ class Animal(ModelNormal): ]) @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 @@ class Animal(ModelNormal): 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 8d9d8b7cc43..c921519b878 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -106,7 +107,7 @@ class ApiResponse(ModelNormal): ]) @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 @@ class ApiResponse(ModelNormal): 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 51568e1bd7b..3f87c152e33 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -115,7 +116,7 @@ class Apple(ModelNormal): ]) @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 @@ class Apple(ModelNormal): 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 02d8db3771c..66b2899dbf6 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,7 +105,7 @@ class AppleReq(ModelNormal): ]) @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 @@ class AppleReq(ModelNormal): 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 ddd5533b762..b9f52d6ba7b 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class ArrayOfArrayOfNumberOnly(ModelNormal): ]) @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 @@ class ArrayOfArrayOfNumberOnly(ModelNormal): 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 c8b493c1509..45021fef4c5 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class ArrayOfNumberOnly(ModelNormal): ]) @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 @@ class ArrayOfNumberOnly(ModelNormal): 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 14f0609d64e..0eed8d05461 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -111,7 +112,7 @@ class ArrayTest(ModelNormal): ]) @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 @@ class ArrayTest(ModelNormal): 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 a0479781f46..6e42bcb5725 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class Banana(ModelNormal): ]) @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 @@ class Banana(ModelNormal): 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 9e765319e10..3128a038053 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,7 +105,7 @@ class BananaReq(ModelNormal): ]) @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 @@ class BananaReq(ModelNormal): 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 66ab866debf..200fb06f67e 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -130,7 +131,7 @@ class BiologyChordate(ModelNormal): ]) @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 @@ class BiologyChordate(ModelNormal): _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 467449a823a..649c7fb061f 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -112,7 +113,7 @@ class BiologyHominid(ModelComposed): ]) @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 @@ class BiologyHominid(ModelComposed): _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 78efad8e6d9..3c0b199a7e3 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -124,7 +125,7 @@ class BiologyMammal(ModelComposed): ]) @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 @@ class BiologyMammal(ModelComposed): _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 07562bcd001..c295345a19b 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -118,7 +119,7 @@ class BiologyPrimate(ModelComposed): ]) @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 @@ class BiologyPrimate(ModelComposed): _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 380960e9c8a..a5e8bb71dbe 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -112,7 +113,7 @@ class BiologyReptile(ModelComposed): ]) @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 @@ class BiologyReptile(ModelComposed): _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 9c4177a3943..06745009d8b 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -112,7 +113,7 @@ class Capitalization(ModelNormal): ]) @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 @@ class Capitalization(ModelNormal): 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 fa39273d658..b8067225253 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -126,7 +127,7 @@ class Cat(ModelComposed): ]) @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 @@ class Cat(ModelComposed): 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 14db2c8d4ee..49ae9462f49 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class CatAllOf(ModelNormal): ]) @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 @@ class CatAllOf(ModelNormal): 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 a9c2abbe1c3..16e4a33d4f0 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,7 +105,7 @@ class Category(ModelNormal): ]) @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 @@ class Category(ModelNormal): 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 cca6f50f779..fc88f68e3f5 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class ClassModel(ModelNormal): ]) @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 @@ class ClassModel(ModelNormal): _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 51558cd3663..fa99b07fa32 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class Client(ModelNormal): ]) @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 @@ class Client(ModelNormal): 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 3c64215adf3..03497b55fb4 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -115,7 +116,7 @@ class ComplexQuadrilateral(ModelComposed): ]) @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 @@ class ComplexQuadrilateral(ModelComposed): _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 58cd4813fcc..e35c52bd69d 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -121,7 +122,7 @@ class Dog(ModelComposed): ]) @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 @@ class Dog(ModelComposed): 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 69692472909..0d053aca2a6 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class DogAllOf(ModelNormal): ]) @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 @@ class DogAllOf(ModelNormal): 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 54405511699..a9cf39773d6 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -128,7 +129,7 @@ class Drawing(ModelNormal): ]) @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 @@ class Drawing(ModelNormal): 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 ca924f02e96..a1999044974 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -112,7 +113,7 @@ class EnumArrays(ModelNormal): ]) @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 @@ class EnumArrays(ModelNormal): 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 091ed9b3964..3fa95b69d0c 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -99,7 +100,7 @@ class EnumClass(ModelSimple): ]) @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 @@ class EnumClass(ModelSimple): _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 0ab10dfaafd..ba6118114b0 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -154,7 +155,7 @@ class EnumTest(ModelNormal): ]) @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 @@ class EnumTest(ModelNormal): 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 1d3003b1965..c601d01dde7 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -115,7 +116,7 @@ class EquilateralTriangle(ModelComposed): ]) @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 @@ class EquilateralTriangle(ModelComposed): _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 999731b2fc0..0152f8d8c66 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class File(ModelNormal): ]) @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 @@ class File(ModelNormal): 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 ac2ce591bcf..79e5638ccc9 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -109,7 +110,7 @@ class FileSchemaTestClass(ModelNormal): ]) @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 @@ class FileSchemaTestClass(ModelNormal): 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 cdfe893d698..34b9eb6fba6 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class Foo(ModelNormal): ]) @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 @@ class Foo(ModelNormal): 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 a548880fa61..6c5ae81e7dd 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -173,7 +174,7 @@ class FormatTest(ModelNormal): ]) @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 @@ class FormatTest(ModelNormal): 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 0647e16f171..1058c953ee6 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -130,7 +131,7 @@ class Fruit(ModelComposed): ]) @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 @@ class Fruit(ModelComposed): 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 58d45a3c9ba..b8af0f35f43 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -119,7 +120,7 @@ class FruitReq(ModelComposed): ]) @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 @@ class FruitReq(ModelComposed): 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 7deb4c1f33c..9857b08c36c 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -130,7 +131,7 @@ class GmFruit(ModelComposed): ]) @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 @@ class GmFruit(ModelComposed): 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 4c77f76a9d1..eeb685139cb 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,7 +105,7 @@ class HasOnlyReadOnly(ModelNormal): ]) @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 @@ class HasOnlyReadOnly(ModelNormal): 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 61d7fac5b08..be6cfa1c0af 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class HealthCheckResult(ModelNormal): ]) @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 @@ class HealthCheckResult(ModelNormal): 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 b5a45be9c91..8975f4be51e 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,7 +105,7 @@ class InlineObject(ModelNormal): ]) @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 @@ class InlineObject(ModelNormal): 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 f87ce686d42..4991e899530 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,7 +105,7 @@ class InlineObject1(ModelNormal): ]) @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 @@ class InlineObject1(ModelNormal): 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 2a6ab044db0..5b414027033 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -113,7 +114,7 @@ class InlineObject2(ModelNormal): ]) @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 @@ class InlineObject2(ModelNormal): 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 bbb8b911cae..ff595ddaa1f 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -162,7 +163,7 @@ class InlineObject3(ModelNormal): ]) @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 @@ class InlineObject3(ModelNormal): 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 29dd6f9609c..a45a324fb51 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,7 +105,7 @@ class InlineObject4(ModelNormal): ]) @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 @@ class InlineObject4(ModelNormal): _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 34a54c696fe..23e08195832 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,7 +105,7 @@ class InlineObject5(ModelNormal): ]) @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 @@ class InlineObject5(ModelNormal): 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 a97ff40f744..577dbfeb851 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -107,7 +108,7 @@ class InlineResponseDefault(ModelNormal): ]) @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 @@ class InlineResponseDefault(ModelNormal): 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 8994666f545..ea5607fdfd9 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -115,7 +116,7 @@ class IsoscelesTriangle(ModelComposed): ]) @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 @@ class IsoscelesTriangle(ModelComposed): _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 aeaf9df8717..9499f26c7b1 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class List(ModelNormal): ]) @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 @@ class List(ModelNormal): _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 81d33fa0c43..a8f40ba6c05 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -130,7 +131,7 @@ class Mammal(ModelComposed): ]) @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 @@ class Mammal(ModelComposed): 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 60c5822afb5..45be8a1fecf 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -117,7 +118,7 @@ class MapTest(ModelNormal): ]) @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 @@ class MapTest(ModelNormal): 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 306e0c9a29f..0e584ebd43e 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -111,7 +112,7 @@ class MixedPropertiesAndAdditionalPropertiesClass(ModelNormal): ]) @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 @@ class MixedPropertiesAndAdditionalPropertiesClass(ModelNormal): 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 9709655efd4..54cc1fa338d 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,7 +105,7 @@ class Model200Response(ModelNormal): ]) @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 @@ class Model200Response(ModelNormal): _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 afb3c60f317..cf7415f0bd7 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class ModelReturn(ModelNormal): ]) @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 @@ class ModelReturn(ModelNormal): _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 bcf700a4f8a..33a95baafcf 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -108,7 +109,7 @@ class Name(ModelNormal): ]) @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 @@ class Name(ModelNormal): _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 a9c5e476730..c16714bd32f 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -124,7 +125,7 @@ class NullableClass(ModelNormal): ]) @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 @@ class NullableClass(ModelNormal): 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 d8188fe7e76..e62a3881c52 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -123,7 +124,7 @@ class NullableShape(ModelComposed): ]) @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 @@ class NullableShape(ModelComposed): _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 ce2cefe4897..305da1d7538 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class NumberOnly(ModelNormal): ]) @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 @@ class NumberOnly(ModelNormal): 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 f292c13fa2e..ddc3332d66d 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -117,7 +118,7 @@ class Order(ModelNormal): ]) @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 @@ class Order(ModelNormal): 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 b27d0aca9f2..0011802050d 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -106,7 +107,7 @@ class OuterComposite(ModelNormal): ]) @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 @@ class OuterComposite(ModelNormal): 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 03450cce277..64311e83836 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -100,7 +101,7 @@ class OuterEnum(ModelSimple): ]) @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 @@ class OuterEnum(ModelSimple): _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 7ed10ea3ae5..b53b330bbaf 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -99,7 +100,7 @@ class OuterEnumDefaultValue(ModelSimple): ]) @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 @@ class OuterEnumDefaultValue(ModelSimple): _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 095e501bacf..71d192b54f1 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -99,7 +100,7 @@ class OuterEnumInteger(ModelSimple): ]) @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 @@ class OuterEnumInteger(ModelSimple): _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 6ac8dd3d466..2deaeae1932 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -99,7 +100,7 @@ class OuterEnumIntegerDefaultValue(ModelSimple): ]) @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 @@ class OuterEnumIntegerDefaultValue(ModelSimple): _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 29a392e2bd3..c93acd53c96 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -127,7 +128,7 @@ class Pet(ModelNormal): ]) @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 @@ class Pet(ModelNormal): 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 bc3a76ca301..0f499406457 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -121,7 +122,7 @@ class Quadrilateral(ModelComposed): ]) @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 @@ class Quadrilateral(ModelComposed): _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 8af50176301..05e4d0f3b16 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class QuadrilateralInterface(ModelNormal): ]) @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 @@ class QuadrilateralInterface(ModelNormal): _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 308f776869a..691d789a92e 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,7 +105,7 @@ class ReadOnlyFirst(ModelNormal): ]) @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 @@ class ReadOnlyFirst(ModelNormal): 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 3f444f652bf..6350bdea3bc 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -115,7 +116,7 @@ class ScaleneTriangle(ModelComposed): ]) @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 @@ class ScaleneTriangle(ModelComposed): _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 cd0d2e5fd8d..ef83ed3a31b 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -123,7 +124,7 @@ class Shape(ModelComposed): ]) @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 @@ class Shape(ModelComposed): _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 4f5914ca278..1f3d518ba3e 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class ShapeInterface(ModelNormal): ]) @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 @@ class ShapeInterface(ModelNormal): _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 1b3cf94205b..53043fdd60c 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -123,7 +124,7 @@ class ShapeOrNull(ModelComposed): ]) @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 @@ class ShapeOrNull(ModelComposed): _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 d25ebe77be3..8d8cf85fca1 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -115,7 +116,7 @@ class SimpleQuadrilateral(ModelComposed): ]) @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 @@ class SimpleQuadrilateral(ModelComposed): _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 4fbb4b76f55..6e2b80cbe90 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class SpecialModelName(ModelNormal): ]) @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 @@ class SpecialModelName(ModelNormal): 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 440bef9b742..8351ad04e2d 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -100,7 +101,7 @@ class StringBooleanMap(ModelNormal): ]) @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 @@ class StringBooleanMap(ModelNormal): _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 2e28b97b758..aa50402b7f9 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,7 +105,7 @@ class Tag(ModelNormal): ]) @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 @@ class Tag(ModelNormal): 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 96ea10dd4ab..27b8ae12273 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -127,7 +128,7 @@ class Triangle(ModelComposed): ]) @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 @@ class Triangle(ModelComposed): _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 d0f48744091..56d960a1338 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class TriangleInterface(ModelNormal): ]) @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 @@ class TriangleInterface(ModelNormal): _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 0adf71f1166..836e7f9c0b5 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -124,7 +125,7 @@ class User(ModelNormal): ]) @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 @@ class User(ModelNormal): 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 cf9f8ed3b6d..eb066c53be5 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -106,7 +107,7 @@ class Whale(ModelNormal): ]) @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 @@ class Whale(ModelNormal): 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 f8f60a8c0a6..e4c2b8d422b 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -109,7 +110,7 @@ class Zebra(ModelNormal): ]) @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 @@ class Zebra(ModelNormal): 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 6a94fd7c2df..1172373b9e1 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 @@ class TestFruit(unittest.TestCase): 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. -- GitLab From 6d561ad04585b760fb80cc13d659bb4039028462 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 88d9c309ecd..175a64160a1 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 class CppUE4ClientCodegen extends AbstractCppCodegen { 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) + "<FString, " + getTypeDeclaration(inner) + ">"; } -- GitLab From 768d933f508cafadbaf79fdec312c34c8b51ad5f Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 4cded0f050f..7ea7b1f807b 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class AdditionalPropertiesAnyType(ModelNormal): ]) @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 @@ class AdditionalPropertiesAnyType(ModelNormal): 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 a3b0ae0b521..5dc25499eaf 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class AdditionalPropertiesArray(ModelNormal): ]) @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 @@ class AdditionalPropertiesArray(ModelNormal): 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 0fa762dd2fb..ae3b7cd9dc0 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class AdditionalPropertiesBoolean(ModelNormal): ]) @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 @@ class AdditionalPropertiesBoolean(ModelNormal): 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 7764818ff1b..1b98c5f06e5 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -122,7 +123,7 @@ class AdditionalPropertiesClass(ModelNormal): ]) @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 @@ class AdditionalPropertiesClass(ModelNormal): 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 d00e8f163d5..005c26263ab 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class AdditionalPropertiesInteger(ModelNormal): ]) @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 @@ class AdditionalPropertiesInteger(ModelNormal): 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 459b614f6dc..fca97fca089 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class AdditionalPropertiesNumber(ModelNormal): ]) @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 @@ class AdditionalPropertiesNumber(ModelNormal): 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 1455c137623..03ca022e6f8 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class AdditionalPropertiesObject(ModelNormal): ]) @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 @@ class AdditionalPropertiesObject(ModelNormal): 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 021ed26400a..7144f66699b 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class AdditionalPropertiesString(ModelNormal): ]) @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 @@ class AdditionalPropertiesString(ModelNormal): 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 48f42ef6844..641c9c16e27 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -120,7 +121,7 @@ class Animal(ModelNormal): ]) @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 @@ class Animal(ModelNormal): 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 8d9d8b7cc43..c921519b878 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -106,7 +107,7 @@ class ApiResponse(ModelNormal): ]) @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 @@ class ApiResponse(ModelNormal): 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 ddd5533b762..b9f52d6ba7b 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class ArrayOfArrayOfNumberOnly(ModelNormal): ]) @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 @@ class ArrayOfArrayOfNumberOnly(ModelNormal): 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 c8b493c1509..45021fef4c5 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class ArrayOfNumberOnly(ModelNormal): ]) @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 @@ class ArrayOfNumberOnly(ModelNormal): 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 14f0609d64e..0eed8d05461 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -111,7 +112,7 @@ class ArrayTest(ModelNormal): ]) @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 @@ class ArrayTest(ModelNormal): 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 9c4177a3943..06745009d8b 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -112,7 +113,7 @@ class Capitalization(ModelNormal): ]) @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 @@ class Capitalization(ModelNormal): 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 47ac891bf6d..9620612169b 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -121,7 +122,7 @@ class Cat(ModelComposed): ]) @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 @@ class Cat(ModelComposed): 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 14db2c8d4ee..49ae9462f49 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class CatAllOf(ModelNormal): ]) @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 @@ class CatAllOf(ModelNormal): 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 a9c2abbe1c3..16e4a33d4f0 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,7 +105,7 @@ class Category(ModelNormal): ]) @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 @@ class Category(ModelNormal): 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 751ae30b2c3..7be69a7d528 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -117,7 +118,7 @@ class Child(ModelComposed): ]) @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 @@ class Child(ModelComposed): 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 93992097aed..26e6018acf7 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class ChildAllOf(ModelNormal): ]) @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 @@ class ChildAllOf(ModelNormal): 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 ae0a3f89948..873c3bc76cf 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -119,7 +120,7 @@ class ChildCat(ModelComposed): ]) @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 @@ class ChildCat(ModelComposed): 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 1d39e492366..1ddf92fb122 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class ChildCatAllOf(ModelNormal): ]) @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 @@ class ChildCatAllOf(ModelNormal): 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 f5e6fb7cf15..a49f042cf74 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -119,7 +120,7 @@ class ChildDog(ModelComposed): ]) @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 @@ class ChildDog(ModelComposed): 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 c62d7f87783..7ba37f9908f 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class ChildDogAllOf(ModelNormal): ]) @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 @@ class ChildDogAllOf(ModelNormal): 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 0ac6b2a593c..0f11243a249 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -119,7 +120,7 @@ class ChildLizard(ModelComposed): ]) @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 @@ class ChildLizard(ModelComposed): 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 94d64f7dd76..78b69edb872 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class ChildLizardAllOf(ModelNormal): ]) @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 @@ class ChildLizardAllOf(ModelNormal): 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 cca6f50f779..fc88f68e3f5 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class ClassModel(ModelNormal): ]) @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 @@ class ClassModel(ModelNormal): _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 51558cd3663..fa99b07fa32 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class Client(ModelNormal): ]) @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 @@ class Client(ModelNormal): 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 41131815678..f9b93eebc78 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -121,7 +122,7 @@ class Dog(ModelComposed): ]) @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 @@ class Dog(ModelComposed): 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 69692472909..0d053aca2a6 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class DogAllOf(ModelNormal): ]) @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 @@ class DogAllOf(ModelNormal): 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 ca924f02e96..a1999044974 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -112,7 +113,7 @@ class EnumArrays(ModelNormal): ]) @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 @@ class EnumArrays(ModelNormal): 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 091ed9b3964..3fa95b69d0c 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -99,7 +100,7 @@ class EnumClass(ModelSimple): ]) @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 @@ class EnumClass(ModelSimple): _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 91cdeeb9fb4..71cf60fd482 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -133,7 +134,7 @@ class EnumTest(ModelNormal): ]) @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 @@ class EnumTest(ModelNormal): 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 999731b2fc0..0152f8d8c66 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class File(ModelNormal): ]) @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 @@ class File(ModelNormal): 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 ac2ce591bcf..79e5638ccc9 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -109,7 +110,7 @@ class FileSchemaTestClass(ModelNormal): ]) @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 @@ class FileSchemaTestClass(ModelNormal): 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 06d7c298731..7c598ae4382 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -161,7 +162,7 @@ class FormatTest(ModelNormal): ]) @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 @@ class FormatTest(ModelNormal): 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 ba15340a0ba..3097bef04b8 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class Grandparent(ModelNormal): ]) @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 @@ class Grandparent(ModelNormal): 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 fa389d33fca..54dc5be641d 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -130,7 +131,7 @@ class GrandparentAnimal(ModelNormal): ]) @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 @@ class GrandparentAnimal(ModelNormal): _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 4c77f76a9d1..eeb685139cb 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,7 +105,7 @@ class HasOnlyReadOnly(ModelNormal): ]) @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 @@ class HasOnlyReadOnly(ModelNormal): 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 aeaf9df8717..9499f26c7b1 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class List(ModelNormal): ]) @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 @@ class List(ModelNormal): _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 60c5822afb5..45be8a1fecf 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -117,7 +118,7 @@ class MapTest(ModelNormal): ]) @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 @@ class MapTest(ModelNormal): 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 306e0c9a29f..0e584ebd43e 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -111,7 +112,7 @@ class MixedPropertiesAndAdditionalPropertiesClass(ModelNormal): ]) @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 @@ class MixedPropertiesAndAdditionalPropertiesClass(ModelNormal): 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 9709655efd4..54cc1fa338d 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,7 +105,7 @@ class Model200Response(ModelNormal): ]) @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 @@ class Model200Response(ModelNormal): _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 afb3c60f317..cf7415f0bd7 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class ModelReturn(ModelNormal): ]) @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 @@ class ModelReturn(ModelNormal): _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 bcf700a4f8a..33a95baafcf 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -108,7 +109,7 @@ class Name(ModelNormal): ]) @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 @@ class Name(ModelNormal): _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 ce2cefe4897..305da1d7538 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class NumberOnly(ModelNormal): ]) @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 @@ class NumberOnly(ModelNormal): 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 f292c13fa2e..ddc3332d66d 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -117,7 +118,7 @@ class Order(ModelNormal): ]) @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 @@ class Order(ModelNormal): 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 f815b40640f..a64cbe37592 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -111,7 +112,7 @@ class OuterComposite(ModelNormal): ]) @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 @@ class OuterComposite(ModelNormal): 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 ac5c0af9dfe..013f6bdd112 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -99,7 +100,7 @@ class OuterEnum(ModelSimple): ]) @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 @@ class OuterEnum(ModelSimple): _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 f84f87533ff..a6384cf9f5f 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -98,7 +99,7 @@ class OuterNumber(ModelSimple): ]) @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 @@ class OuterNumber(ModelSimple): _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 1e6ac914484..5d33beb6979 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -115,7 +116,7 @@ class Parent(ModelComposed): ]) @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 @@ class Parent(ModelComposed): 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 daf243bd248..28d5f073931 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class ParentAllOf(ModelNormal): ]) @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 @@ class ParentAllOf(ModelNormal): 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 357a2535d15..4635ac94780 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -130,7 +131,7 @@ class ParentPet(ModelComposed): ]) @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 @@ class ParentPet(ModelComposed): _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 29a392e2bd3..c93acd53c96 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -127,7 +128,7 @@ class Pet(ModelNormal): ]) @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 @@ class Pet(ModelNormal): 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 764f5c8286d..d65e53c2e5f 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,7 +105,7 @@ class Player(ModelNormal): ]) @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 @@ class Player(ModelNormal): 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 308f776869a..691d789a92e 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -104,7 +105,7 @@ class ReadOnlyFirst(ModelNormal): ]) @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 @@ class ReadOnlyFirst(ModelNormal): 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 4fbb4b76f55..6e2b80cbe90 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -102,7 +103,7 @@ class SpecialModelName(ModelNormal): ]) @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 @@ class SpecialModelName(ModelNormal): 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 440bef9b742..8351ad04e2d 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -100,7 +101,7 @@ class StringBooleanMap(ModelNormal): ]) @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 @@ class StringBooleanMap(ModelNormal): _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 1966dd07974..ee10817f138 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -106,7 +107,7 @@ class Tag(ModelNormal): ]) @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 @@ class Tag(ModelNormal): 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 83a295a18e0..da92e2cb8ad 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -114,7 +115,7 @@ class TypeHolderDefault(ModelNormal): ]) @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 @@ class TypeHolderDefault(ModelNormal): 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 f16c4446159..4253a0ce725 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -119,7 +120,7 @@ class TypeHolderExample(ModelNormal): ]) @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 @@ class TypeHolderExample(ModelNormal): _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 ad32189e72a..6c6dcd1d28b 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -116,7 +117,7 @@ class User(ModelNormal): ]) @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 @@ class User(ModelNormal): 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 18086909c66..dc48355d3ce 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 six # noqa: F401 import nulltype # noqa: F401 from petstore_api.model_utils import ( # noqa: F401 + ApiTypeError, ModelComposed, ModelNormal, ModelSimple, @@ -158,7 +159,7 @@ class XmlItem(ModelNormal): ]) @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 @@ class XmlItem(ModelNormal): 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 -- GitLab From 3283e3c696ba6cfe9dbeafcee5f2fac1b7ab4284 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 eb00fa4a5ce..ecfac79de95 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.|<dl><dt>**false**</dt><dd>The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.</dd><dt>**true**</dt><dd>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.</dd></dl>|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}}.|<dl><dt>**true**</dt><dd>The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.</dd><dt>**false**</dt><dd>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.</dd></dl>|true| |optionalProjectFile|Generate Build.cs| |true| -- GitLab From 65f6cf84c62e0aeb3c1f647eadc43c4deeada770 Mon Sep 17 00:00:00 2001 From: "Sebastien Rosset (serosset)" <serosset@cisco.com> 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 792b6d2aabe..0e8f8bb27fb 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 8f5ea4b2ced..bee23082474 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 44468a885ab..65058d86e04 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 12bfa5c7fe5..78693cf8f0e 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 d70e8bbaa34..cf39c1833dc 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 @@ class BasquePig(ModelNormal): ]) @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 263261b288a..f838e61b401 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 @@ class ChildCat(ModelComposed): ]) @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 f159c32fd86..1ddf92fb122 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 six # noqa: F401 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 @@ class ChildCatAllOf(ModelNormal): ]) @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 @@ class ChildCatAllOf(ModelNormal): 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 e1942b69a93..375fde3258a 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 six # noqa: F401 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 @@ class DanishPig(ModelNormal): ]) @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 @@ class DanishPig(ModelNormal): _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 0dc6dd7d74a..ab2ba56caf3 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 six # noqa: F401 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 @@ class GrandparentAnimal(ModelNormal): ]) @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 @@ class GrandparentAnimal(ModelNormal): _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 7dedf9c2d18..89633120977 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 @@ class ParentPet(ModelComposed): ]) @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 ef3d8bf5863..5dd3fdb64ec 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 @@ class Pig(ModelComposed): ]) @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: -- GitLab