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/docs/generators/ada-server.md b/docs/generators/ada-server.md
index 85bfb5b5d02..66d41103a77 100644
--- a/docs/generators/ada-server.md
+++ b/docs/generators/ada-server.md
@@ -6,6 +6,8 @@ sidebar_label: ada-server
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|
- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/ada.md b/docs/generators/ada.md
index 66114165a03..971e3267b2f 100644
--- a/docs/generators/ada.md
+++ b/docs/generators/ada.md
@@ -6,6 +6,8 @@ sidebar_label: ada
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/android.md b/docs/generators/android.md
index c499a15ff94..11a5cd1e364 100644
--- a/docs/generators/android.md
+++ b/docs/generators/android.md
@@ -12,6 +12,8 @@ sidebar_label: android
|apiPackage|package for generated api classes| |null|
|artifactId|artifactId for use in the generated build.gradle and pom.xml| |null|
|artifactVersion|artifact version for use in the generated build.gradle and pom.xml| |null|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|groupId|groupId for use in the generated build.gradle and pom.xml| |null|
|invokerPackage|root package for generated code| |null|
diff --git a/docs/generators/apache2.md b/docs/generators/apache2.md
index 599189a5598..3f183ffdf53 100644
--- a/docs/generators/apache2.md
+++ b/docs/generators/apache2.md
@@ -6,6 +6,8 @@ sidebar_label: apache2
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/apex.md b/docs/generators/apex.md
index 9ead87c94e9..45d0d2a5123 100644
--- a/docs/generators/apex.md
+++ b/docs/generators/apex.md
@@ -9,6 +9,8 @@ sidebar_label: apex
|apiVersion|The Metadata API version number to use for components in this package.| |null|
|buildMethod|The build method for this package.| |null|
|classPrefix|Prefix for generated classes. Set this to avoid overwriting existing classes in your org.| |null|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|namedCredential|The named credential name for the HTTP callouts| |null|
diff --git a/docs/generators/asciidoc.md b/docs/generators/asciidoc.md
index 01683b0a323..ac2d3cca0b6 100644
--- a/docs/generators/asciidoc.md
+++ b/docs/generators/asciidoc.md
@@ -10,6 +10,8 @@ sidebar_label: asciidoc
|appName|short name of the application| |null|
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null|
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|groupId|groupId in generated pom.xml| |null|
|headerAttributes|generation of asciidoc header meta data attributes (set to false to suppress, default: true)| |true|
diff --git a/docs/generators/avro-schema.md b/docs/generators/avro-schema.md
index da33df52001..ba46bc6dc93 100644
--- a/docs/generators/avro-schema.md
+++ b/docs/generators/avro-schema.md
@@ -6,6 +6,8 @@ sidebar_label: avro-schema
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|packageName|package for generated classes (where supported)| |null|
diff --git a/docs/generators/bash.md b/docs/generators/bash.md
index 75dde1d62cd..0e5cbf5cc72 100644
--- a/docs/generators/bash.md
+++ b/docs/generators/bash.md
@@ -9,6 +9,8 @@ sidebar_label: bash
|apiKeyAuthEnvironmentVariable|Name of environment variable where API key can be defined (e.g. PETSTORE_APIKEY='kjhasdGASDa5asdASD')| |false|
|basicAuthEnvironmentVariable|Name of environment variable where username and password can be defined (e.g. PETSTORE_CREDS='username:password')| |null|
|curlOptions|Default cURL options| |null|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|generateBashCompletion|Whether to generate the Bash completion script| |false|
|generateZshCompletion|Whether to generate the Zsh completion script| |false|
diff --git a/docs/generators/c.md b/docs/generators/c.md
index 80e50635f4c..8d467ca2fd0 100644
--- a/docs/generators/c.md
+++ b/docs/generators/c.md
@@ -6,6 +6,8 @@ sidebar_label: c
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
diff --git a/docs/generators/clojure.md b/docs/generators/clojure.md
index 0cf52175e71..af43ffffe77 100644
--- a/docs/generators/clojure.md
+++ b/docs/generators/clojure.md
@@ -7,6 +7,8 @@ sidebar_label: clojure
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|baseNamespace|the base/top namespace (Default: generated from projectName)| |null|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/cpp-qt5-client.md b/docs/generators/cpp-qt5-client.md
index 8e2bf7ab98b..bfda02a1d16 100644
--- a/docs/generators/cpp-qt5-client.md
+++ b/docs/generators/cpp-qt5-client.md
@@ -8,6 +8,8 @@ sidebar_label: cpp-qt5-client
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|contentCompression|Enable Compressed Content Encoding for requests and responses| |false|
|cppNamespace|C++ namespace (convention: name::space::for::api).| |OpenAPI|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelNamePrefix|Prefix that will be prepended to all model names.| |OAI|
diff --git a/docs/generators/cpp-qt5-qhttpengine-server.md b/docs/generators/cpp-qt5-qhttpengine-server.md
index 9e2f0e75e5c..bbb1852e231 100644
--- a/docs/generators/cpp-qt5-qhttpengine-server.md
+++ b/docs/generators/cpp-qt5-qhttpengine-server.md
@@ -8,6 +8,8 @@ sidebar_label: cpp-qt5-qhttpengine-server
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|contentCompression|Enable Compressed Content Encoding for requests and responses| |false|
|cppNamespace|C++ namespace (convention: name::space::for::api).| |OpenAPI|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelNamePrefix|Prefix that will be prepended to all model names.| |OAI|
diff --git a/docs/generators/cpp-tizen.md b/docs/generators/cpp-tizen.md
index dd887f70478..5bc03d3fbab 100644
--- a/docs/generators/cpp-tizen.md
+++ b/docs/generators/cpp-tizen.md
@@ -6,6 +6,8 @@ sidebar_label: cpp-tizen
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
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.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|optionalProjectFile|Generate Build.cs| |true|
diff --git a/docs/generators/cwiki.md b/docs/generators/cwiki.md
index 2804a1bb2b8..c0bb03f3930 100644
--- a/docs/generators/cwiki.md
+++ b/docs/generators/cwiki.md
@@ -10,6 +10,8 @@ sidebar_label: cwiki
|appName|short name of the application| |null|
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null|
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|groupId|groupId in generated pom.xml| |null|
|infoEmail|an email address to contact for inquiries about the application| |null|
diff --git a/docs/generators/dart-dio.md b/docs/generators/dart-dio.md
index 5bab2b35a21..e1c1e26c7f1 100644
--- a/docs/generators/dart-dio.md
+++ b/docs/generators/dart-dio.md
@@ -8,6 +8,8 @@ sidebar_label: dart-dio
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|browserClient|Is the client browser based (for Dart 1.x only)| |null|
|dateLibrary|Option. Date library to use|- **core**
- Dart core library (DateTime)
- **timemachine**
- Time Machine is date and time library for Flutter, Web, and Server with support for timezones, calendars, cultures, formatting and parsing.
|core|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|nullableFields|Is the null fields should be in the JSON payload| |null|
diff --git a/docs/generators/dart-jaguar.md b/docs/generators/dart-jaguar.md
index a23282c5095..5659caf8668 100644
--- a/docs/generators/dart-jaguar.md
+++ b/docs/generators/dart-jaguar.md
@@ -7,6 +7,8 @@ sidebar_label: dart-jaguar
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|browserClient|Is the client browser based (for Dart 1.x only)| |null|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|nullableFields|Is the null fields should be in the JSON payload| |null|
diff --git a/docs/generators/dart.md b/docs/generators/dart.md
index b6ff9ba8eef..c4ee6f36b2e 100644
--- a/docs/generators/dart.md
+++ b/docs/generators/dart.md
@@ -7,6 +7,8 @@ sidebar_label: dart
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|browserClient|Is the client browser based (for Dart 1.x only)| |null|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/dynamic-html.md b/docs/generators/dynamic-html.md
index 9766b76b426..50ad9583c32 100644
--- a/docs/generators/dynamic-html.md
+++ b/docs/generators/dynamic-html.md
@@ -8,6 +8,8 @@ sidebar_label: dynamic-html
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null|
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|groupId|groupId in generated pom.xml| |null|
|invokerPackage|root package for generated code| |null|
diff --git a/docs/generators/elixir.md b/docs/generators/elixir.md
index 9b7b08bd44b..45acc262f67 100644
--- a/docs/generators/elixir.md
+++ b/docs/generators/elixir.md
@@ -6,6 +6,8 @@ sidebar_label: elixir
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|invokerPackage|The main namespace to use for all classes. e.g. Yay.Pets| |null|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
diff --git a/docs/generators/fsharp-functions.md b/docs/generators/fsharp-functions.md
index 07b7aa3ded2..ec2f54a8cd7 100644
--- a/docs/generators/fsharp-functions.md
+++ b/docs/generators/fsharp-functions.md
@@ -6,6 +6,8 @@ sidebar_label: fsharp-functions
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|licenseName|The name of the license| |NoLicense|
diff --git a/docs/generators/groovy.md b/docs/generators/groovy.md
index 4dd2d48a5c8..6ace5afab9e 100644
--- a/docs/generators/groovy.md
+++ b/docs/generators/groovy.md
@@ -18,6 +18,8 @@ sidebar_label: groovy
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
diff --git a/docs/generators/haskell-http-client.md b/docs/generators/haskell-http-client.md
index a1ecfc5a4b0..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.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|generateEnums|Generate specific datatypes for OpenAPI enums| |true|
|generateFormUrlEncodedInstances|Generate FromForm/ToForm instances for models that are used by operations that produce or consume application/x-www-form-urlencoded| |true|
diff --git a/docs/generators/haskell.md b/docs/generators/haskell.md
index 1fef8d922d2..bea5cef5a62 100644
--- a/docs/generators/haskell.md
+++ b/docs/generators/haskell.md
@@ -7,6 +7,8 @@ sidebar_label: haskell
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|apiPackage|package for generated api classes| |null|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelPackage|package for generated models| |null|
diff --git a/docs/generators/html.md b/docs/generators/html.md
index b5603e1888a..7d03a4b1591 100644
--- a/docs/generators/html.md
+++ b/docs/generators/html.md
@@ -10,6 +10,8 @@ sidebar_label: html
|appName|short name of the application| |null|
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null|
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|groupId|groupId in generated pom.xml| |null|
|infoEmail|an email address to contact for inquiries about the application| |null|
diff --git a/docs/generators/html2.md b/docs/generators/html2.md
index 6641bcfa3e4..1b3b2d572a9 100644
--- a/docs/generators/html2.md
+++ b/docs/generators/html2.md
@@ -10,6 +10,8 @@ sidebar_label: html2
|appName|short name of the application| |null|
|artifactId|artifactId in generated pom.xml. This also becomes part of the generated library's filename| |null|
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |null|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|groupId|groupId in generated pom.xml| |null|
|infoEmail|an email address to contact for inquiries about the application| |null|
diff --git a/docs/generators/java-inflector.md b/docs/generators/java-inflector.md
index 0b6f2cff5b9..e539008e605 100644
--- a/docs/generators/java-inflector.md
+++ b/docs/generators/java-inflector.md
@@ -20,6 +20,8 @@ sidebar_label: java-inflector
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
diff --git a/docs/generators/java-msf4j.md b/docs/generators/java-msf4j.md
index ce767ba3394..e11b4275c90 100644
--- a/docs/generators/java-msf4j.md
+++ b/docs/generators/java-msf4j.md
@@ -20,6 +20,8 @@ sidebar_label: java-msf4j
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
diff --git a/docs/generators/java-pkmst.md b/docs/generators/java-pkmst.md
index 01b1d565aa1..5076c759329 100644
--- a/docs/generators/java-pkmst.md
+++ b/docs/generators/java-pkmst.md
@@ -21,6 +21,8 @@ sidebar_label: java-pkmst
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|eurekaUri|Eureka URI| |null|
diff --git a/docs/generators/java-play-framework.md b/docs/generators/java-play-framework.md
index 474f2fe1cd2..aefc44cd2e0 100644
--- a/docs/generators/java-play-framework.md
+++ b/docs/generators/java-play-framework.md
@@ -23,6 +23,8 @@ sidebar_label: java-play-framework
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
diff --git a/docs/generators/java-undertow-server.md b/docs/generators/java-undertow-server.md
index ddf5fc8c899..354a67db6cf 100644
--- a/docs/generators/java-undertow-server.md
+++ b/docs/generators/java-undertow-server.md
@@ -20,6 +20,8 @@ sidebar_label: java-undertow-server
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
diff --git a/docs/generators/java-vertx-web.md b/docs/generators/java-vertx-web.md
index fed507c1194..d0f2dbd0bce 100644
--- a/docs/generators/java-vertx-web.md
+++ b/docs/generators/java-vertx-web.md
@@ -20,6 +20,8 @@ sidebar_label: java-vertx-web
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
diff --git a/docs/generators/java-vertx.md b/docs/generators/java-vertx.md
index 24ed9d8eddf..f0bfea0446a 100644
--- a/docs/generators/java-vertx.md
+++ b/docs/generators/java-vertx.md
@@ -20,6 +20,8 @@ sidebar_label: java-vertx
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
diff --git a/docs/generators/java.md b/docs/generators/java.md
index d71047a8c3a..3d0d3afda00 100644
--- a/docs/generators/java.md
+++ b/docs/generators/java.md
@@ -22,6 +22,8 @@ sidebar_label: java
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|feignVersion|Version of OpenFeign: '10.x' (default), '9.x' (deprecated)| |false|
diff --git a/docs/generators/javascript-apollo.md b/docs/generators/javascript-apollo.md
index ca26bb0c061..83a11b96146 100644
--- a/docs/generators/javascript-apollo.md
+++ b/docs/generators/javascript-apollo.md
@@ -7,6 +7,8 @@ sidebar_label: javascript-apollo
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|apiPackage|package for generated api classes| |null|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|emitJSDoc|generate JSDoc comments| |true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
diff --git a/docs/generators/javascript-closure-angular.md b/docs/generators/javascript-closure-angular.md
index e870e567eac..10eae6c4653 100644
--- a/docs/generators/javascript-closure-angular.md
+++ b/docs/generators/javascript-closure-angular.md
@@ -6,6 +6,8 @@ sidebar_label: javascript-closure-angular
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
diff --git a/docs/generators/javascript-flowtyped.md b/docs/generators/javascript-flowtyped.md
index 8c7f5973aa7..50392d647cb 100644
--- a/docs/generators/javascript-flowtyped.md
+++ b/docs/generators/javascript-flowtyped.md
@@ -6,6 +6,8 @@ sidebar_label: javascript-flowtyped
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|enumNameSuffix|Suffix that will be appended to all enum names.| |Enum|
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase|
diff --git a/docs/generators/javascript.md b/docs/generators/javascript.md
index 2fd4170f9b2..82756eb1d5d 100644
--- a/docs/generators/javascript.md
+++ b/docs/generators/javascript.md
@@ -7,6 +7,8 @@ sidebar_label: javascript
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|apiPackage|package for generated api classes| |null|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|emitJSDoc|generate JSDoc comments| |true|
|emitModelMethods|generate getters and setters for model properties| |false|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
diff --git a/docs/generators/jaxrs-cxf-cdi.md b/docs/generators/jaxrs-cxf-cdi.md
index 41fd45fd373..703ae43da8d 100644
--- a/docs/generators/jaxrs-cxf-cdi.md
+++ b/docs/generators/jaxrs-cxf-cdi.md
@@ -20,6 +20,8 @@ sidebar_label: jaxrs-cxf-cdi
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
diff --git a/docs/generators/jaxrs-cxf-client.md b/docs/generators/jaxrs-cxf-client.md
index fa1460bdb30..f4c76df0005 100644
--- a/docs/generators/jaxrs-cxf-client.md
+++ b/docs/generators/jaxrs-cxf-client.md
@@ -20,6 +20,8 @@ sidebar_label: jaxrs-cxf-client
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
diff --git a/docs/generators/jaxrs-cxf-extended.md b/docs/generators/jaxrs-cxf-extended.md
index 192f1998a1c..ee4f8c806ea 100644
--- a/docs/generators/jaxrs-cxf-extended.md
+++ b/docs/generators/jaxrs-cxf-extended.md
@@ -21,6 +21,8 @@ sidebar_label: jaxrs-cxf-extended
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
diff --git a/docs/generators/jaxrs-cxf.md b/docs/generators/jaxrs-cxf.md
index 2254f2ac3a8..1b92b5adb0c 100644
--- a/docs/generators/jaxrs-cxf.md
+++ b/docs/generators/jaxrs-cxf.md
@@ -21,6 +21,8 @@ sidebar_label: jaxrs-cxf
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
diff --git a/docs/generators/jaxrs-jersey.md b/docs/generators/jaxrs-jersey.md
index 23a9b9c7d76..38904348f0c 100644
--- a/docs/generators/jaxrs-jersey.md
+++ b/docs/generators/jaxrs-jersey.md
@@ -20,6 +20,8 @@ sidebar_label: jaxrs-jersey
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
diff --git a/docs/generators/jaxrs-resteasy-eap.md b/docs/generators/jaxrs-resteasy-eap.md
index b243da65f08..94d017ba9b2 100644
--- a/docs/generators/jaxrs-resteasy-eap.md
+++ b/docs/generators/jaxrs-resteasy-eap.md
@@ -20,6 +20,8 @@ sidebar_label: jaxrs-resteasy-eap
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
diff --git a/docs/generators/jaxrs-resteasy.md b/docs/generators/jaxrs-resteasy.md
index f65d96401bc..d926832f249 100644
--- a/docs/generators/jaxrs-resteasy.md
+++ b/docs/generators/jaxrs-resteasy.md
@@ -20,6 +20,8 @@ sidebar_label: jaxrs-resteasy
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
diff --git a/docs/generators/jaxrs-spec.md b/docs/generators/jaxrs-spec.md
index 31d624bca53..c33c645b7df 100644
--- a/docs/generators/jaxrs-spec.md
+++ b/docs/generators/jaxrs-spec.md
@@ -20,6 +20,8 @@ sidebar_label: jaxrs-spec
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
diff --git a/docs/generators/jmeter.md b/docs/generators/jmeter.md
index c3a201424d6..aa08a31ad00 100644
--- a/docs/generators/jmeter.md
+++ b/docs/generators/jmeter.md
@@ -6,6 +6,8 @@ sidebar_label: jmeter
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/k6.md b/docs/generators/k6.md
index 7e53e811f52..92b6eef3323 100644
--- a/docs/generators/k6.md
+++ b/docs/generators/k6.md
@@ -6,6 +6,8 @@ sidebar_label: k6
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/markdown.md b/docs/generators/markdown.md
index 8e3566df531..42b38b611cc 100644
--- a/docs/generators/markdown.md
+++ b/docs/generators/markdown.md
@@ -6,6 +6,8 @@ sidebar_label: markdown
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/nim.md b/docs/generators/nim.md
index 6a36b277593..f92d1bdf31a 100644
--- a/docs/generators/nim.md
+++ b/docs/generators/nim.md
@@ -6,6 +6,8 @@ sidebar_label: nim
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/nodejs-express-server.md b/docs/generators/nodejs-express-server.md
index 5c5b3e44a5f..b90bafa673a 100644
--- a/docs/generators/nodejs-express-server.md
+++ b/docs/generators/nodejs-express-server.md
@@ -6,6 +6,8 @@ sidebar_label: nodejs-express-server
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/nodejs-server-deprecated.md b/docs/generators/nodejs-server-deprecated.md
index 74b494ef0d2..f109ef771fd 100644
--- a/docs/generators/nodejs-server-deprecated.md
+++ b/docs/generators/nodejs-server-deprecated.md
@@ -6,6 +6,8 @@ sidebar_label: nodejs-server-deprecated
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|exportedName|When the generated code will be deployed to Google Cloud Functions, this option can be used to update the name of the exported function. By default, it refers to the basePath. This does not affect normal standalone nodejs server code.| |null|
|googleCloudFunctions|When specified, it will generate the code which runs within Google Cloud Functions instead of standalone Node.JS server. See https://cloud.google.com/functions/docs/quickstart for the details of how to deploy the generated code.| |false|
diff --git a/docs/generators/ocaml.md b/docs/generators/ocaml.md
index 6dcc9dd7ae5..9d6ac07fb39 100644
--- a/docs/generators/ocaml.md
+++ b/docs/generators/ocaml.md
@@ -6,6 +6,8 @@ sidebar_label: ocaml
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/openapi-yaml.md b/docs/generators/openapi-yaml.md
index 704efea2209..6c2056c1d9b 100644
--- a/docs/generators/openapi-yaml.md
+++ b/docs/generators/openapi-yaml.md
@@ -6,6 +6,8 @@ sidebar_label: openapi-yaml
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|outputFile|Output filename| |openapi/openapi.yaml|
diff --git a/docs/generators/openapi.md b/docs/generators/openapi.md
index e2a97f80bb1..d4d4c7aa603 100644
--- a/docs/generators/openapi.md
+++ b/docs/generators/openapi.md
@@ -6,6 +6,8 @@ sidebar_label: openapi
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/php-laravel.md b/docs/generators/php-laravel.md
index cc5e5f1e1b5..550361b7a32 100644
--- a/docs/generators/php-laravel.md
+++ b/docs/generators/php-laravel.md
@@ -8,6 +8,8 @@ sidebar_label: php-laravel
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|apiPackage|package for generated api classes| |null|
|artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
diff --git a/docs/generators/php-lumen.md b/docs/generators/php-lumen.md
index d85b094b070..2f30bbb7818 100644
--- a/docs/generators/php-lumen.md
+++ b/docs/generators/php-lumen.md
@@ -8,6 +8,8 @@ sidebar_label: php-lumen
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|apiPackage|package for generated api classes| |null|
|artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
diff --git a/docs/generators/php-silex-deprecated.md b/docs/generators/php-silex-deprecated.md
index 1a18db41c36..69d16ec9bbb 100644
--- a/docs/generators/php-silex-deprecated.md
+++ b/docs/generators/php-silex-deprecated.md
@@ -6,6 +6,8 @@ sidebar_label: php-silex-deprecated
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/php-slim-deprecated.md b/docs/generators/php-slim-deprecated.md
index d97ebb8060d..834d7d17e87 100644
--- a/docs/generators/php-slim-deprecated.md
+++ b/docs/generators/php-slim-deprecated.md
@@ -8,6 +8,8 @@ sidebar_label: php-slim-deprecated
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|apiPackage|package for generated api classes| |null|
|artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
diff --git a/docs/generators/php-slim4.md b/docs/generators/php-slim4.md
index ff5ee683ab1..4bb03dc60e2 100644
--- a/docs/generators/php-slim4.md
+++ b/docs/generators/php-slim4.md
@@ -8,6 +8,8 @@ sidebar_label: php-slim4
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|apiPackage|package for generated api classes| |null|
|artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
diff --git a/docs/generators/php-symfony.md b/docs/generators/php-symfony.md
index 1c781a04c97..dd0faa80256 100644
--- a/docs/generators/php-symfony.md
+++ b/docs/generators/php-symfony.md
@@ -12,6 +12,8 @@ sidebar_label: php-symfony
|bundleName|The name of the Symfony bundle. The template uses {{bundleName}}| |null|
|composerProjectName|The project name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. petstore-client| |null|
|composerVendorName|The vendor name used in the composer package name. The template uses {{composerVendorName}}/{{composerProjectName}} for the composer package name. e.g. yaypets| |null|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null|
diff --git a/docs/generators/php-ze-ph.md b/docs/generators/php-ze-ph.md
index 04fd2bda5b5..04ce9d997d9 100644
--- a/docs/generators/php-ze-ph.md
+++ b/docs/generators/php-ze-ph.md
@@ -8,6 +8,8 @@ sidebar_label: php-ze-ph
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|apiPackage|package for generated api classes| |null|
|artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
diff --git a/docs/generators/php.md b/docs/generators/php.md
index 329969e42fd..6d84ee3fbf4 100644
--- a/docs/generators/php.md
+++ b/docs/generators/php.md
@@ -8,6 +8,8 @@ sidebar_label: php
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|apiPackage|package for generated api classes| |null|
|artifactVersion|The version to use in the composer package version field. e.g. 1.2.3| |null|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|hideGenerationTimestamp|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |true|
|invokerPackage|The main namespace to use for all classes. e.g. Yay\Pets| |null|
diff --git a/docs/generators/plantuml.md b/docs/generators/plantuml.md
index d559ea7ebb3..6f2f76823cf 100644
--- a/docs/generators/plantuml.md
+++ b/docs/generators/plantuml.md
@@ -6,6 +6,8 @@ sidebar_label: plantuml
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|prependFormOrBodyParameters|Add form or body parameters to the beginning of the parameter list.| |false|
diff --git a/docs/generators/python-aiohttp.md b/docs/generators/python-aiohttp.md
index 288f4e1f8b9..562d371110d 100644
--- a/docs/generators/python-aiohttp.md
+++ b/docs/generators/python-aiohttp.md
@@ -8,6 +8,8 @@ sidebar_label: python-aiohttp
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|controllerPackage|controller package| |controllers|
|defaultController|default controller| |default_controller|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|packageName|python package name (convention: snake_case).| |openapi_server|
diff --git a/docs/generators/python-blueplanet.md b/docs/generators/python-blueplanet.md
index c0ec66d38c1..c4f3ef71d83 100644
--- a/docs/generators/python-blueplanet.md
+++ b/docs/generators/python-blueplanet.md
@@ -8,6 +8,8 @@ sidebar_label: python-blueplanet
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|controllerPackage|controller package| |controllers|
|defaultController|default controller| |default_controller|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|packageName|python package name (convention: snake_case).| |openapi_server|
diff --git a/docs/generators/python-flask.md b/docs/generators/python-flask.md
index cc7c312d982..77ea8871a3e 100644
--- a/docs/generators/python-flask.md
+++ b/docs/generators/python-flask.md
@@ -8,6 +8,8 @@ sidebar_label: python-flask
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|controllerPackage|controller package| |controllers|
|defaultController|default controller| |default_controller|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|packageName|python package name (convention: snake_case).| |openapi_server|
diff --git a/docs/generators/ruby.md b/docs/generators/ruby.md
index 72dc31253a7..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.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|gemAuthor|gem author (only one is supported).| |null|
|gemAuthorEmail|gem author email (only one is supported).| |null|
diff --git a/docs/generators/scala-akka-http-server.md b/docs/generators/scala-akka-http-server.md
index ce885201ee9..96e31f09055 100644
--- a/docs/generators/scala-akka-http-server.md
+++ b/docs/generators/scala-akka-http-server.md
@@ -11,6 +11,8 @@ sidebar_label: scala-akka-http-server
|artifactId|artifactId| |openapi-scala-akka-http-server|
|artifactVersion|artifact version in generated pom.xml. This also becomes part of the generated library's filename| |1.0.0|
|dateLibrary|Option. Date library to use|- **joda**
- Joda (for legacy app)
- **java8**
- Java 8 native JSR310 (prefered for JDK 1.8+)
|java8|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|groupId|groupId in generated pom.xml| |org.openapitools|
|invokerPackage|root package for generated code| |org.openapitools.server|
diff --git a/docs/generators/scala-akka.md b/docs/generators/scala-akka.md
index 0faa17e202b..2bad9c82b6a 100644
--- a/docs/generators/scala-akka.md
+++ b/docs/generators/scala-akka.md
@@ -8,6 +8,8 @@ sidebar_label: scala-akka
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|apiPackage|package for generated api classes| |null|
|dateLibrary|Option. Date library to use|- **joda**
- Joda (for legacy app)
- **java8**
- Java 8 native JSR310 (prefered for JDK 1.8+)
|java8|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|mainPackage|Top-level package name, which defines 'apiPackage', 'modelPackage', 'invokerPackage'| |org.openapitools.client|
diff --git a/docs/generators/scala-gatling.md b/docs/generators/scala-gatling.md
index 3a957c1cb09..b59c37ee122 100644
--- a/docs/generators/scala-gatling.md
+++ b/docs/generators/scala-gatling.md
@@ -8,6 +8,8 @@ sidebar_label: scala-gatling
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|apiPackage|package for generated api classes| |null|
|dateLibrary|Option. Date library to use|- **joda**
- Joda (for legacy app)
- **java8**
- Java 8 native JSR310 (prefered for JDK 1.8+)
|java8|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelPackage|package for generated models| |null|
diff --git a/docs/generators/scala-httpclient-deprecated.md b/docs/generators/scala-httpclient-deprecated.md
index 0a4015fbac0..e0d631f8645 100644
--- a/docs/generators/scala-httpclient-deprecated.md
+++ b/docs/generators/scala-httpclient-deprecated.md
@@ -8,6 +8,8 @@ sidebar_label: scala-httpclient-deprecated
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|apiPackage|package for generated api classes| |null|
|dateLibrary|Option. Date library to use|- **joda**
- Joda (for legacy app)
- **java8**
- Java 8 native JSR310 (prefered for JDK 1.8+)
|java8|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelPackage|package for generated models| |null|
diff --git a/docs/generators/scala-lagom-server.md b/docs/generators/scala-lagom-server.md
index cef8bf855c0..2ed7519b665 100644
--- a/docs/generators/scala-lagom-server.md
+++ b/docs/generators/scala-lagom-server.md
@@ -8,6 +8,8 @@ sidebar_label: scala-lagom-server
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|apiPackage|package for generated api classes| |null|
|dateLibrary|Option. Date library to use|- **joda**
- Joda (for legacy app)
- **java8**
- Java 8 native JSR310 (prefered for JDK 1.8+)
|java8|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelPackage|package for generated models| |null|
diff --git a/docs/generators/scala-play-server.md b/docs/generators/scala-play-server.md
index dea0eb49248..d46eb3a9fbe 100644
--- a/docs/generators/scala-play-server.md
+++ b/docs/generators/scala-play-server.md
@@ -8,6 +8,8 @@ sidebar_label: scala-play-server
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|apiPackage|package for generated api classes| |null|
|basePackage|Base package in which supporting classes are generated.| |org.openapitools|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|generateCustomExceptions|If set, generates custom exception types.| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
diff --git a/docs/generators/scala-sttp.md b/docs/generators/scala-sttp.md
index 27a8b862b10..05cbbe99dea 100644
--- a/docs/generators/scala-sttp.md
+++ b/docs/generators/scala-sttp.md
@@ -8,6 +8,8 @@ sidebar_label: scala-sttp
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|apiPackage|package for generated api classes| |null|
|dateLibrary|Option. Date library to use|- **joda**
- Joda (for legacy app)
- **java8**
- Java 8 native JSR310 (prefered for JDK 1.8+)
|java8|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|mainPackage|Top-level package name, which defines 'apiPackage', 'modelPackage', 'invokerPackage'| |org.openapitools.client|
diff --git a/docs/generators/scalatra.md b/docs/generators/scalatra.md
index 39eb4dc8ca6..f9edf8f3875 100644
--- a/docs/generators/scalatra.md
+++ b/docs/generators/scalatra.md
@@ -8,6 +8,8 @@ sidebar_label: scalatra
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|apiPackage|package for generated api classes| |null|
|dateLibrary|Option. Date library to use|- **joda**
- Joda (for legacy app)
- **java8**
- Java 8 native JSR310 (prefered for JDK 1.8+)
|java8|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelPackage|package for generated models| |null|
diff --git a/docs/generators/scalaz.md b/docs/generators/scalaz.md
index f8279d1df61..1d62a3e5ff0 100644
--- a/docs/generators/scalaz.md
+++ b/docs/generators/scalaz.md
@@ -8,6 +8,8 @@ sidebar_label: scalaz
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|apiPackage|package for generated api classes| |null|
|dateLibrary|Option. Date library to use|- **joda**
- Joda (for legacy app)
- **java8**
- Java 8 native JSR310 (prefered for JDK 1.8+)
|java8|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
|modelPackage|package for generated models| |null|
diff --git a/docs/generators/spring.md b/docs/generators/spring.md
index ed4b48bc018..fb93b92db40 100644
--- a/docs/generators/spring.md
+++ b/docs/generators/spring.md
@@ -25,6 +25,8 @@ sidebar_label: spring
|developerOrganization|developer organization in generated pom.xml| |OpenAPITools.org|
|developerOrganizationUrl|developer organization URL in generated pom.xml| |http://openapitools.org|
|disableHtmlEscaping|Disable HTML escaping of JSON strings when using gson (needed to avoid problems with byte[] fields)| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|discriminatorCaseSensitive|Whether the discriminator value lookup should be case-sensitive or not. This option only works for Java API client| |true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|fullJavaUtil|whether to use fully qualified name for classes under java.util. This option only works for Java API client| |false|
diff --git a/docs/generators/swift4-deprecated.md b/docs/generators/swift4-deprecated.md
index a4da5435f68..2ad3deb81c7 100644
--- a/docs/generators/swift4-deprecated.md
+++ b/docs/generators/swift4-deprecated.md
@@ -6,6 +6,8 @@ sidebar_label: swift4-deprecated
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
diff --git a/docs/generators/swift5.md b/docs/generators/swift5.md
index 9b172cdf785..53e8733dec2 100644
--- a/docs/generators/swift5.md
+++ b/docs/generators/swift5.md
@@ -7,6 +7,8 @@ sidebar_label: swift5
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|apiNamePrefix|Prefix that will be appended to all API names ('tags'). Default: empty string. e.g. Pet => Pet.| |null|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|legacyDiscriminatorBehavior|This flag is used by OpenAPITools codegen to influence the processing of the discriminator attribute in OpenAPI documents. This flag has no impact if the OAS document does not use the discriminator attribute. The default value of this flag is set in each language-specific code generator (e.g. Python, Java, go...)using the method toModelName. Note to developers supporting a language generator in OpenAPITools; to fully support the discriminator attribute as defined in the OAS specification 3.x, language generators should set this flag to true by default; however this requires updating the mustache templates to generate a language-specific discriminator lookup function that iterates over {{#mappedModels}} and does not iterate over {{children}}, {{#anyOf}}, or {{#oneOf}}.|- **true**
- The mapping in the discriminator includes descendent schemas that allOf inherit from self and the discriminator mapping schemas in the OAS document.
- **false**
- The mapping in the discriminator includes any descendent schemas that allOf inherit from self, any oneOf schemas, any anyOf schemas, any x-discriminator-values, and the discriminator mapping schemas in the OAS document AND Codegen validates that oneOf and anyOf schemas contain the required discriminator and throws an error if the discriminator is missing.
|true|
diff --git a/docs/generators/typescript-angular.md b/docs/generators/typescript-angular.md
index adbda0072c9..79974ab1641 100644
--- a/docs/generators/typescript-angular.md
+++ b/docs/generators/typescript-angular.md
@@ -7,6 +7,8 @@ sidebar_label: typescript-angular
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
|apiModulePrefix|The prefix of the generated ApiModule.| |null|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|enumNameSuffix|Suffix that will be appended to all enum names.| |Enum|
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase|
diff --git a/docs/generators/typescript-angularjs.md b/docs/generators/typescript-angularjs.md
index 08a4bdad894..bd9f87fdb25 100644
--- a/docs/generators/typescript-angularjs.md
+++ b/docs/generators/typescript-angularjs.md
@@ -6,6 +6,8 @@ sidebar_label: typescript-angularjs
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|enumNameSuffix|Suffix that will be appended to all enum names.| |Enum|
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase|
diff --git a/docs/generators/typescript-aurelia.md b/docs/generators/typescript-aurelia.md
index 55cc57522bb..3e39180156b 100644
--- a/docs/generators/typescript-aurelia.md
+++ b/docs/generators/typescript-aurelia.md
@@ -6,6 +6,8 @@ sidebar_label: typescript-aurelia
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|enumNameSuffix|Suffix that will be appended to all enum names.| |Enum|
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase|
diff --git a/docs/generators/typescript-axios.md b/docs/generators/typescript-axios.md
index 896b46d3eb6..b2ab58b6adc 100644
--- a/docs/generators/typescript-axios.md
+++ b/docs/generators/typescript-axios.md
@@ -6,6 +6,8 @@ sidebar_label: typescript-axios
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|enumNameSuffix|Suffix that will be appended to all enum names.| |Enum|
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase|
diff --git a/docs/generators/typescript-fetch.md b/docs/generators/typescript-fetch.md
index 5fe6e898708..037b7d01ca6 100644
--- a/docs/generators/typescript-fetch.md
+++ b/docs/generators/typescript-fetch.md
@@ -6,6 +6,8 @@ sidebar_label: typescript-fetch
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|enumNameSuffix|Suffix that will be appended to all enum names.| |Enum|
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase|
diff --git a/docs/generators/typescript-inversify.md b/docs/generators/typescript-inversify.md
index a979fd102cb..3788b8a67d5 100644
--- a/docs/generators/typescript-inversify.md
+++ b/docs/generators/typescript-inversify.md
@@ -6,6 +6,8 @@ sidebar_label: typescript-inversify
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|enumNameSuffix|Suffix that will be appended to all enum names.| |Enum|
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase|
diff --git a/docs/generators/typescript-jquery.md b/docs/generators/typescript-jquery.md
index 5616ceb5862..16460679ccd 100644
--- a/docs/generators/typescript-jquery.md
+++ b/docs/generators/typescript-jquery.md
@@ -6,6 +6,8 @@ sidebar_label: typescript-jquery
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|enumNameSuffix|Suffix that will be appended to all enum names.| |Enum|
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase|
diff --git a/docs/generators/typescript-node.md b/docs/generators/typescript-node.md
index 4462d0e3798..af0f5286f1b 100644
--- a/docs/generators/typescript-node.md
+++ b/docs/generators/typescript-node.md
@@ -6,6 +6,8 @@ sidebar_label: typescript-node
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|enumNameSuffix|Suffix that will be appended to all enum names.| |Enum|
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase|
diff --git a/docs/generators/typescript-redux-query.md b/docs/generators/typescript-redux-query.md
index 15900a22a7d..8f35944f8b7 100644
--- a/docs/generators/typescript-redux-query.md
+++ b/docs/generators/typescript-redux-query.md
@@ -6,6 +6,8 @@ sidebar_label: typescript-redux-query
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|enumNameSuffix|Suffix that will be appended to all enum names.| |Enum|
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase|
diff --git a/docs/generators/typescript-rxjs.md b/docs/generators/typescript-rxjs.md
index e080a0761bd..41d58058a86 100644
--- a/docs/generators/typescript-rxjs.md
+++ b/docs/generators/typescript-rxjs.md
@@ -6,6 +6,8 @@ sidebar_label: typescript-rxjs
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
|allowUnicodeIdentifiers|boolean, toggles whether unicode identifiers are allowed in names or not, default is false| |false|
+|disallowAdditionalPropertiesIfNotPresent|Specify the behavior when the 'additionalProperties' keyword is not present in the OAS document
+If false: the 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications. If true: when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.This setting is currently ignored for OAS 2.0 documents: 1) When the 'additionalProperties' keyword is not present in a 2.0 schema, additional properties are NOT allowed. 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as if additional properties are NOT allowed.Note: the root cause are issues #1369 and #1371, which must be resolved in the swagger-parser project.|- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- when the 'additionalProperties' keyword is not present in a schema, the value of 'additionalProperties' is automatically set to false, i.e. no additional properties are allowed. Note: this mode is not compliant with the JSON schema specification. This is the original openapi-generator behavior.
|true|
|ensureUniqueParams|Whether to ensure parameter names are unique in an operation (rename parameters that are not).| |true|
|enumNameSuffix|Suffix that will be appended to all enum names.| |Enum|
|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |PascalCase|
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..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,4 +359,20 @@ 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.";
+ 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. " +
+ " 2) Boolean values of the 'additionalProperties' keyword are ignored. It's as 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/CodegenModel.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java
index 68b26dbf496..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
@@ -102,7 +102,31 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
public Map vendorExtensions = new HashMap();
- //The type of the value from additional properties. Used in map like objects.
+ /**
+ * The type of the value for the additionalProperties keyword in the OAS document.
+ * Used in map like objects, including composed schemas.
+ *
+ * In most programming languages, the additional (undeclared) properties are stored
+ * 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
+ * generated model class may extend from HashMap to store the additional properties.
+ * In that case 'CodegenModel.parent' is set to represent the class hierarchy.
+ * Another way is to use CodegenModel.additionalPropertiesType. A code generator
+ * such as Python does not use class inheritance to model additional properties.
+ *
+ * For example, in the OAS schema below, the schema has a declared 'id' property
+ * and additional, undeclared properties of type 'integer' are allowed.
+ *
+ * type: object
+ * properties:
+ * id:
+ * type: integer
+ * additionalProperties:
+ * type: integer
+ *
+ */
public String additionalPropertiesType;
private Integer maxProperties;
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 08894cd58a4..7a3accd1b58 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;
@@ -176,8 +177,28 @@ public class DefaultCodegen implements CodegenConfig {
protected List cliOptions = new ArrayList();
protected boolean skipOverwrite;
protected boolean removeOperationIdPrefix;
+
+ /**
+ * True if the code generator supports multiple class inheritance.
+ * This is used to model the parent hierarchy based on the 'allOf' composed schemas.
+ */
protected boolean supportsMultipleInheritance;
+ /**
+ * True if the code generator supports 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
+ * 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;
+ /**
+ * True if the language generator supports the 'additionalProperties' keyword
+ * as sibling of a composed (allOf/anyOf/oneOf) schema.
+ * Note: all language generators should support this to comply with the OAS specification.
+ */
+ protected boolean supportsAdditionalPropertiesWithComposedSchema;
protected boolean supportsMixins;
protected Map supportedLibraries = new LinkedHashMap();
protected String library;
@@ -218,6 +239,10 @@ public class DefaultCodegen implements CodegenConfig {
// Support legacy logic for evaluating discriminators
protected boolean legacyDiscriminatorBehavior = true;
+ // Specify what to do if the 'additionalProperties' keyword is not present in a schema.
+ // See CodegenConstants.java for more details.
+ protected boolean disallowAdditionalPropertiesIfNotPresent = true;
+
// make openapi available to all methods
protected OpenAPI openAPI;
@@ -314,6 +339,10 @@ public class DefaultCodegen implements CodegenConfig {
this.setLegacyDiscriminatorBehavior(Boolean.valueOf(additionalProperties
.get(CodegenConstants.LEGACY_DISCRIMINATOR_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()));
+ }
}
/***
@@ -687,9 +716,16 @@ 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;
+ // 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
@@ -786,7 +822,7 @@ public class DefaultCodegen implements CodegenConfig {
addOneOfInterfaceModel((ComposedSchema) items, nOneOf, openAPI);
}
} else if (ModelUtils.isMapSchema(s)) {
- Schema addProps = ModelUtils.getAdditionalProperties(s);
+ Schema addProps = getAdditionalProperties(s);
if (addProps != null && ModelUtils.isComposedSchema(addProps)) {
addOneOfNameExtension((ComposedSchema) addProps, nOneOf);
addOneOfInterfaceModel((ComposedSchema) addProps, nOneOf, openAPI);
@@ -1126,6 +1162,14 @@ public class DefaultCodegen implements CodegenConfig {
this.legacyDiscriminatorBehavior = val;
}
+ public Boolean getDisallowAdditionalPropertiesIfNotPresent() {
+ return disallowAdditionalPropertiesIfNotPresent;
+ }
+
+ public void setDisallowAdditionalPropertiesIfNotPresent(boolean val) {
+ this.disallowAdditionalPropertiesIfNotPresent = val;
+ }
+
public Boolean getAllowUnicodeIdentifiers() {
return allowUnicodeIdentifiers;
}
@@ -1453,6 +1497,22 @@ 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 disallowAdditionalPropertiesIfNotPresentOpt = CliOption.newBoolean(
+ CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT,
+ CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT_DESC).defaultValue(Boolean.TRUE.toString());
+ Map disallowAdditionalPropertiesIfNotPresentOpts = new HashMap<>();
+ disallowAdditionalPropertiesIfNotPresentOpts.put("false",
+ "The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.");
+ 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();
@@ -1585,7 +1645,7 @@ public class DefaultCodegen implements CodegenConfig {
*/
public String toInstantiationType(Schema schema) {
if (ModelUtils.isMapSchema(schema)) {
- Schema additionalProperties = ModelUtils.getAdditionalProperties(schema);
+ Schema additionalProperties = getAdditionalProperties(schema);
String inner = getSchemaType(additionalProperties);
return instantiationTypes.get("map") + "";
} else if (ModelUtils.isArraySchema(schema)) {
@@ -1843,7 +1903,7 @@ public class DefaultCodegen implements CodegenConfig {
}
protected Schema> getSchemaAdditionalProperties(Schema schema) {
- Schema> inner = ModelUtils.getAdditionalProperties(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");
@@ -2006,13 +2066,13 @@ public class DefaultCodegen implements CodegenConfig {
return schema.getFormat();
}
return "string";
- } else if (ModelUtils.isFreeFormObject(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(schema)) {
+ } else if (isAnyTypeSchema(schema)) {
return "AnyType";
} else if (StringUtils.isNotEmpty(schema.getType())) {
LOGGER.warn("Unknown type found in the schema: " + schema.getType());
@@ -2193,7 +2253,7 @@ public class DefaultCodegen implements CodegenConfig {
m.xmlNamespace = schema.getXml().getNamespace();
m.xmlName = schema.getXml().getName();
}
- if (ModelUtils.isAnyTypeSchema(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())) {
@@ -2365,6 +2425,24 @@ public class DefaultCodegen implements CodegenConfig {
addVars(m, unaliasPropertySchema(properties), required, unaliasPropertySchema(allProperties), allRequired);
+ // Per OAS specification, composed schemas may use the 'additionalProperties' keyword.
+ if (supportsAdditionalPropertiesWithComposedSchema) {
+ // Process the schema specified with the 'additionalProperties' keyword.
+ // This will set the 'CodegenModel.additionalPropertiesType' field
+ // and potentially 'Codegen.parent'.
+ //
+ // 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);
+ }
+
+ if (Boolean.TRUE.equals(schema.getNullable())) {
+ m.isNullable = Boolean.TRUE;
+ }
// end of code block for composed schema
} else {
m.dataType = getSchemaType(schema);
@@ -2806,6 +2884,12 @@ public class DefaultCodegen implements CodegenConfig {
return discriminator;
}
+ /**
+ * Handle the model for the 'additionalProperties' keyword in the OAS schema.
+ *
+ * @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);
}
@@ -3051,9 +3135,9 @@ public class DefaultCodegen implements CodegenConfig {
property.hasValidation = true;
}
- } else if (ModelUtils.isFreeFormObject(p)) {
+ } else if (isFreeFormObject(p)) {
property.isFreeFormObject = true;
- } else if (ModelUtils.isAnyTypeSchema(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())) {
@@ -3066,7 +3150,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, getAdditionalProperties(p),
importMapping);
if (innerSchema == null) {
LOGGER.error("Undefined map inner type for `{}`. Default to String.", p.getName());
@@ -3159,7 +3243,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, getAdditionalProperties(p),
importMapping);
if (innerSchema == null) {
LOGGER.error("Undefined map inner type for `{}`. Default to String.", p.getName());
@@ -3168,13 +3252,13 @@ public class DefaultCodegen implements CodegenConfig {
}
CodegenProperty cp = fromProperty("inner", innerSchema);
updatePropertyForMap(property, cp);
- } else if (ModelUtils.isFreeFormObject(p)) {
+ } else if (isFreeFormObject(p)) {
property.isFreeFormObject = true;
property.baseType = getSchemaType(p);
if (languageSpecificPrimitives.contains(property.dataType)) {
property.isPrimitiveType = true;
}
- } else if (ModelUtils.isAnyTypeSchema(p)) {
+ } else if (isAnyTypeSchema(p)) {
property.isAnyType = true;
property.baseType = getSchemaType(p);
if (languageSpecificPrimitives.contains(property.dataType)) {
@@ -3410,7 +3494,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", getAdditionalProperties(responseSchema));
op.returnBaseType = innerProperty.baseType;
} else {
if (cm.complexType != null) {
@@ -4083,7 +4167,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", getAdditionalProperties(parameterSchema));
codegenParameter.items = codegenProperty;
codegenParameter.mostInnerItems = codegenProperty.mostInnerItems;
codegenParameter.baseType = codegenProperty.dataType;
@@ -4505,6 +4589,22 @@ public class DefaultCodegen implements CodegenConfig {
co.baseName = tag;
}
+ /**
+ * Sets the value of the 'model.parent' property in CodegenModel, based on the value
+ * of the 'additionalProperties' keyword. Some language generator use class inheritance
+ * to implement additional properties. For example, in Java the generated model class
+ * has 'extends HashMap' to represent the additional properties.
+ *
+ * TODO: it's not a good idea to use single class inheritance to implement
+ * additionalProperties. That may work for non-composed schemas, but that does not
+ * work for composed 'allOf' schemas. For example, in Java, if additionalProperties
+ * is set to true (which it should be by default, per OAS spec), then the generated
+ * code has extends HashMap. That wouldn't work for composed 'allOf' schemas.
+ *
+ * @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);
@@ -5783,7 +5883,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 = 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");
@@ -5865,7 +5965,7 @@ public class DefaultCodegen implements CodegenConfig {
codegenProperty = codegenProperty.items;
}
}
- } else if (ModelUtils.isFreeFormObject(schema)) {
+ } else if (isFreeFormObject(schema)) {
// HTTP request body is free form object
CodegenProperty codegenProperty = fromProperty("FREE_FORM_REQUEST_BODY", schema);
if (codegenProperty != null) {
@@ -6262,4 +6362,100 @@ 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 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) {
+ return ModelUtils.getAdditionalProperties(openAPI, schema);
+ }
+
}
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 c9e449c6e01..8359682d158 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
@@ -469,7 +469,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 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 properties, String path) {
+ private void flattenProperties(OpenAPI openAPI, Map 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/config/CodegenConfigurator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/config/CodegenConfigurator.java
index 840790ed4c8..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
@@ -463,6 +463,10 @@ public class CodegenConfigurator {
// TODO: Move custom validations to a separate type as part of a "Workflow"
Set validationMessages = new HashSet<>(result.getMessages());
OpenAPI specification = result.getOpenAPI();
+ // 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.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/examples/ExampleGenerator.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/examples/ExampleGenerator.java
index ffc664c3cf4..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 mp = new HashMap();
if (property.getName() != null) {
mp.put(property.getName(),
- resolvePropertyToExample(propertyName, mediaType, ModelUtils.getAdditionalProperties(property), processedModels));
+ resolvePropertyToExample(propertyName, mediaType, ModelUtils.getAdditionalProperties(openAPI, property), processedModels));
} else {
mp.put("key",
- resolvePropertyToExample(propertyName, mediaType, ModelUtils.getAdditionalProperties(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 b3177163df8..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(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 bb2a21d4afa..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(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(ap) == null) {
+ if (getAdditionalProperties(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(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(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 66af4e39a87..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(p);
+ Schema inner = getAdditionalProperties(p);
return getSchemaType(p) + "";
}
return super.getTypeDeclaration(p);
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractEiffelCodegen.java
index 6d8f5e97632..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(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(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 6ec69705188..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(p);
+ Schema inner = getAdditionalProperties(p);
return getSchemaType(p) + "";
}
return super.getTypeDeclaration(p);
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractGoCodegen.java
index 141b2d81594..5a7f9ae4e4f 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 = 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(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 910d1da5008..f4e35763adb 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
@@ -814,11 +814,11 @@ public abstract class AbstractJavaCodegen extends DefaultCodegen implements Code
} else {
pattern = "new HashMap<%s>()";
}
- if (ModelUtils.getAdditionalProperties(schema) == null) {
+ if (getAdditionalProperties(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(getAdditionalProperties(schema)));
Object java8obj = additionalProperties.get("java8");
if (java8obj != null) {
Boolean java8 = Boolean.valueOf(java8obj.toString());
@@ -1654,7 +1654,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(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 05de11aa5c2..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(p);
+ Schema inner = getAdditionalProperties(p);
// Maps will be keyed only by primitive Kotlin string
return getSchemaType(p) + "";
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractPhpCodegen.java
index 7395186f484..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(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 96758042a6f..a2a7d460af6 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
@@ -111,7 +111,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 = getAdditionalProperties(schema);
return getSchemaType(schema) + "";
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractScalaCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/AbstractScalaCodegen.java
index af24ba9c21a..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(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(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(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 95767640988..4b5f43e4600 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
@@ -390,7 +390,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 = 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 1e7349a53bd..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(p);
+ Schema inner = getAdditionalProperties(p);
return getSchemaType(p) + "";
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ApexClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/ApexClientCodegen.java
index 1deb382a6a5..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(p);
+ Schema inner = getAdditionalProperties(p);
String s = inner == null ? "Object" : getTypeDeclaration(inner);
out = String.format(Locale.ROOT, "new Map()", s);
} else if (ModelUtils.isStringSchema(p)) {
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/BashClientCodegen.java
index bf59d7db699..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(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 a12d712c3ff..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(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 3c8d8a3e33d..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(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 1de98be94e7..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(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 88637961ccc..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(p);
+ Schema inner = getAdditionalProperties(p);
return getSchemaType(p) + "";
} 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(getAdditionalProperties(p));
return "std::map()";
} else if (ModelUtils.isArraySchema(p)) {
ArraySchema ap = (ArraySchema) p;
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5AbstractCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppQt5AbstractCodegen.java
index c308a53996e..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(p);
+ Schema inner = getAdditionalProperties(p);
return getSchemaType(p) + "";
} 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 = getAdditionalProperties(p);
return "QMap()";
} else if (ModelUtils.isArraySchema(p)) {
ArraySchema ap = (ArraySchema) p;
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/CppRestSdkClientCodegen.java
index 0dd42392622..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(p);
+ Schema inner = getAdditionalProperties(p);
return getSchemaType(p) + "";
} else if (ModelUtils.isFileSchema(p) || ModelUtils.isBinarySchema(p)) {
return "std::shared_ptr<" + openAPIType + ">";
@@ -382,7 +382,7 @@ public class CppRestSdkClientCodegen extends AbstractCppCodegen {
}
return "0";
} else if (ModelUtils.isMapSchema(p)) {
- String inner = getSchemaType(ModelUtils.getAdditionalProperties(p));
+ String inner = getSchemaType(getAdditionalProperties(p));
return "std::map()";
} 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 (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 3234cfb4c9f..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(p);
+ Schema inner = getAdditionalProperties(p);
return getSchemaType(p) + "";
} 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(getAdditionalProperties(p));
return "std::map()";
} else if (ModelUtils.isArraySchema(p)) {
ArraySchema ap = (ArraySchema) p;
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/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) + "";
}
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..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(p);
+ Schema inner = getAdditionalProperties(p);
return getSchemaType(p) + "";
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/DartDioClientCodegen.java
index 9c06fb029b7..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(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 103ac17700c..72ffa1b9317 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 = 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 b31277f51e8..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(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 1daf144230d..f0676b8e187 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 = 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(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 024447f3dd3..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(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(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 5617b2973da..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(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 6103ae1edc9..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(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(model) != null) {
- String itemType = getSchemaType(ModelUtils.getAdditionalProperties(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 5ba759a3fd7..092ecd65872 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
@@ -613,7 +613,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 = getAdditionalProperties(p);
return "{String: " + getTypeDeclaration(inner) + "}";
}
return super.getTypeDeclaration(p);
@@ -883,8 +883,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 && 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 7cc1215f464..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) + "";
} else if (ModelUtils.isMapSchema(p)) {
- Schema inner = ModelUtils.getAdditionalProperties(p);
+ Schema inner = getAdditionalProperties(p);
return "Object";
} else if (ModelUtils.isFileSchema(p)) {
return "Object";
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/JavascriptFlowtypedClientCodegen.java
index 322b7b98e99..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(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 18330873bcf..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(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 101dbab1fb9..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(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 d3e022bf6d6..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(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 2fa81b97dd4..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(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 f96af82dc70..04757f27d10 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
@@ -257,7 +257,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 = 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 fef8185b61d..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(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 ef09fa0caa1..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(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 c2bccf21152..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(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 267d14bc83b..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(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 ef92f7ce0db..5c0df0ab817 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
@@ -461,7 +461,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 = 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 92c76bb89bb..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
@@ -53,6 +53,15 @@ public class PythonClientExperimentalCodegen extends PythonClientCodegen {
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
.includeDocumentationFeatures(DocumentationFeature.Readme)
.wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML, WireFormatFeature.Custom))
@@ -359,7 +368,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 postProcessAllModels(Map objs) {
// loop through all models and delete ones where type!=object and the model has no validations and enums
@@ -899,27 +910,41 @@ 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 referencedModelNames) {
// this is used to set dataType, which defines a python tuple of classes
String fullSuffix = suffix;
if (")".equals(suffix)) {
fullSuffix = "," + suffix;
}
- if (ModelUtils.isAnyTypeSchema(p)) {
+ 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());
+ if (referencedModelNames != null) {
+ referencedModelNames.add(modelName);
+ }
+ return prefix + toModelName(modelName) + fullSuffix;
+ }
+ }
+ 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(p) && ModelUtils.getAdditionalProperties(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(p) != null) {
- Schema inner = ModelUtils.getAdditionalProperties(p);
- return prefix + "{str: " + getTypeString(inner, "(", ")") + "}" + fullSuffix;
+ if ((ModelUtils.isMapSchema(p) || "object".equals(p.getType())) && getAdditionalProperties(p) != null) {
+ Schema inner = getAdditionalProperties(p);
+ return prefix + "{str: " + getTypeString(inner, "(", ")", referencedModelNames) + "}" + fullSuffix;
} else if (ModelUtils.isArraySchema(p)) {
ArraySchema ap = (ArraySchema) p;
Schema inner = ap.getItems();
@@ -932,11 +957,11 @@ 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)) {
return prefix + "file_type" + fullSuffix;
}
@@ -956,7 +981,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
@@ -969,14 +994,22 @@ 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 m.parent
- String typeString = getTypeDeclaration(addProps);
- codegenModel.additionalPropertiesType = typeString;
- } else {
- addParentContainer(codegenModel, codegenModel.name, schema);
+ Schema addProps = getAdditionalProperties(schema);
+ if (addProps != null) {
+ // if AdditionalProperties exists, get its datatype and
+ // store it in codegenModel.additionalPropertiesType.
+ // The 'addProps' may be a reference, getTypeDeclaration will resolve
+ // the reference.
+ List referencedModelNames = new ArrayList();
+ codegenModel.additionalPropertiesType = getTypeString(addProps, "", "", referencedModelNames);
+ if (referencedModelNames.size() != 0) {
+ // 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
+ // to false, i.e. no additional properties are allowed.
}
@Override
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..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(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 ce35525629a..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(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 706083b50dc..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(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 a0ef19a483a..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(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(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(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 299a8e79e57..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(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 d49f37e5622..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(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 4cd79f8644e..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(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 4c1da136a2e..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(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 0b19394c08e..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(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 347b371c776..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(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 c50f4492b40..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(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 ecd029c13fb..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(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(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(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 445069455d4..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(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(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(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 fbdf273ca4b..9c87bc94f3f 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(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 2a1863ebd52..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(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 990c206fca5..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(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 93f47c09b5e..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(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 c680840da7a..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(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 6a46fbc78dd..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(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 26f6fb6f06b..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(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 2d00d6b30a0..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(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 7092f296171..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
@@ -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,27 @@ 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.
+ private static final String openapiDocVersion = "x-original-swagger-version";
+
+ // A vendor extension to track the value of the 'disallowAdditionalPropertiesIfNotPresent' CLI
+ private static final String disallowAdditionalPropertiesIfNotPresent = "x-disallow-additional-properties-if-not-present";
+
+ private static ObjectMapper JSON_MAPPER, YAML_MAPPER;
+
+ static {
+ JSON_MAPPER = ObjectMapperFactory.createJson();
+ 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));
}
@@ -657,48 +689,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(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.
*
@@ -726,10 +716,11 @@ 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
*/
- 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");
@@ -739,7 +730,7 @@ public class ModelUtils {
// not free-form if allOf, anyOf, oneOf is not empty
if (schema instanceof ComposedSchema) {
ComposedSchema cs = (ComposedSchema) schema;
- List interfaces = getInterfaces(cs);
+ List interfaces = ModelUtils.getInterfaces(cs);
if (interfaces != null && !interfaces.isEmpty()) {
return false;
}
@@ -749,7 +740,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;
@@ -1080,16 +1071,73 @@ public class ModelUtils {
return schema;
}
- public static Schema getAdditionalProperties(Schema schema) {
- if (schema.getAdditionalProperties() instanceof Schema) {
- return (Schema) schema.getAdditionalProperties();
+ /**
+ * 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.
+ */
+ public static Schema getAdditionalProperties(OpenAPI openAPI, Schema schema) {
+ Object addProps = schema.getAdditionalProperties();
+ if (addProps instanceof Schema) {
+ return (Schema) addProps;
}
- if (schema.getAdditionalProperties() instanceof Boolean && (Boolean) schema.getAdditionalProperties()) {
- return new ObjectSchema();
+ if (addProps == null) {
+ // 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.
+ 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 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)) {
+ // 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(EXTENSION_OPENAPI_DOC_VERSION));
+ if (version.major != 3) {
+ 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;
}
-
+
public static Header getReferencedHeader(OpenAPI openAPI, Header header) {
if (header != null && StringUtils.isNotEmpty(header.get$ref())) {
String name = getSimpleRef(header.get$ref());
@@ -1413,4 +1461,82 @@ 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.
+ *
+ * @throws java.lang.Exception if an error occurs while retrieving the OpenAPI document.
+ *
+ * @return A JsonNode representation of the input OAS document.
+ */
+ public static JsonNode readWithInfo(String location, List auths) throws Exception {
+ String data;
+ location = location.replaceAll("\\\\","/");
+ if (location.toLowerCase(Locale.ROOT).startsWith("http")) {
+ data = RemoteUrl.urlToString(location, auths);
+ } else {
+ final String fileScheme = "file:";
+ Path path;
+ if (location.toLowerCase(Locale.ROOT).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);
+ }
+
+ /**
+ * 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.
+ *
+ * @param openAPI the object that encapsulates the OAS document.
+ * @param location the URL of the OAS document.
+ * @param auths the list of authorization values to access the remote URL.
+ *
+ * @return the version of the OpenAPI document.
+ */
+ public static SemVer getOpenApiVersion(OpenAPI openAPI, String location, List auths) {
+ String version;
+ 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();
+ }
+ // Cache the OAS version in global settings so it can be looked up in the helper functions.
+ //GlobalSettings.setProperty(openapiDocVersion, version);
+
+ return new SemVer(version);
+ }
}
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 {
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/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/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_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/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 49ad6f35e39..b1db9b329c6 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', ())
@@ -155,6 +147,12 @@ class OpenApiModel(object):
# so make Animal here
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,)
@@ -950,8 +948,10 @@ def is_type_nullable(input_type):
"""
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.
+ # 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/java/org/openapitools/codegen/DefaultCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/DefaultCodegenTest.java
index 45b7c529816..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
@@ -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,6 +223,157 @@ 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/additional-properties-for-testing.yaml");
+ DefaultCodegen codegen = new DefaultCodegen();
+ codegen.setOpenAPI(openAPI);
+ codegen.setDisallowAdditionalPropertiesIfNotPresent(true);
+
+ Schema schema = openAPI.getComponents().getSchemas().get("AdditionalPropertiesClass");
+ 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);
+ // When the 'additionalProperties' keyword is not present, the model
+ // should allow undeclared properties. However, due to bug
+ // https://github.com/swagger-api/swagger-parser/issues/1369, the swagger
+ // converter does not retain the value of the additionalProperties.
+
+ Map m = schema.getProperties();
+ Schema child = m.get("map_string");
+ // 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);
+
+ 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);
+ }
+
+ @Test
+ public void testAdditionalPropertiesV3Spec() {
+ 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);
+
+ Schema schema = openAPI.getComponents().getSchemas().get("AdditionalPropertiesClass");
+ 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.assertNotNull(addProps);
+ Assert.assertTrue(addProps instanceof ObjectSchema);
+ CodegenModel cm = codegen.fromModel("AdditionalPropertiesClass", schema);
+
+ Map m = schema.getProperties();
+ 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_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);
+ // 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);
+ addProps = ModelUtils.getAdditionalProperties(openAPI, child);
+ Assert.assertNotNull(addProps);
+ Assert.assertTrue(addProps instanceof ObjectSchema);
+
+ child = m.get("empty_map");
+ // 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);
+ addProps = ModelUtils.getAdditionalProperties(openAPI, child);
+ 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.setDisallowAdditionalPropertiesIfNotPresent(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");
@@ -1187,6 +1339,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 excpectedDiscriminatorValues = new ArrayList<>(Arrays.asList("daily", "sub-obj"));
ArrayList xDiscriminatorValues = new ArrayList<>();
for (CodegenModel child: cm.children) {
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..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
@@ -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();
+ // 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.getOpenApiVersion(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();
+ // Invoke helper function to get the original swagger version.
+ ModelUtils.getOpenApiVersion(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..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,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.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 79cf084234f..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,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.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 9e54e028f7f..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,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.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 f6efa94aa51..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,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.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 0684591597b..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,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.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 767c81b336b..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,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.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 f883ebbed19..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,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.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 245957be407..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,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.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 97ad8132ce4..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,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.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 a3f32f9b4a0..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,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.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 4bf91932a3f..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,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.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 537b7b10c66..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,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.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 09bd0dceabc..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,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.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 4b982932b98..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,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.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 11825e2ec12..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,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.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 aa2d61f2829..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,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.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 58b3ae01fd3..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,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.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 51b62748e3c..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,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.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 1e008de1ed1..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,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.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 58b5aa61826..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,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.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 7bec81c9ae3..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,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.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 a2dc76d63f4..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,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.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, "true")
.build();
}
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);
}
}
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 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
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/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
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 a744bd126fa..6fb6d09416e 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
@@ -1539,6 +1543,24 @@ components:
type: object
additionalProperties:
type: string
+ anytype_1: {}
+ map_with_undeclared_properties_anytype_1:
+ type: object
+ map_with_undeclared_properties_anytype_2:
+ type: object
+ properties: {}
+ map_with_undeclared_properties_anytype_3:
+ type: object
+ additionalProperties: true
+ empty_map:
+ type: object
+ description: an object with no declared properties and no undeclared
+ properties, hence it's an empty map.
+ additionalProperties: false
+ map_with_undeclared_properties_string:
+ type: object
+ additionalProperties:
+ type: string
MixedPropertiesAndAdditionalPropertiesClass:
type: object
properties:
@@ -1815,6 +1837,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:
@@ -1824,6 +1849,7 @@ components:
origin:
type: string
pattern: /^[A-Z\s]*$/i
+ nullable: true
banana:
type: object
properties:
@@ -1860,6 +1886,7 @@ components:
type: string
required:
- className
+ additionalProperties: true
Pig:
oneOf:
- $ref: '#/components/schemas/BasquePig'
@@ -1887,11 +1914,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:
@@ -1901,6 +1930,7 @@ components:
type: boolean
required:
- cultivar
+ additionalProperties: false
bananaReq:
type: object
properties:
@@ -1910,6 +1940,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:
@@ -1934,6 +1965,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'
@@ -1978,6 +2014,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'
@@ -1986,6 +2024,7 @@ components:
allOf:
- $ref: '#/components/schemas/ShapeInterface'
- $ref: '#/components/schemas/TriangleInterface'
+ additionalProperties: false
ScaleneTriangle:
allOf:
- $ref: '#/components/schemas/ShapeInterface'
@@ -2029,4 +2068,4 @@ components:
- type: object
properties:
name:
- type: string
\ No newline at end of file
+ type: string
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 1b690f28bdd..982115862d6 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', ())
@@ -227,6 +219,12 @@ class OpenApiModel(object):
# so make Animal here
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,)
@@ -1217,8 +1215,10 @@ def is_type_nullable(input_type):
"""
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.
+ # 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/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 4475d61d6f2..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,
@@ -66,6 +67,8 @@ class AdditionalPropertiesAnyType(ModelNormal):
additional_properties_type = (bool, date, datetime, dict, float, int, list, str,) # noqa: E501
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 4a0da3ef8bc..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,
@@ -66,6 +67,8 @@ class AdditionalPropertiesArray(ModelNormal):
additional_properties_type = ([bool, date, datetime, dict, float, int, list, str],) # noqa: E501
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 93b052b54c1..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,
@@ -66,6 +67,8 @@ class AdditionalPropertiesBoolean(ModelNormal):
additional_properties_type = (bool,) # noqa: E501
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 6064f3ffd09..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,
@@ -66,6 +67,8 @@ class AdditionalPropertiesClass(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -120,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:
@@ -167,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 e58c456a32f..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,
@@ -66,6 +67,8 @@ class AdditionalPropertiesInteger(ModelNormal):
additional_properties_type = (int,) # noqa: E501
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 bda68b94168..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,
@@ -66,6 +67,8 @@ class AdditionalPropertiesNumber(ModelNormal):
additional_properties_type = (float,) # noqa: E501
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 49e2428be06..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,
@@ -66,6 +67,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():
"""
@@ -100,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:
@@ -137,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 8f1b0c0857e..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,
@@ -66,6 +67,8 @@ class AdditionalPropertiesString(ModelNormal):
additional_properties_type = (str,) # noqa: E501
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 7e4a748fdc3..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,
@@ -76,6 +77,8 @@ class Animal(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -118,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:
@@ -158,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 3b49eaca1d2..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,
@@ -66,6 +67,8 @@ class ApiResponse(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -104,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:
@@ -143,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 298cfdebb36..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,
@@ -66,6 +67,8 @@ class ArrayOfArrayOfNumberOnly(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 756bb0f5fb9..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,
@@ -66,6 +67,8 @@ class ArrayOfNumberOnly(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 25396bbcf21..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,
@@ -71,6 +72,8 @@ class ArrayTest(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -109,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:
@@ -148,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 2f519f66bb8..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,
@@ -66,6 +67,8 @@ class Capitalization(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -110,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:
@@ -152,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 d32b2ebf81e..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,
@@ -76,6 +77,8 @@ class Cat(ModelComposed):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -119,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:
@@ -160,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 855371673ac..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,
@@ -66,6 +67,8 @@ class CatAllOf(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 35eb224e17a..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,
@@ -66,6 +67,8 @@ class Category(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -102,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:
@@ -142,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 d1dfadd0f21..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,
@@ -76,6 +77,8 @@ class Child(ModelComposed):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -115,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:
@@ -154,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 96f0ecc7705..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,
@@ -66,6 +67,8 @@ class ChildAllOf(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 3d79c435841..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,
@@ -76,6 +77,8 @@ class ChildCat(ModelComposed):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -117,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:
@@ -157,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 f159c32fd86..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,
@@ -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/client/petstore/python-experimental/petstore_api/models/child_dog.py b/samples/client/petstore/python-experimental/petstore_api/models/child_dog.py
index d747e269486..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,
@@ -76,6 +77,8 @@ class ChildDog(ModelComposed):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -117,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:
@@ -157,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 b7d46f365ea..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,
@@ -66,6 +67,8 @@ class ChildDogAllOf(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 8a7df71181a..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,
@@ -76,6 +77,8 @@ class ChildLizard(ModelComposed):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -117,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:
@@ -157,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 949343e858e..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,
@@ -66,6 +67,8 @@ class ChildLizardAllOf(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 6244421e601..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,
@@ -66,6 +67,8 @@ class ClassModel(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 f5c6854bbae..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,
@@ -66,6 +67,8 @@ class Client(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 c4dfd08695d..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,
@@ -76,6 +77,8 @@ class Dog(ModelComposed):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -119,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:
@@ -160,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 fe4e3ebe28d..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,
@@ -66,6 +67,8 @@ class DogAllOf(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 fd06d3eb384..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,
@@ -74,6 +75,8 @@ class EnumArrays(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -110,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:
@@ -148,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 6e59d0162be..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,
@@ -67,6 +68,8 @@ class EnumClass(ModelSimple):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -97,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:
@@ -136,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 cfbcf63229a..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,
@@ -89,6 +90,8 @@ class EnumTest(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -131,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:
@@ -174,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 873052db9ac..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,
@@ -66,6 +67,8 @@ class File(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 32dd82773dd..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,
@@ -71,6 +72,8 @@ class FileSchemaTestClass(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -107,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:
@@ -145,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 d69c311f316..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,
@@ -101,6 +102,8 @@ class FormatTest(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -159,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:
@@ -210,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 8949eed490e..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,
@@ -66,6 +67,8 @@ class Grandparent(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 bf6396bb859..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,
@@ -86,6 +87,8 @@ class GrandparentAnimal(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -128,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:
@@ -167,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 a80d49539b3..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,
@@ -66,6 +67,8 @@ class HasOnlyReadOnly(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -102,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:
@@ -140,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 93acc4dd8de..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,
@@ -66,6 +67,8 @@ class List(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 1d58629e43b..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,
@@ -75,6 +76,8 @@ class MapTest(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -115,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:
@@ -155,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 bbae3d50a07..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,
@@ -71,6 +72,8 @@ class MixedPropertiesAndAdditionalPropertiesClass(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -109,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:
@@ -148,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 bbbe72bd1ce..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,
@@ -66,6 +67,8 @@ class Model200Response(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -102,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:
@@ -140,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 80a187b13fb..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,
@@ -66,6 +67,8 @@ class ModelReturn(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 96d4ffd69f8..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,
@@ -66,6 +67,8 @@ class Name(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -106,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:
@@ -148,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 5e84c5a16f4..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,
@@ -66,6 +67,8 @@ class NumberOnly(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 535fe7cd996..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,
@@ -71,6 +72,8 @@ class Order(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -115,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:
@@ -157,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 b5c41308122..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,
@@ -71,6 +72,8 @@ class OuterComposite(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -109,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:
@@ -148,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 8a30abf9a21..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,
@@ -67,6 +68,8 @@ class OuterEnum(ModelSimple):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -97,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:
@@ -136,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 5633050812e..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,
@@ -66,6 +67,8 @@ class OuterNumber(ModelSimple):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -96,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:
@@ -135,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 a64fd034a35..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,
@@ -76,6 +77,8 @@ class Parent(ModelComposed):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -113,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:
@@ -151,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 d65ad906ef5..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,
@@ -66,6 +67,8 @@ class ParentAllOf(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 5f709f6947b..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,
@@ -86,6 +87,8 @@ class ParentPet(ModelComposed):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -128,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:
@@ -167,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 7ca5ab6d224..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,
@@ -81,6 +82,8 @@ class Pet(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -125,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:
@@ -169,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 97031d2b9d7..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,
@@ -66,6 +67,8 @@ class Player(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -102,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:
@@ -142,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 d5f4f1bfba4..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,
@@ -66,6 +67,8 @@ class ReadOnlyFirst(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -102,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:
@@ -140,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 0f168298d2a..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,
@@ -66,6 +67,8 @@ class SpecialModelName(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 ba0938507be..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,
@@ -66,6 +67,8 @@ class StringBooleanMap(ModelNormal):
additional_properties_type = (bool,) # noqa: E501
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -98,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:
@@ -134,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 9580c1e1f9d..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,
@@ -66,6 +67,8 @@ class Tag(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -104,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:
@@ -143,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 3f9c2da12fc..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,
@@ -66,6 +67,8 @@ class TypeHolderDefault(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -112,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:
@@ -157,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 fea5ee3378d..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,
@@ -75,6 +76,8 @@ class TypeHolderExample(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -117,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:
@@ -160,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 dc92564ae1d..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,
@@ -66,6 +67,8 @@ class User(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -114,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:
@@ -158,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 71529af241f..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,
@@ -66,6 +67,8 @@ class XmlItem(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -156,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:
@@ -221,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
diff --git a/samples/openapi3/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md b/samples/openapi3/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md
index 4df80090d8e..042d7c437d6 100644
--- a/samples/openapi3/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md
+++ b/samples/openapi3/client/petstore/python-experimental/docs/AdditionalPropertiesClass.md
@@ -5,6 +5,12 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**map_property** | **{str: (str,)}** | | [optional]
**map_of_map_property** | **{str: ({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/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/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/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/Drawing.md b/samples/openapi3/client/petstore/python-experimental/docs/Drawing.md
index 16358f97abe..1583a1dea01 100644
--- a/samples/openapi3/client/petstore/python-experimental/docs/Drawing.md
+++ b/samples/openapi3/client/petstore/python-experimental/docs/Drawing.md
@@ -5,8 +5,9 @@ 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]
[[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/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/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/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/docs/Pig.md b/samples/openapi3/client/petstore/python-experimental/docs/Pig.md
index 912ba528011..0ca689c073e 100644
--- a/samples/openapi3/client/petstore/python-experimental/docs/Pig.md
+++ b/samples/openapi3/client/petstore/python-experimental/docs/Pig.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/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/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/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/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/model_utils.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model_utils.py
index 1b690f28bdd..982115862d6 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', ())
@@ -227,6 +219,12 @@ class OpenApiModel(object):
# so make Animal here
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,)
@@ -1217,8 +1215,10 @@ def is_type_nullable(input_type):
"""
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.
+ # 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/additional_properties_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/additional_properties_class.py
index 929cb4509f0..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,
@@ -66,6 +67,8 @@ class AdditionalPropertiesClass(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -79,6 +82,12 @@ class AdditionalPropertiesClass(ModelNormal):
return {
'map_property': ({str: (str,)},), # noqa: E501
'map_of_map_property': ({str: ({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
@@ -88,6 +97,12 @@ 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
+ '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 = {}
@@ -102,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:
@@ -138,8 +153,30 @@ 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 (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
"""
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_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 5ce4676becc..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,
@@ -66,6 +67,8 @@ class Address(ModelNormal):
additional_properties_type = (int,) # noqa: E501
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -98,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:
@@ -134,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 7e4a748fdc3..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,
@@ -76,6 +77,8 @@ class Animal(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -118,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:
@@ -158,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 3b49eaca1d2..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,
@@ -66,6 +67,8 @@ class ApiResponse(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -104,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:
@@ -143,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 cbef6521e74..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,
@@ -77,6 +78,8 @@ class Apple(ModelNormal):
additional_properties_type = None
+ _nullable = True
+
@cached_property
def openapi_types():
"""
@@ -113,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:
@@ -151,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 beadb0b8e3a..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,
@@ -66,6 +67,8 @@ class AppleReq(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -102,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:
@@ -142,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 298cfdebb36..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,
@@ -66,6 +67,8 @@ class ArrayOfArrayOfNumberOnly(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 756bb0f5fb9..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,
@@ -66,6 +67,8 @@ class ArrayOfNumberOnly(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 25396bbcf21..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,
@@ -71,6 +72,8 @@ class ArrayTest(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -109,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:
@@ -148,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 073f73974ff..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,
@@ -66,6 +67,8 @@ class Banana(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 4ba2c3d73c8..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,
@@ -66,6 +67,8 @@ class BananaReq(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -102,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:
@@ -142,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/basque_pig.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/basque_pig.py
index dce1948aacb..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
@@ -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 BasquePig(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -139,6 +142,22 @@ class BasquePig(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/capitalization.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/capitalization.py
index 2f519f66bb8..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,
@@ -66,6 +67,8 @@ class Capitalization(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -110,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:
@@ -152,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 49991c2c714..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,
@@ -79,7 +80,9 @@ 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
@cached_property
def openapi_types():
@@ -124,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:
@@ -165,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 855371673ac..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,
@@ -66,6 +67,8 @@ class CatAllOf(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 35eb224e17a..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,
@@ -66,6 +67,8 @@ class Category(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -102,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:
@@ -142,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/child_cat.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/child_cat.py
index 3d79c435841..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
@@ -18,6 +18,7 @@ import six # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
@@ -74,7 +75,9 @@ 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
@cached_property
def openapi_types():
@@ -117,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:
@@ -157,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/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/class_model.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/class_model.py
index 6244421e601..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,
@@ -66,6 +67,8 @@ class ClassModel(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 f5c6854bbae..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,
@@ -66,6 +67,8 @@ class Client(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 a1656978ed6..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,
@@ -74,7 +75,9 @@ class ComplexQuadrilateral(ModelComposed):
validations = {
}
- additional_properties_type = None
+ additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
@cached_property
def openapi_types():
@@ -113,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:
@@ -153,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/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/dog.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/dog.py
index c4dfd08695d..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,
@@ -74,7 +75,9 @@ 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
@cached_property
def openapi_types():
@@ -119,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:
@@ -160,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 fe4e3ebe28d..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,
@@ -66,6 +67,8 @@ class DogAllOf(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 f147a27dfa6..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,
@@ -32,6 +33,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:
@@ -79,7 +85,9 @@ class Drawing(ModelNormal):
validations = {
}
- additional_properties_type = None
+ additional_properties_type = (fruit.Fruit,) # noqa: E501
+
+ _nullable = False
@cached_property
def openapi_types():
@@ -94,7 +102,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
}
@@ -121,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:
@@ -157,10 +165,26 @@ 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
"""
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_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 fd06d3eb384..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,
@@ -74,6 +75,8 @@ class EnumArrays(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -110,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:
@@ -148,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 6e59d0162be..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,
@@ -67,6 +68,8 @@ class EnumClass(ModelSimple):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -97,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:
@@ -136,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 03765653e38..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,
@@ -104,6 +105,8 @@ class EnumTest(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -152,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:
@@ -198,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 ba4d23a45ed..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,
@@ -74,7 +75,9 @@ class EquilateralTriangle(ModelComposed):
validations = {
}
- additional_properties_type = None
+ additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
@cached_property
def openapi_types():
@@ -113,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:
@@ -153,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 873052db9ac..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,
@@ -66,6 +67,8 @@ class File(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 32dd82773dd..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,
@@ -71,6 +72,8 @@ class FileSchemaTestClass(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -107,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:
@@ -145,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 0faf613dab2..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,
@@ -66,6 +67,8 @@ class Foo(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 cd9e7ddda52..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,
@@ -109,6 +110,8 @@ class FormatTest(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -171,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:
@@ -224,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 b31773395d4..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,
@@ -87,6 +88,8 @@ class Fruit(ModelComposed):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -128,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:
@@ -168,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 0ba3d104fa1..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,
@@ -76,6 +77,8 @@ class FruitReq(ModelComposed):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -117,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:
@@ -159,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 f1a84f2c52c..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,
@@ -87,6 +88,8 @@ class GmFruit(ModelComposed):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -128,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:
@@ -168,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/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/has_only_read_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/has_only_read_only.py
index a80d49539b3..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,
@@ -66,6 +67,8 @@ class HasOnlyReadOnly(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -102,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:
@@ -140,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 5e16487a37b..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,
@@ -66,6 +67,8 @@ class HealthCheckResult(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 0392e5d816a..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,
@@ -66,6 +67,8 @@ class InlineObject(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -102,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:
@@ -140,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 f4c6c2e2e33..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,
@@ -66,6 +67,8 @@ class InlineObject1(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -102,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:
@@ -140,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 49f5d316465..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,
@@ -75,6 +76,8 @@ class InlineObject2(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -111,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:
@@ -149,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 709c13c15fa..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,
@@ -100,6 +101,8 @@ class InlineObject3(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -160,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:
@@ -212,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 15384c01f46..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,
@@ -66,6 +67,8 @@ class InlineObject4(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -102,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:
@@ -142,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 c354b73a4d2..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,
@@ -66,6 +67,8 @@ class InlineObject5(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -102,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:
@@ -142,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 e564a35cc02..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,
@@ -71,6 +72,8 @@ class InlineResponseDefault(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -105,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:
@@ -142,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 63d8262173e..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,
@@ -76,6 +77,8 @@ class IsoscelesTriangle(ModelComposed):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -113,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:
@@ -153,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 93acc4dd8de..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,
@@ -66,6 +67,8 @@ class List(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 0d354fcd4de..44f3e402c98 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,
@@ -84,7 +85,9 @@ class Mammal(ModelComposed):
validations = {
}
- additional_properties_type = None
+ additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
@cached_property
def openapi_types():
@@ -134,7 +137,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:
@@ -176,6 +179,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 1d58629e43b..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,
@@ -75,6 +76,8 @@ class MapTest(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -115,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:
@@ -155,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 bbae3d50a07..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,
@@ -71,6 +72,8 @@ class MixedPropertiesAndAdditionalPropertiesClass(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -109,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:
@@ -148,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 bbbe72bd1ce..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,
@@ -66,6 +67,8 @@ class Model200Response(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -102,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:
@@ -140,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 80a187b13fb..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,
@@ -66,6 +67,8 @@ class ModelReturn(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 96d4ffd69f8..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,
@@ -66,6 +67,8 @@ class Name(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -106,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:
@@ -148,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 da001283440..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,
@@ -64,7 +65,9 @@ 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
+
+ _nullable = False
@cached_property
def openapi_types():
@@ -83,12 +86,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
@@ -122,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:
@@ -162,14 +165,30 @@ 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
"""
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_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 fe7e2e97931..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,
@@ -74,7 +75,9 @@ class NullableShape(ModelComposed):
validations = {
}
- additional_properties_type = None
+ additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = True
@cached_property
def openapi_types():
@@ -121,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:
@@ -162,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 5e84c5a16f4..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,
@@ -66,6 +67,8 @@ class NumberOnly(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 535fe7cd996..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,
@@ -71,6 +72,8 @@ class Order(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -115,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:
@@ -157,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 fc2b2dd1736..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,
@@ -66,6 +67,8 @@ class OuterComposite(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -104,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:
@@ -143,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 58c7c3b5d72..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,
@@ -68,6 +69,8 @@ class OuterEnum(ModelSimple):
additional_properties_type = None
+ _nullable = True
+
@cached_property
def openapi_types():
"""
@@ -98,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:
@@ -137,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 198740fdb9c..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,
@@ -67,6 +68,8 @@ class OuterEnumDefaultValue(ModelSimple):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -97,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:
@@ -136,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 86292ab185a..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,
@@ -67,6 +68,8 @@ class OuterEnumInteger(ModelSimple):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -97,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:
@@ -136,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 da9f8a73f9b..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,
@@ -67,6 +68,8 @@ class OuterEnumIntegerDefaultValue(ModelSimple):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -97,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:
@@ -136,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/parent_pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/parent_pet.py
index b06e10c4ddc..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
@@ -18,6 +18,7 @@ import six # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
@@ -74,7 +75,9 @@ 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
@cached_property
def openapi_types():
@@ -116,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:
@@ -155,6 +158,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/openapi3/client/petstore/python-experimental/petstore_api/models/pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/pet.py
index 7ca5ab6d224..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,
@@ -81,6 +82,8 @@ class Pet(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -125,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:
@@ -169,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/pig.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/pig.py
index 6b984ab6d9d..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
@@ -18,6 +18,7 @@ import six # noqa: F401
import nulltype # noqa: F401
from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
ModelComposed,
ModelNormal,
ModelSimple,
@@ -74,7 +75,9 @@ class Pig(ModelComposed):
validations = {
}
- additional_properties_type = None
+ additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
@cached_property
def openapi_types():
@@ -117,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:
@@ -156,6 +159,22 @@ class Pig(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/quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/quadrilateral.py
index 344ecb14c4e..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,
@@ -74,7 +75,9 @@ class Quadrilateral(ModelComposed):
validations = {
}
- additional_properties_type = None
+ additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
@cached_property
def openapi_types():
@@ -119,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:
@@ -159,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 ad6748b31a0..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,
@@ -66,6 +67,8 @@ class QuadrilateralInterface(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -139,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 d5f4f1bfba4..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,
@@ -66,6 +67,8 @@ class ReadOnlyFirst(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -102,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:
@@ -140,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 21ce8ff78ca..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,
@@ -74,7 +75,9 @@ class ScaleneTriangle(ModelComposed):
validations = {
}
- additional_properties_type = None
+ additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
@cached_property
def openapi_types():
@@ -113,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:
@@ -153,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 5e41bcc9356..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,
@@ -74,7 +75,9 @@ class Shape(ModelComposed):
validations = {
}
- additional_properties_type = None
+ additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
@cached_property
def openapi_types():
@@ -121,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:
@@ -162,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 037fe026e18..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,
@@ -66,6 +67,8 @@ class ShapeInterface(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -139,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 f4dd928a060..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,
@@ -74,7 +75,9 @@ class ShapeOrNull(ModelComposed):
validations = {
}
- additional_properties_type = None
+ additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
@cached_property
def openapi_types():
@@ -121,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:
@@ -162,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 c368a854b31..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,
@@ -74,7 +75,9 @@ class SimpleQuadrilateral(ModelComposed):
validations = {
}
- additional_properties_type = None
+ additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
@cached_property
def openapi_types():
@@ -113,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:
@@ -153,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 0f168298d2a..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,
@@ -66,6 +67,8 @@ class SpecialModelName(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -137,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 ba0938507be..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,
@@ -66,6 +67,8 @@ class StringBooleanMap(ModelNormal):
additional_properties_type = (bool,) # noqa: E501
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -98,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:
@@ -134,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 eb62f13dbe2..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,
@@ -66,6 +67,8 @@ class Tag(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -102,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:
@@ -140,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 68d3fa15152..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,
@@ -79,7 +80,9 @@ class Triangle(ModelComposed):
validations = {
}
- additional_properties_type = None
+ additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
@cached_property
def openapi_types():
@@ -125,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:
@@ -165,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 5fb969a64be..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,
@@ -66,6 +67,8 @@ class TriangleInterface(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -100,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:
@@ -139,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 01f08a6776a..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,
@@ -66,6 +67,8 @@ class User(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -85,8 +88,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
}
@@ -122,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:
@@ -164,12 +167,28 @@ 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
"""
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_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 f39c2817440..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,
@@ -66,6 +67,8 @@ class Whale(ModelNormal):
additional_properties_type = None
+ _nullable = False
+
@cached_property
def openapi_types():
"""
@@ -104,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:
@@ -145,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 7dd5f1ab35f..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,
@@ -69,7 +70,9 @@ class Zebra(ModelNormal):
validations = {
}
- additional_properties_type = None
+ additional_properties_type = (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
@cached_property
def openapi_types():
@@ -107,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:
@@ -147,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 ee9799fc6d3..1172373b9e1 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,23 @@ 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)
+
+ # '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.
+ 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__':
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 5c8f992364b..a34df342567 100644
--- a/samples/openapi3/client/petstore/python-experimental/tests/test_deserialization.py
+++ b/samples/openapi3/client/petstore/python-experimental/tests/test_deserialization.py
@@ -197,3 +197,93 @@ class DeserializationTests(unittest.TestCase):
inst = petstore_api.FruitReq(None)
self.assertIsNone(inst)
+
+ def test_deserialize_with_additional_properties(self):
+ """
+ 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.
+ # 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.
+ 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')
+
+ # The 'zebra' schema allows additional properties by explicitly setting
+ # additionalProperties: true.
+ # This is equivalent to 'additionalProperties' not being present.
+ data = {
+ 'class_name': 'zebra',
+ 'type': 'plains',
+ # 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.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 = ("{} has no attribute '{}' at ")
+ with self.assertRaisesRegexp(
+ petstore_api.exceptions.ApiAttributeError,
+ 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.
+ 'unknown-group': 'abc',
+ }
+ response = MockResponse(data=json.dumps(data))
+ 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)
+
+ 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)
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..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
@@ -36,51 +36,90 @@ 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 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 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))
+
+ # 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 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 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))
# 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 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())
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 = {
@@ -100,15 +139,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