diff --git a/.github/workflows/check-supported-versions.yaml b/.github/workflows/check-supported-versions.yaml
index 430b0ea815c..56992b9811e 100644
--- a/.github/workflows/check-supported-versions.yaml
+++ b/.github/workflows/check-supported-versions.yaml
@@ -26,6 +26,7 @@ jobs:
- name: Set up JDK ${{ matrix.java }}
uses: actions/setup-java@v2
with:
+ distribution: 'adopt'
java-version: ${{ matrix.java }}
- uses: actions/cache@v2.1.5
diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml
index 98f191f2c9c..d991e052a7d 100644
--- a/.github/workflows/sonar.yml
+++ b/.github/workflows/sonar.yml
@@ -16,6 +16,7 @@ jobs:
- name: Set up JDK 11
uses: actions/setup-java@v2
with:
+ distribution: 'adopt'
java-version: 11
- name: Compile with Maven
run: mvn -B -q clean install jacoco:report
diff --git a/README.md b/README.md
index c994f615fa6..724c9da2771 100644
--- a/README.md
+++ b/README.md
@@ -9,27 +9,17 @@
-[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`5.1.1`):
+[Master](https://github.com/OpenAPITools/openapi-generator/tree/master) (`5.2.0`):
[](https://travis-ci.org/OpenAPITools/openapi-generator)
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
-[](https://app.shippable.com/github/OpenAPITools/openapi-generator)
[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
[](https://cloud.drone.io/OpenAPITools/openapi-generator)
[](https://app.bitrise.io/app/4a2b10a819d12b67)
[](https://github.com/OpenAPITools/openapi-generator/actions?query=workflow%3A%22Check+Supported+Java+Versions%22)
-[5.2.x](https://github.com/OpenAPITools/openapi-generator/tree/5.2.x) (`5.2.x`):
-[](https://travis-ci.org/OpenAPITools/openapi-generator)
-[](https://circleci.com/gh/OpenAPITools/openapi-generator)
-[](https://app.shippable.com/github/OpenAPITools/openapi-generator)
-[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
-[](https://cloud.drone.io/OpenAPITools/openapi-generator)
-[](https://app.bitrise.io/app/4a2b10a819d12b67)
-
[6.0.x](https://github.com/OpenAPITools/openapi-generator/tree/6.0.x) (`6.0.x`):
[](https://travis-ci.org/OpenAPITools/openapi-generator)
[](https://circleci.com/gh/OpenAPITools/openapi-generator)
-[](https://app.shippable.com/github/OpenAPITools/openapi-generator)
[](https://ci.appveyor.com/project/WilliamCheng/openapi-generator-wh2wu)
[](https://cloud.drone.io/OpenAPITools/openapi-generator)
[](https://app.bitrise.io/app/4a2b10a819d12b67)
@@ -120,9 +110,8 @@ The OpenAPI Specification has undergone 3 revisions since initial creation in 20
| OpenAPI Generator Version | Release Date | Notes |
| --------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------ | ------------------------------------------------- |
| 6.0.0 (upcoming major release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/6.0.0-SNAPSHOT/) | Nov/Dec 2021 | Minor release with breaking changes (no fallback) |
-| 5.2.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/5.2.0-SNAPSHOT/) | May/Jun 2021 | Minor release with breaking changes (with fallback) |
-| 5.1.1 (upcoming patch release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/5.1.1-SNAPSHOT/) | Apr/May 2021 | Patch release (enhancements, bug fixes, etc) |
-| [5.1.0](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.1.0) (latest stable release) | 20.03.2021 | Minor release with breaking changes (with fallback) |
+| 5.2.0 (upcoming minor release) [SNAPSHOT](https://oss.sonatype.org/content/repositories/snapshots/org/openapitools/openapi-generator-cli/5.2.0-SNAPSHOT/) | Jun/Jul 2021 | Minor release with breaking changes (with fallback) |
+| [5.1.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v5.1.1) (latest stable release) | 07.05.2021 | Patch release (enhancements, bug fixes, etc) |
| [4.3.1](https://github.com/OpenAPITools/openapi-generator/releases/tag/v4.3.1) | 06.05.2020 | Patch release (enhancements, bug fixes, etc) |
OpenAPI Spec compatibility: 1.0, 1.1, 1.2, 2.0, 3.0
@@ -179,16 +168,16 @@ See the different versions of the [openapi-generator-cli](https://mvnrepository.
If you're looking for the latest stable version, you can grab it directly from Maven.org (Java 8 runtime at a minimum):
-JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.1.0/openapi-generator-cli-5.1.0.jar`
+JAR location: `https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.1.1/openapi-generator-cli-5.1.1.jar`
For **Mac/Linux** users:
```sh
-wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.1.0/openapi-generator-cli-5.1.0.jar -O openapi-generator-cli.jar
+wget https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.1.1/openapi-generator-cli-5.1.1.jar -O openapi-generator-cli.jar
```
For **Windows** users, you will need to install [wget](http://gnuwin32.sourceforge.net/packages/wget.htm) or you can use Invoke-WebRequest in PowerShell (3.0+), e.g.
```
-Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.1.0/openapi-generator-cli-5.1.0.jar
+Invoke-WebRequest -OutFile openapi-generator-cli.jar https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.1.1/openapi-generator-cli-5.1.1.jar
```
After downloading the JAR, run `java -jar openapi-generator-cli.jar help` to show the usage.
@@ -413,7 +402,7 @@ openapi-generator-cli version
To use a specific version of "openapi-generator-cli"
```sh
-openapi-generator-cli version-manager set 5.1.0
+openapi-generator-cli version-manager set 5.1.1
```
Or install it as dev-dependency:
@@ -437,7 +426,7 @@ java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar generat
(if you're on Windows, replace the last command with `java -jar modules\openapi-generator-cli\target\openapi-generator-cli.jar generate -i https://raw.githubusercontent.com/openapitools/openapi-generator/master/modules/openapi-generator/src/test/resources/3_0/petstore.yaml -g php -o c:\temp\php_api_client`)
-You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.1.0/openapi-generator-cli-5.1.0.jar)
+You can also download the JAR (latest release) directly from [maven.org](https://repo1.maven.org/maven2/org/openapitools/openapi-generator-cli/5.1.1/openapi-generator-cli-5.1.1.jar)
To get a list of **general** options available, please run `java -jar modules/openapi-generator-cli/target/openapi-generator-cli.jar help generate`
diff --git a/bin/configs/python-oas2.yaml b/bin/configs/python-oas2.yaml
index 4555376bd16..7c548fb3926 100644
--- a/bin/configs/python-oas2.yaml
+++ b/bin/configs/python-oas2.yaml
@@ -1,7 +1,10 @@
+# this file exists because in this file we omit setting disallowAdditionalPropertiesIfNotPresent
+# which makes it default to false
+# that false setting is needed for composed schemas to work
+# Composed schemas are schemas that contain the allOf/oneOf/anyOf keywords. v2 specs only support the allOf keyword.
generatorName: python
outputDir: samples/client/petstore/python
inputSpec: modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml
templateDir: modules/openapi-generator/src/main/resources/python
additionalProperties:
- disallowAdditionalPropertiesIfNotPresent: "true"
packageName: petstore_api
diff --git a/bin/configs/python-oas2_disallowAdditionalPropertiesIfNotPresent.yaml b/bin/configs/python-oas2_disallowAdditionalPropertiesIfNotPresent.yaml
new file mode 100644
index 00000000000..841cf77854e
--- /dev/null
+++ b/bin/configs/python-oas2_disallowAdditionalPropertiesIfNotPresent.yaml
@@ -0,0 +1,7 @@
+generatorName: python
+outputDir: samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent
+inputSpec: modules/openapi-generator/src/test/resources/2_0/python-client-experimental/petstore-with-fake-endpoints-models-for-testing.yaml
+templateDir: modules/openapi-generator/src/main/resources/python
+additionalProperties:
+ disallowAdditionalPropertiesIfNotPresent: "true"
+ packageName: petstore_api
diff --git a/docs/generators.md b/docs/generators.md
index 521bdc3dbf0..6cb063b2230 100644
--- a/docs/generators.md
+++ b/docs/generators.md
@@ -106,6 +106,7 @@ The following generators are available:
* [jaxrs-resteasy-eap](generators/jaxrs-resteasy-eap.md)
* [jaxrs-spec](generators/jaxrs-spec.md)
* [kotlin-server](generators/kotlin-server.md)
+* [kotlin-server-deprecated (deprecated)](generators/kotlin-server-deprecated.md)
* [kotlin-spring](generators/kotlin-spring.md)
* [kotlin-vertx (beta)](generators/kotlin-vertx.md)
* [nodejs-express-server (beta)](generators/nodejs-express-server.md)
diff --git a/docs/generators/README.md b/docs/generators/README.md
index 6510770e47a..a8ac9c9310c 100644
--- a/docs/generators/README.md
+++ b/docs/generators/README.md
@@ -91,6 +91,7 @@ The following generators are available:
* [jaxrs-resteasy-eap](jaxrs-resteasy-eap.md)
* [jaxrs-spec](jaxrs-spec.md)
* [kotlin-server](kotlin-server.md)
+* [kotlin-server-deprecated](kotlin-server-deprecated.md)
* [kotlin-spring](kotlin-spring.md)
* [kotlin-vertx (beta)](kotlin-vertx.md)
* [nodejs-express-server (beta)](nodejs-express-server.md)
diff --git a/docs/generators/kotlin-server-deprecated.md b/docs/generators/kotlin-server-deprecated.md
new file mode 100644
index 00000000000..5499354747c
--- /dev/null
+++ b/docs/generators/kotlin-server-deprecated.md
@@ -0,0 +1,214 @@
+---
+title: Config Options for kotlin-server-deprecated
+sidebar_label: kotlin-server-deprecated
+---
+
+These options may be applied as additional-properties (cli) or configOptions (plugins). Refer to [configuration docs](https://openapi-generator.tech/docs/configuration) for more details.
+
+| Option | Description | Values | Default |
+| ------ | ----------- | ------ | ------- |
+|apiSuffix|suffix for api classes| |Api|
+|artifactId|Generated artifact id (name of jar).| |kotlin-server-deprecated|
+|artifactVersion|Generated artifact's package version.| |1.0.0|
+|enumPropertyNaming|Naming convention for enum properties: 'camelCase', 'PascalCase', 'snake_case', 'UPPERCASE', and 'original'| |camelCase|
+|featureAutoHead|Automatically provide responses to HEAD requests for existing routes that have the GET verb defined.| |true|
+|featureCORS|Ktor by default provides an interceptor for implementing proper support for Cross-Origin Resource Sharing (CORS). See enable-cors.org.| |false|
+|featureCompression|Adds ability to compress outgoing content using gzip, deflate or custom encoder and thus reduce size of the response.| |true|
+|featureConditionalHeaders|Avoid sending content if client already has same content, by checking ETag or LastModified properties.| |false|
+|featureHSTS|Avoid sending content if client already has same content, by checking ETag or LastModified properties.| |true|
+|groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools|
+|library|library template (sub-template)|
- **ktor**
- ktor framework
|ktor|
+|modelMutable|Create mutable models| |false|
+|packageName|Generated artifact package name.| |org.openapitools.server|
+|parcelizeModels|toggle "@Parcelize" for generated models| |null|
+|serializableModel|boolean - toggle "implements Serializable" for generated models| |null|
+|serializationLibrary|What serialization library to use: 'moshi' (default), or 'gson' or 'jackson'| |moshi|
+|sortModelPropertiesByRequiredFlag|Sort model properties to place required parameters before optional parameters.| |null|
+|sortParamsByRequiredFlag|Sort method arguments to place required parameters before optional parameters.| |null|
+|sourceFolder|source folder for generated code| |src/main/kotlin|
+
+## IMPORT MAPPING
+
+| Type/Alias | Imports |
+| ---------- | ------- |
+|BigDecimal|java.math.BigDecimal|
+|Date|java.time.LocalDate|
+|DateTime|java.time.OffsetDateTime|
+|File|java.io.File|
+|LocalDate|java.time.LocalDate|
+|LocalDateTime|java.time.LocalDateTime|
+|LocalTime|java.time.LocalTime|
+|Timestamp|java.sql.Timestamp|
+|URI|java.net.URI|
+|UUID|java.util.UUID|
+
+
+## INSTANTIATION TYPES
+
+| Type/Alias | Instantiated By |
+| ---------- | --------------- |
+|array|kotlin.collections.ArrayList|
+|list|kotlin.collections.ArrayList|
+|map|kotlin.collections.HashMap|
+
+
+## LANGUAGE PRIMITIVES
+
+
+- kotlin.Array
+- kotlin.Boolean
+- kotlin.Byte
+- kotlin.ByteArray
+- kotlin.Char
+- kotlin.Double
+- kotlin.Float
+- kotlin.Int
+- kotlin.Long
+- kotlin.Short
+- kotlin.String
+- kotlin.collections.List
+- kotlin.collections.Map
+- kotlin.collections.Set
+
+
+## RESERVED WORDS
+
+
+- as
+- break
+- class
+- continue
+- do
+- else
+- false
+- for
+- fun
+- if
+- in
+- interface
+- is
+- null
+- object
+- package
+- return
+- super
+- this
+- throw
+- true
+- try
+- typealias
+- typeof
+- val
+- var
+- when
+- while
+
+
+## FEATURE SET
+
+
+### Client Modification Feature
+| Name | Supported | Defined By |
+| ---- | --------- | ---------- |
+|BasePath|✗|ToolingExtension
+|Authorizations|✗|ToolingExtension
+|UserAgent|✗|ToolingExtension
+|MockServer|✗|ToolingExtension
+
+### Data Type Feature
+| Name | Supported | Defined By |
+| ---- | --------- | ---------- |
+|Custom|✗|OAS2,OAS3
+|Int32|✓|OAS2,OAS3
+|Int64|✓|OAS2,OAS3
+|Float|✓|OAS2,OAS3
+|Double|✓|OAS2,OAS3
+|Decimal|✓|ToolingExtension
+|String|✓|OAS2,OAS3
+|Byte|✓|OAS2,OAS3
+|Binary|✓|OAS2,OAS3
+|Boolean|✓|OAS2,OAS3
+|Date|✓|OAS2,OAS3
+|DateTime|✓|OAS2,OAS3
+|Password|✓|OAS2,OAS3
+|File|✓|OAS2
+|Array|✓|OAS2,OAS3
+|Maps|✓|ToolingExtension
+|CollectionFormat|✓|OAS2
+|CollectionFormatMulti|✓|OAS2
+|Enum|✓|OAS2,OAS3
+|ArrayOfEnum|✓|ToolingExtension
+|ArrayOfModel|✓|ToolingExtension
+|ArrayOfCollectionOfPrimitives|✓|ToolingExtension
+|ArrayOfCollectionOfModel|✓|ToolingExtension
+|ArrayOfCollectionOfEnum|✓|ToolingExtension
+|MapOfEnum|✓|ToolingExtension
+|MapOfModel|✓|ToolingExtension
+|MapOfCollectionOfPrimitives|✓|ToolingExtension
+|MapOfCollectionOfModel|✓|ToolingExtension
+|MapOfCollectionOfEnum|✓|ToolingExtension
+
+### Documentation Feature
+| Name | Supported | Defined By |
+| ---- | --------- | ---------- |
+|Readme|✓|ToolingExtension
+|Model|✓|ToolingExtension
+|Api|✓|ToolingExtension
+
+### Global Feature
+| Name | Supported | Defined By |
+| ---- | --------- | ---------- |
+|Host|✓|OAS2,OAS3
+|BasePath|✓|OAS2,OAS3
+|Info|✓|OAS2,OAS3
+|Schemes|✗|OAS2,OAS3
+|PartialSchemes|✓|OAS2,OAS3
+|Consumes|✓|OAS2
+|Produces|✓|OAS2
+|ExternalDocumentation|✓|OAS2,OAS3
+|Examples|✓|OAS2,OAS3
+|XMLStructureDefinitions|✗|OAS2,OAS3
+|MultiServer|✗|OAS3
+|ParameterizedServer|✗|OAS3
+|ParameterStyling|✗|OAS3
+|Callbacks|✗|OAS3
+|LinkObjects|✗|OAS3
+
+### Parameter Feature
+| Name | Supported | Defined By |
+| ---- | --------- | ---------- |
+|Path|✓|OAS2,OAS3
+|Query|✓|OAS2,OAS3
+|Header|✓|OAS2,OAS3
+|Body|✓|OAS2
+|FormUnencoded|✓|OAS2
+|FormMultipart|✓|OAS2
+|Cookie|✗|OAS3
+
+### Schema Support Feature
+| Name | Supported | Defined By |
+| ---- | --------- | ---------- |
+|Simple|✓|OAS2,OAS3
+|Composite|✓|OAS2,OAS3
+|Polymorphism|✗|OAS2,OAS3
+|Union|✗|OAS3
+
+### Security Feature
+| Name | Supported | Defined By |
+| ---- | --------- | ---------- |
+|BasicAuth|✓|OAS2,OAS3
+|ApiKey|✓|OAS2,OAS3
+|OpenIDConnect|✗|OAS3
+|BearerToken|✗|OAS3
+|OAuth2_Implicit|✓|OAS2,OAS3
+|OAuth2_Password|✗|OAS2,OAS3
+|OAuth2_ClientCredentials|✗|OAS2,OAS3
+|OAuth2_AuthorizationCode|✗|OAS2,OAS3
+
+### Wire Format Feature
+| Name | Supported | Defined By |
+| ---- | --------- | ---------- |
+|JSON|✓|OAS2,OAS3
+|XML|✓|OAS2,OAS3
+|PROTOBUF|✗|ToolingExtension
+|Custom|✗|OAS2,OAS3
diff --git a/docs/generators/kotlin-server.md b/docs/generators/kotlin-server.md
index ecaf99a294f..b45dc3ffb4d 100644
--- a/docs/generators/kotlin-server.md
+++ b/docs/generators/kotlin-server.md
@@ -16,6 +16,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
|featureCompression|Adds ability to compress outgoing content using gzip, deflate or custom encoder and thus reduce size of the response.| |true|
|featureConditionalHeaders|Avoid sending content if client already has same content, by checking ETag or LastModified properties.| |false|
|featureHSTS|Avoid sending content if client already has same content, by checking ETag or LastModified properties.| |true|
+|featureLocations|Generates routes in a typed way, for both: constructing URLs and reading the parameters.| |true|
|groupId|Generated artifact package's organization (i.e. maven groupId).| |org.openapitools|
|library|library template (sub-template)|
- **ktor**
- ktor framework
|ktor|
|modelMutable|Create mutable models| |false|
diff --git a/docs/generators/python.md b/docs/generators/python.md
index 4cf503ff278..fe60f0e511c 100644
--- a/docs/generators/python.md
+++ b/docs/generators/python.md
@@ -7,6 +7,7 @@ These options may be applied as additional-properties (cli) or configOptions (pl
| Option | Description | Values | Default |
| ------ | ----------- | ------ | ------- |
+|disallowAdditionalPropertiesIfNotPresent|If false, the 'additionalProperties' implementation (set to true by default) is compliant with the OAS and JSON schema specifications. If true (default), keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default.|
- **false**
- The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.
- **true**
- Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default. NOTE: this option breaks composition and will be removed in 6.0.0
|false|
|generateSourceCodeOnly|Specifies that only a library source code is to be generated.| |false|
|hideGenerationTimestamp|Hides the generation timestamp when files are generated.| |true|
|library|library template (sub-template) to use: asyncio, tornado, urllib3| |urllib3|
@@ -28,7 +29,6 @@ These options may be applied as additional-properties (cli) or configOptions (pl
| Type/Alias | Instantiated By |
| ---------- | --------------- |
-|map|dict|
## LANGUAGE PRIMITIVES
diff --git a/modules/openapi-generator-cli/pom.xml b/modules/openapi-generator-cli/pom.xml
index 58be25191ed..fb3c5139b0e 100644
--- a/modules/openapi-generator-cli/pom.xml
+++ b/modules/openapi-generator-cli/pom.xml
@@ -4,7 +4,7 @@
org.openapitools
openapi-generator-project
-
5.1.1
+
5.2.0-SNAPSHOT
../..
diff --git a/modules/openapi-generator-core/pom.xml b/modules/openapi-generator-core/pom.xml
index d64cb848dd0..dc964764aa6 100644
--- a/modules/openapi-generator-core/pom.xml
+++ b/modules/openapi-generator-core/pom.xml
@@ -6,7 +6,7 @@
openapi-generator-project
org.openapitools
-
5.1.1
+
5.2.0-SNAPSHOT
../..
diff --git a/modules/openapi-generator-gradle-plugin/gradle.properties b/modules/openapi-generator-gradle-plugin/gradle.properties
index 8f1066a02dc..01c9f563508 100644
--- a/modules/openapi-generator-gradle-plugin/gradle.properties
+++ b/modules/openapi-generator-gradle-plugin/gradle.properties
@@ -1,5 +1,5 @@
# RELEASE_VERSION
-openApiGeneratorVersion=5.1.1
+openApiGeneratorVersion=5.2.0-SNAPSHOT
# /RELEASE_VERSION
# BEGIN placeholders
diff --git a/modules/openapi-generator-gradle-plugin/pom.xml b/modules/openapi-generator-gradle-plugin/pom.xml
index b017790425e..fc856601f67 100644
--- a/modules/openapi-generator-gradle-plugin/pom.xml
+++ b/modules/openapi-generator-gradle-plugin/pom.xml
@@ -4,7 +4,7 @@
org.openapitools
openapi-generator-project
-
5.1.1
+
5.2.0-SNAPSHOT
../..
diff --git a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties
index 589e9121578..8b65b3b4572 100644
--- a/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties
+++ b/modules/openapi-generator-gradle-plugin/samples/local-spec/gradle.properties
@@ -1,3 +1,3 @@
# RELEASE_VERSION
-openApiGeneratorVersion=5.1.1-SNAPSHOT
+openApiGeneratorVersion=5.2.0-SNAPSHOT
# /RELEASE_VERSION
diff --git a/modules/openapi-generator-maven-plugin/examples/java-client.xml b/modules/openapi-generator-maven-plugin/examples/java-client.xml
index 4dbd2ad7aef..fb7e9a810c3 100644
--- a/modules/openapi-generator-maven-plugin/examples/java-client.xml
+++ b/modules/openapi-generator-maven-plugin/examples/java-client.xml
@@ -13,7 +13,7 @@
org.openapitools
openapi-generator-maven-plugin
-
5.1.1
+
5.2.0-SNAPSHOT
diff --git a/modules/openapi-generator-maven-plugin/examples/kotlin.xml b/modules/openapi-generator-maven-plugin/examples/kotlin.xml
index f501797cec6..d6ddeeb890d 100644
--- a/modules/openapi-generator-maven-plugin/examples/kotlin.xml
+++ b/modules/openapi-generator-maven-plugin/examples/kotlin.xml
@@ -15,7 +15,7 @@
org.openapitools
openapi-generator-maven-plugin
- 5.1.1-SNAPSHOT
+ 5.2.0-SNAPSHOT
diff --git a/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml b/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml
index ded5be470f2..b2a3696e1c0 100644
--- a/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml
+++ b/modules/openapi-generator-maven-plugin/examples/multi-module/java-client/pom.xml
@@ -19,7 +19,7 @@
org.openapitools
openapi-generator-maven-plugin
- 5.1.1
+ 5.2.0-SNAPSHOT
diff --git a/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml b/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml
index 06b66510d3d..f3ef4ff8d49 100644
--- a/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml
+++ b/modules/openapi-generator-maven-plugin/examples/non-java-invalid-spec.xml
@@ -13,7 +13,7 @@
org.openapitools
openapi-generator-maven-plugin
- 5.1.1
+ 5.2.0-SNAPSHOT
diff --git a/modules/openapi-generator-maven-plugin/examples/non-java.xml b/modules/openapi-generator-maven-plugin/examples/non-java.xml
index dd73d6d13de..1f18f87d755 100644
--- a/modules/openapi-generator-maven-plugin/examples/non-java.xml
+++ b/modules/openapi-generator-maven-plugin/examples/non-java.xml
@@ -13,7 +13,7 @@
org.openapitools
openapi-generator-maven-plugin
- 5.1.1
+ 5.2.0-SNAPSHOT
diff --git a/modules/openapi-generator-maven-plugin/examples/spring.xml b/modules/openapi-generator-maven-plugin/examples/spring.xml
index 538b3a1f3d0..c0932d04dd0 100644
--- a/modules/openapi-generator-maven-plugin/examples/spring.xml
+++ b/modules/openapi-generator-maven-plugin/examples/spring.xml
@@ -20,7 +20,7 @@
org.openapitools
openapi-generator-maven-plugin
- 5.1.1-SNAPSHOT
+ 5.2.0-SNAPSHOT
diff --git a/modules/openapi-generator-maven-plugin/pom.xml b/modules/openapi-generator-maven-plugin/pom.xml
index 8853a970f32..f58c7f17bcd 100644
--- a/modules/openapi-generator-maven-plugin/pom.xml
+++ b/modules/openapi-generator-maven-plugin/pom.xml
@@ -5,7 +5,7 @@
org.openapitools
openapi-generator-project
- 5.1.1
+ 5.2.0-SNAPSHOT
../..
diff --git a/modules/openapi-generator-online/pom.xml b/modules/openapi-generator-online/pom.xml
index cb080960aaf..eff136ed4a3 100644
--- a/modules/openapi-generator-online/pom.xml
+++ b/modules/openapi-generator-online/pom.xml
@@ -4,7 +4,7 @@
org.openapitools
openapi-generator-project
- 5.1.1
+ 5.2.0-SNAPSHOT
../..
diff --git a/modules/openapi-generator/pom.xml b/modules/openapi-generator/pom.xml
index c66b722ecbb..2347fc4090e 100644
--- a/modules/openapi-generator/pom.xml
+++ b/modules/openapi-generator/pom.xml
@@ -4,7 +4,7 @@
org.openapitools
openapi-generator-project
- 5.1.1
+ 5.2.0-SNAPSHOT
../..
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java
index d4d9902da7f..0c182417c94 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerCodegen.java
@@ -42,15 +42,17 @@ public class KotlinServerCodegen extends AbstractKotlinCodegen {
private Boolean hstsFeatureEnabled = true;
private Boolean corsFeatureEnabled = false;
private Boolean compressionFeatureEnabled = true;
+ private Boolean locationsFeatureEnabled = true;
- // This is here to potentially warn the user when an option is not supoprted by the target framework.
+ // This is here to potentially warn the user when an option is not supported by the target framework.
private Map> optionsSupportedPerFramework = new ImmutableMap.Builder>()
.put(Constants.KTOR, Arrays.asList(
Constants.AUTOMATIC_HEAD_REQUESTS,
Constants.CONDITIONAL_HEADERS,
Constants.HSTS,
Constants.CORS,
- Constants.COMPRESSION
+ Constants.COMPRESSION,
+ Constants.LOCATIONS
))
.build();
@@ -85,6 +87,8 @@ public class KotlinServerCodegen extends AbstractKotlinCodegen {
artifactId = "kotlin-server";
packageName = "org.openapitools.server";
+ typeMapping.put("array", "kotlin.collections.List");
+
// cliOptions default redefinition need to be updated
updateOption(CodegenConstants.ARTIFACT_ID, this.artifactId);
updateOption(CodegenConstants.PACKAGE_NAME, this.packageName);
@@ -110,6 +114,7 @@ public class KotlinServerCodegen extends AbstractKotlinCodegen {
addSwitch(Constants.HSTS, Constants.HSTS_DESC, getHstsFeatureEnabled());
addSwitch(Constants.CORS, Constants.CORS_DESC, getCorsFeatureEnabled());
addSwitch(Constants.COMPRESSION, Constants.COMPRESSION_DESC, getCompressionFeatureEnabled());
+ addSwitch(Constants.LOCATIONS, Constants.LOCATIONS_DESC, getLocationsFeatureEnabled());
}
public Boolean getAutoHeadFeatureEnabled() {
@@ -156,6 +161,14 @@ public class KotlinServerCodegen extends AbstractKotlinCodegen {
this.hstsFeatureEnabled = hstsFeatureEnabled;
}
+ public Boolean getLocationsFeatureEnabled() {
+ return locationsFeatureEnabled;
+ }
+
+ public void setLocationsFeatureEnabled(Boolean locationsFeatureEnabled) {
+ this.locationsFeatureEnabled = locationsFeatureEnabled;
+ }
+
public String getName() {
return "kotlin-server";
}
@@ -209,6 +222,12 @@ public class KotlinServerCodegen extends AbstractKotlinCodegen {
additionalProperties.put(Constants.COMPRESSION, getCompressionFeatureEnabled());
}
+ if (additionalProperties.containsKey(Constants.LOCATIONS)) {
+ setLocationsFeatureEnabled(convertPropertyToBooleanAndWriteBack(Constants.LOCATIONS));
+ } else {
+ additionalProperties.put(Constants.LOCATIONS, getLocationsFeatureEnabled());
+ }
+
boolean generateApis = additionalProperties.containsKey(CodegenConstants.GENERATE_APIS) && (Boolean) additionalProperties.get(CodegenConstants.GENERATE_APIS);
String packageFolder = (sourceFolder + File.separator + packageName).replace(".", File.separator);
String resourcesFolder = "src/main/resources"; // not sure this can be user configurable.
@@ -223,7 +242,7 @@ public class KotlinServerCodegen extends AbstractKotlinCodegen {
supportingFiles.add(new SupportingFile("AppMain.kt.mustache", packageFolder, "AppMain.kt"));
supportingFiles.add(new SupportingFile("Configuration.kt.mustache", packageFolder, "Configuration.kt"));
- if (generateApis) {
+ if (generateApis && locationsFeatureEnabled) {
supportingFiles.add(new SupportingFile("Paths.kt.mustache", packageFolder, "Paths.kt"));
}
@@ -247,6 +266,8 @@ public class KotlinServerCodegen extends AbstractKotlinCodegen {
public final static String CORS_DESC = "Ktor by default provides an interceptor for implementing proper support for Cross-Origin Resource Sharing (CORS). See enable-cors.org.";
public final static String COMPRESSION = "featureCompression";
public final static String COMPRESSION_DESC = "Adds ability to compress outgoing content using gzip, deflate or custom encoder and thus reduce size of the response.";
+ public final static String LOCATIONS = "featureLocations";
+ public final static String LOCATIONS_DESC = "Generates routes in a typed way, for both: constructing URLs and reading the parameters.";
}
@Override
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerDeprecatedCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerDeprecatedCodegen.java
new file mode 100644
index 00000000000..84cee1d2aa9
--- /dev/null
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/KotlinServerDeprecatedCodegen.java
@@ -0,0 +1,270 @@
+/*
+ * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+ * Copyright 2018 SmartBear Software
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.openapitools.codegen.languages;
+
+import com.google.common.collect.ImmutableMap;
+import org.apache.commons.lang3.StringUtils;
+import org.openapitools.codegen.CliOption;
+import org.openapitools.codegen.CodegenConstants;
+import org.openapitools.codegen.CodegenType;
+import org.openapitools.codegen.SupportingFile;
+import org.openapitools.codegen.meta.GeneratorMetadata;
+import org.openapitools.codegen.meta.Stability;
+import org.openapitools.codegen.meta.features.*;
+import org.slf4j.Logger;
+import org.slf4j.LoggerFactory;
+
+import java.io.File;
+import java.util.Arrays;
+import java.util.EnumSet;
+import java.util.List;
+import java.util.Map;
+
+public class KotlinServerDeprecatedCodegen extends AbstractKotlinCodegen {
+
+ public static final String DEFAULT_LIBRARY = Constants.KTOR;
+ private final Logger LOGGER = LoggerFactory.getLogger(KotlinServerDeprecatedCodegen.class);
+ private Boolean autoHeadFeatureEnabled = true;
+ private Boolean conditionalHeadersFeatureEnabled = false;
+ private Boolean hstsFeatureEnabled = true;
+ private Boolean corsFeatureEnabled = false;
+ private Boolean compressionFeatureEnabled = true;
+
+ // This is here to potentially warn the user when an option is not supported by the target framework.
+ private Map> optionsSupportedPerFramework = new ImmutableMap.Builder>()
+ .put(Constants.KTOR, Arrays.asList(
+ Constants.AUTOMATIC_HEAD_REQUESTS,
+ Constants.CONDITIONAL_HEADERS,
+ Constants.HSTS,
+ Constants.CORS,
+ Constants.COMPRESSION
+ ))
+ .build();
+
+ /**
+ * Constructs an instance of `KotlinServerDeprecatedCodegen`.
+ */
+ public KotlinServerDeprecatedCodegen() {
+ super();
+
+ modifyFeatureSet(features -> features
+ .includeDocumentationFeatures(DocumentationFeature.Readme)
+ .wireFormatFeatures(EnumSet.of(WireFormatFeature.JSON, WireFormatFeature.XML))
+ .securityFeatures(EnumSet.of(
+ SecurityFeature.BasicAuth,
+ SecurityFeature.ApiKey,
+ SecurityFeature.OAuth2_Implicit
+ ))
+ .excludeGlobalFeatures(
+ GlobalFeature.XMLStructureDefinitions,
+ GlobalFeature.Callbacks,
+ GlobalFeature.LinkObjects,
+ GlobalFeature.ParameterStyling
+ )
+ .excludeSchemaSupportFeatures(
+ SchemaSupportFeature.Polymorphism
+ )
+ .excludeParameterFeatures(
+ ParameterFeature.Cookie
+ )
+ );
+
+ generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata)
+ .stability(Stability.DEPRECATED)
+ .build();
+
+ artifactId = "kotlin-server-deprecated";
+ packageName = "org.openapitools.server";
+
+ // cliOptions default redefinition need to be updated
+ updateOption(CodegenConstants.ARTIFACT_ID, this.artifactId);
+ updateOption(CodegenConstants.PACKAGE_NAME, this.packageName);
+
+ outputFolder = "generated-code" + File.separator + "kotlin-server-deprecated";
+ modelTemplateFiles.put("model.mustache", ".kt");
+ apiTemplateFiles.put("api.mustache", ".kt");
+ embeddedTemplateDir = templateDir = "kotlin-server-deprecated";
+ apiPackage = packageName + ".apis";
+ modelPackage = packageName + ".models";
+
+ supportedLibraries.put(Constants.KTOR, "ktor framework");
+
+ // TODO: Configurable server engine. Defaults to netty in build.gradle.
+ CliOption library = new CliOption(CodegenConstants.LIBRARY, CodegenConstants.LIBRARY_DESC);
+ library.setDefault(DEFAULT_LIBRARY);
+ library.setEnum(supportedLibraries);
+
+ cliOptions.add(library);
+
+ addSwitch(Constants.AUTOMATIC_HEAD_REQUESTS, Constants.AUTOMATIC_HEAD_REQUESTS_DESC, getAutoHeadFeatureEnabled());
+ addSwitch(Constants.CONDITIONAL_HEADERS, Constants.CONDITIONAL_HEADERS_DESC, getConditionalHeadersFeatureEnabled());
+ addSwitch(Constants.HSTS, Constants.HSTS_DESC, getHstsFeatureEnabled());
+ addSwitch(Constants.CORS, Constants.CORS_DESC, getCorsFeatureEnabled());
+ addSwitch(Constants.COMPRESSION, Constants.COMPRESSION_DESC, getCompressionFeatureEnabled());
+ }
+
+ public Boolean getAutoHeadFeatureEnabled() {
+ return autoHeadFeatureEnabled;
+ }
+
+ public void setAutoHeadFeatureEnabled(Boolean autoHeadFeatureEnabled) {
+ this.autoHeadFeatureEnabled = autoHeadFeatureEnabled;
+ }
+
+ public Boolean getCompressionFeatureEnabled() {
+ return compressionFeatureEnabled;
+ }
+
+ public void setCompressionFeatureEnabled(Boolean compressionFeatureEnabled) {
+ this.compressionFeatureEnabled = compressionFeatureEnabled;
+ }
+
+ public Boolean getConditionalHeadersFeatureEnabled() {
+ return conditionalHeadersFeatureEnabled;
+ }
+
+ public void setConditionalHeadersFeatureEnabled(Boolean conditionalHeadersFeatureEnabled) {
+ this.conditionalHeadersFeatureEnabled = conditionalHeadersFeatureEnabled;
+ }
+
+ public Boolean getCorsFeatureEnabled() {
+ return corsFeatureEnabled;
+ }
+
+ public void setCorsFeatureEnabled(Boolean corsFeatureEnabled) {
+ this.corsFeatureEnabled = corsFeatureEnabled;
+ }
+
+ public String getHelp() {
+ return "Generates a Kotlin server (Ktor v1.1.3). IMPORTANT: this generator has been deprecated." +
+ " Please migrate to `kotlin-server` which supports Ktor v1.5.2+.";
+ }
+
+ public Boolean getHstsFeatureEnabled() {
+ return hstsFeatureEnabled;
+ }
+
+ public void setHstsFeatureEnabled(Boolean hstsFeatureEnabled) {
+ this.hstsFeatureEnabled = hstsFeatureEnabled;
+ }
+
+ public String getName() {
+ return "kotlin-server-deprecated";
+ }
+
+ public CodegenType getTag() {
+ return CodegenType.SERVER;
+ }
+
+ @Override
+ public void processOpts() {
+ super.processOpts();
+
+ if (additionalProperties.containsKey(CodegenConstants.LIBRARY)) {
+ this.setLibrary((String) additionalProperties.get(CodegenConstants.LIBRARY));
+ }
+
+ // set default library to "ktor"
+ if (StringUtils.isEmpty(library)) {
+ this.setLibrary(DEFAULT_LIBRARY);
+ additionalProperties.put(CodegenConstants.LIBRARY, DEFAULT_LIBRARY);
+ LOGGER.info("`library` option is empty. Default to " + DEFAULT_LIBRARY);
+ }
+
+ if (additionalProperties.containsKey(Constants.AUTOMATIC_HEAD_REQUESTS)) {
+ setAutoHeadFeatureEnabled(convertPropertyToBooleanAndWriteBack(Constants.AUTOMATIC_HEAD_REQUESTS));
+ } else {
+ additionalProperties.put(Constants.AUTOMATIC_HEAD_REQUESTS, getAutoHeadFeatureEnabled());
+ }
+
+ if (additionalProperties.containsKey(Constants.CONDITIONAL_HEADERS)) {
+ setConditionalHeadersFeatureEnabled(convertPropertyToBooleanAndWriteBack(Constants.CONDITIONAL_HEADERS));
+ } else {
+ additionalProperties.put(Constants.CONDITIONAL_HEADERS, getConditionalHeadersFeatureEnabled());
+ }
+
+ if (additionalProperties.containsKey(Constants.HSTS)) {
+ setHstsFeatureEnabled(convertPropertyToBooleanAndWriteBack(Constants.HSTS));
+ } else {
+ additionalProperties.put(Constants.HSTS, getHstsFeatureEnabled());
+ }
+
+ if (additionalProperties.containsKey(Constants.CORS)) {
+ setCorsFeatureEnabled(convertPropertyToBooleanAndWriteBack(Constants.CORS));
+ } else {
+ additionalProperties.put(Constants.CORS, getCorsFeatureEnabled());
+ }
+
+ if (additionalProperties.containsKey(Constants.COMPRESSION)) {
+ setCompressionFeatureEnabled(convertPropertyToBooleanAndWriteBack(Constants.COMPRESSION));
+ } else {
+ additionalProperties.put(Constants.COMPRESSION, getCompressionFeatureEnabled());
+ }
+
+ boolean generateApis = additionalProperties.containsKey(CodegenConstants.GENERATE_APIS) && (Boolean) additionalProperties.get(CodegenConstants.GENERATE_APIS);
+ String packageFolder = (sourceFolder + File.separator + packageName).replace(".", File.separator);
+ String resourcesFolder = "src/main/resources"; // not sure this can be user configurable.
+
+ supportingFiles.add(new SupportingFile("README.mustache", "", "README.md"));
+ supportingFiles.add(new SupportingFile("Dockerfile.mustache", "", "Dockerfile"));
+
+ supportingFiles.add(new SupportingFile("build.gradle.mustache", "", "build.gradle"));
+ supportingFiles.add(new SupportingFile("settings.gradle.mustache", "", "settings.gradle"));
+ supportingFiles.add(new SupportingFile("gradle.properties", "", "gradle.properties"));
+
+ supportingFiles.add(new SupportingFile("AppMain.kt.mustache", packageFolder, "AppMain.kt"));
+ supportingFiles.add(new SupportingFile("Configuration.kt.mustache", packageFolder, "Configuration.kt"));
+
+ if (generateApis) {
+ supportingFiles.add(new SupportingFile("Paths.kt.mustache", packageFolder, "Paths.kt"));
+ }
+
+ supportingFiles.add(new SupportingFile("application.conf.mustache", resourcesFolder, "application.conf"));
+ supportingFiles.add(new SupportingFile("logback.xml", resourcesFolder, "logback.xml"));
+
+ final String infrastructureFolder = (sourceFolder + File.separator + packageName + File.separator + "infrastructure").replace(".", File.separator);
+
+ supportingFiles.add(new SupportingFile("ApiKeyAuth.kt.mustache", infrastructureFolder, "ApiKeyAuth.kt"));
+ }
+
+ public static class Constants {
+ public final static String KTOR = "ktor";
+ public final static String AUTOMATIC_HEAD_REQUESTS = "featureAutoHead";
+ public final static String AUTOMATIC_HEAD_REQUESTS_DESC = "Automatically provide responses to HEAD requests for existing routes that have the GET verb defined.";
+ public final static String CONDITIONAL_HEADERS = "featureConditionalHeaders";
+ public final static String CONDITIONAL_HEADERS_DESC = "Avoid sending content if client already has same content, by checking ETag or LastModified properties.";
+ public final static String HSTS = "featureHSTS";
+ public final static String HSTS_DESC = "Avoid sending content if client already has same content, by checking ETag or LastModified properties.";
+ public final static String CORS = "featureCORS";
+ public final static String CORS_DESC = "Ktor by default provides an interceptor for implementing proper support for Cross-Origin Resource Sharing (CORS). See enable-cors.org.";
+ public final static String COMPRESSION = "featureCompression";
+ public final static String COMPRESSION_DESC = "Adds ability to compress outgoing content using gzip, deflate or custom encoder and thus reduce size of the response.";
+ }
+
+ @Override
+ public void postProcess() {
+ System.out.println("################################################################################");
+ System.out.println("# Thanks for using OpenAPI Generator. #");
+ System.out.println("# Please consider donation to help us maintain this project \uD83D\uDE4F #");
+ System.out.println("# https://opencollective.com/openapi_generator/donate #");
+ System.out.println("# #");
+ System.out.println("# This generator's contributed by Jim Schubert (https://github.com/jimschubert)#");
+ System.out.println("# Please support his work directly via https://patreon.com/jimschubert \uD83D\uDE4F #");
+ System.out.println("################################################################################");
+ }
+}
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 87811995525..a00683cbd4a 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
@@ -67,10 +67,6 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
// 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))
@@ -96,9 +92,8 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
ParameterFeature.Cookie
)
);
-
- // this may set datatype right for additional properties
- instantiationTypes.put("map", "dict");
+ // needed for type object with additionalProperties: false
+ typeMapping.put("object", "dict");
languageSpecificPrimitives.add("file_type");
languageSpecificPrimitives.add("none_type");
@@ -113,6 +108,20 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
cliOptions.add(new CliOption(CodegenConstants.PYTHON_ATTR_NONE_IF_UNSET, CodegenConstants.PYTHON_ATTR_NONE_IF_UNSET_DESC)
.defaultValue(Boolean.FALSE.toString()));
+ // 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.FALSE.toString());
+ Map disallowAdditionalPropertiesIfNotPresentOpts = new HashMap<>();
+ disallowAdditionalPropertiesIfNotPresentOpts.put("false",
+ "The 'additionalProperties' implementation is compliant with the OAS and JSON schema specifications.");
+ disallowAdditionalPropertiesIfNotPresentOpts.put("true",
+ "Keep the old (incorrect) behaviour that 'additionalProperties' is set to false by default. NOTE: "+
+ "this option breaks composition and will be removed in 6.0.0"
+ );
+ disallowAdditionalPropertiesIfNotPresentOpt.setEnum(disallowAdditionalPropertiesIfNotPresentOpts);
+ cliOptions.add(disallowAdditionalPropertiesIfNotPresentOpt);
+
generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata)
.stability(Stability.EXPERIMENTAL)
.build();
@@ -162,6 +171,18 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
}
additionalProperties.put("attrNoneIfUnset", attrNoneIfUnset);
+ // When the 'additionalProperties' keyword is not present in a OAS schema, allow
+ // undeclared properties. This is compliant with the JSON schema specification.
+ // setting this to false is required to have composed schemas work because:
+ // anyOf SchemaA + SchemaB, requires that props present only in A are accepted in B because in B
+ // they are additional properties
+ Boolean disallowAddProps = false;
+ if (additionalProperties.containsKey(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT)) {
+ disallowAddProps = Boolean.valueOf(additionalProperties.get(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT).toString());
+ }
+ this.setDisallowAdditionalPropertiesIfNotPresent(disallowAddProps);
+
+
// check library option to ensure only urllib3 is supported
if (!DEFAULT_LIBRARY.equals(getLibrary())) {
throw new RuntimeException("Only the `urllib3` library is supported in the refactored `python` client generator at the moment. Please fall back to `python-legacy` client generator for the time being. We welcome contributions to add back `asyncio`, `tornado` support to the `python` client generator.");
@@ -730,6 +751,62 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
return null;
}
+ @Override
+ protected Schema getAdditionalProperties(Schema schema) {
+ /*
+ Use cases:
+ 1. addProps set to schema in spec: return that schema
+ 2. addProps unset w/ getDisallowAdditionalPropertiesIfNotPresent -> null
+ 3. addProps unset w/ getDisallowAdditionalPropertiesIfNotPresent=False -> new Schema()
+ 4. addProps true -> new Schema() NOTE: v3 only
+ 5. addprops false -> null NOTE: v3 only
+ */
+ Object addProps = schema.getAdditionalProperties();
+ if (addProps instanceof Schema) {
+ return (Schema) addProps;
+ }
+ 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 (getDisallowAdditionalPropertiesIfNotPresent()) {
+ // 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 empty schema to allow any type
+ return new Schema();
+ }
+ return null;
+ }
+
/**
* Return a string representation of the Python types for the specified OAS schema.
* Primitive types in the OAS specification are implemented in Python using the corresponding
@@ -769,16 +846,39 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
}
}
if (isAnyTypeSchema(p)) {
+ // for v2 specs only, swagger-parser never generates an AnyType schemas even though it should generate them
+ // https://github.com/swagger-api/swagger-parser/issues/1378
+ // switch to v3 if you need AnyType to work
return prefix + "bool, date, datetime, dict, float, int, list, str, none_type" + suffix;
}
+ String originalSpecVersion = "X";
+ if (this.openAPI.getExtensions() != null && this.openAPI.getExtensions().containsKey("x-original-swagger-version")) {
+ originalSpecVersion = (String) this.openAPI.getExtensions().get("x-original-swagger-version");
+ originalSpecVersion = originalSpecVersion.substring(0, 1);
+
+ }
+ Boolean v2DisallowAdditionalPropertiesIfNotPresentAddPropsNullCase = (getAdditionalProperties(p) == null && this.getDisallowAdditionalPropertiesIfNotPresent() && originalSpecVersion.equals("2"));
+ Schema emptySchema = new Schema();
+ Boolean v2WithCompositionAddPropsAnyTypeSchemaCase = (getAdditionalProperties(p) != null && emptySchema.equals(getAdditionalProperties(p)) && originalSpecVersion.equals("2"));
+ if (isFreeFormObject(p) && (v2DisallowAdditionalPropertiesIfNotPresentAddPropsNullCase || v2WithCompositionAddPropsAnyTypeSchemaCase)) {
+ // for v2 specs only, input AnyType schemas (type unset) or schema {} results in FreeFromObject schemas
+ // per https://github.com/swagger-api/swagger-parser/issues/1378
+ // v2 spec uses cases
+ // 1. AnyType schemas
+ // 2. type object schema with no other info
+ // use case 1 + 2 -> both become use case 1
+ // switch to v3 if you need use cases 1 + 2 to work correctly
+ return prefix + "bool, date, datetime, dict, float, int, list, str, none_type" + fullSuffix;
+ }
// Resolve $ref because ModelUtils.isXYZ methods do not automatically resolve references.
if (ModelUtils.isNullable(ModelUtils.getReferencedSchema(this.openAPI, p))) {
fullSuffix = ", none_type" + suffix;
}
- 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())) && getAdditionalProperties(p) != null) {
+ Boolean v3WithCompositionAddPropsAnyTypeSchemaCase = (getAdditionalProperties(p) != null && emptySchema.equals(getAdditionalProperties(p)) && originalSpecVersion.equals("3"));
+ if (isFreeFormObject(p) && v3WithCompositionAddPropsAnyTypeSchemaCase) {
+ // v3 code path, use case: type object schema with no other schema info
+ return prefix + "{str: (bool, date, datetime, dict, float, int, list, str, none_type)}" + fullSuffix;
+ } else 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)) {
@@ -837,7 +937,7 @@ public class PythonClientCodegen extends PythonLegacyClientCodegen {
// The 'addProps' may be a reference, getTypeDeclaration will resolve
// the reference.
List referencedModelNames = new ArrayList();
- codegenModel.additionalPropertiesType = getTypeString(addProps, "", "", referencedModelNames);
+ getTypeString(addProps, "", "", referencedModelNames);
if (referencedModelNames.size() != 0) {
// Models that are referenced in the 'additionalPropertiesType' keyword
// must be added to the imports.
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonLegacyClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonLegacyClientCodegen.java
index 8a213a37757..138b1c54356 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonLegacyClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonLegacyClientCodegen.java
@@ -36,6 +36,7 @@ public class PythonLegacyClientCodegen extends AbstractPythonCodegen implements
// nose is a python testing framework, we use pytest if USE_NOSE is unset
public static final String USE_NOSE = "useNose";
public static final String RECURSION_LIMIT = "recursionLimit";
+ public static final String PYTHON_ATTR_NONE_IF_UNSET = "pythonAttrNoneIfUnset";
protected String packageUrl;
protected String apiDocPath = "docs/";
diff --git a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig
index 87ab2b5e352..4226cade162 100644
--- a/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig
+++ b/modules/openapi-generator/src/main/resources/META-INF/services/org.openapitools.codegen.CodegenConfig
@@ -44,6 +44,7 @@ org.openapitools.codegen.languages.GraphQLNodeJSExpressServerCodegen
org.openapitools.codegen.languages.GroovyClientCodegen
org.openapitools.codegen.languages.KotlinClientCodegen
org.openapitools.codegen.languages.KotlinServerCodegen
+org.openapitools.codegen.languages.KotlinServerDeprecatedCodegen
org.openapitools.codegen.languages.KotlinSpringServerCodegen
org.openapitools.codegen.languages.KotlinVertxServerCodegen
org.openapitools.codegen.languages.KtormSchemaCodegen
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/README.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/README.mustache
new file mode 100644
index 00000000000..24c4728fdd3
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/README.mustache
@@ -0,0 +1,84 @@
+# {{packageName}} - Kotlin Server library for {{appName}}
+
+## Requires
+
+* Kotlin 1.1.2
+* Gradle 3.3
+
+## Build
+
+First, create the gradle wrapper script:
+
+```
+gradle wrapper
+```
+
+Then, run:
+
+```
+./gradlew check assemble
+```
+
+This runs all tests and packages the library.
+
+## Features/Implementation Notes
+
+* Supports JSON inputs/outputs, File inputs, and Form inputs.
+* Supports collection formats for query parameters: csv, tsv, ssv, pipes.
+* Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions.
+
+{{#generateApiDocs}}
+
+## Documentation for API Endpoints
+
+All URIs are relative to *{{{basePath}}}*
+
+Class | Method | HTTP request | Description
+------------ | ------------- | ------------- | -------------
+{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{{summary}}}{{/summary}}
+{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
+{{/generateApiDocs}}
+
+{{#generateModelDocs}}
+
+## Documentation for Models
+
+{{#modelPackage}}
+{{#models}}{{#model}} - [{{{modelPackage}}}.{{{classname}}}]({{modelDocPath}}{{{classname}}}.md)
+{{/model}}{{/models}}
+{{/modelPackage}}
+{{^modelPackage}}
+No model defined in this package
+{{/modelPackage}}
+{{/generateModelDocs}}
+
+{{! TODO: optional documentation for authorization? }}
+## Documentation for Authorization
+
+{{^authMethods}}
+All endpoints do not require authorization.
+{{/authMethods}}
+{{#authMethods}}
+{{#last}}
+Authentication schemes defined for the API:
+{{/last}}
+{{/authMethods}}
+{{#authMethods}}
+
+### {{name}}
+
+{{#isApiKey}}- **Type**: API key
+- **API key parameter name**: {{keyParamName}}
+- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}}
+{{/isApiKey}}
+{{#isBasic}}- **Type**: HTTP basic authentication
+{{/isBasic}}
+{{#isOAuth}}- **Type**: OAuth
+- **Flow**: {{flow}}
+- **Authorization URL**: {{authorizationUrl}}
+- **Scopes**: {{^scopes}}N/A{{/scopes}}
+{{#scopes}} - {{scope}}: {{description}}
+{{/scopes}}
+{{/isOAuth}}
+
+{{/authMethods}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/api_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/api_doc.mustache
new file mode 100644
index 00000000000..08d90eef4a2
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/api_doc.mustache
@@ -0,0 +1,65 @@
+# {{classname}}{{#description}}
+{{description}}{{/description}}
+
+All URIs are relative to *{{basePath}}*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+{{#operations}}{{#operation}}[**{{operationId}}**]({{classname}}.md#{{operationId}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{summary}}{{/summary}}
+{{/operation}}{{/operations}}
+
+{{#operations}}
+{{#operation}}
+
+# **{{operationId}}**
+> {{#returnType}}{{returnType}} {{/returnType}}{{operationId}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}})
+
+{{summary}}{{#notes}}
+
+{{notes}}{{/notes}}
+
+### Example
+```kotlin
+// Import classes:
+//import {{{packageName}}}.infrastructure.*
+//import {{{modelPackage}}}.*
+
+{{! TODO: Auth method documentation examples}}
+val apiInstance = {{{classname}}}()
+{{#allParams}}
+val {{{paramName}}} : {{{dataType}}} = {{{example}}} // {{{dataType}}} | {{{description}}}
+{{/allParams}}
+try {
+ {{#returnType}}val result : {{{returnType}}} = {{/returnType}}apiInstance.{{{operationId}}}({{#allParams}}{{{paramName}}}{{^-last}}, {{/-last}}{{/allParams}}){{#returnType}}
+ println(result){{/returnType}}
+} catch (e: ClientException) {
+ println("4xx response calling {{{classname}}}#{{{operationId}}}")
+ e.printStackTrace()
+} catch (e: ServerException) {
+ println("5xx response calling {{{classname}}}#{{{operationId}}}")
+ e.printStackTrace()
+}
+```
+
+### Parameters
+{{^allParams}}This endpoint does not need any parameter.{{/allParams}}{{#allParams}}{{#-last}}
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------{{/-last}}{{/allParams}}
+{{#allParams}} **{{paramName}}** | {{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}{{#isFile}}**{{dataType}}**{{/isFile}}{{^isFile}}{{#generateModelDocs}}[**{{dataType}}**]({{baseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{dataType}}**{{/generateModelDocs}}{{/isFile}}{{/isPrimitiveType}}| {{description}} |{{^required}} [optional]{{/required}}{{#defaultValue}} [default to {{defaultValue}}]{{/defaultValue}}{{#allowableValues}} [enum: {{#values}}{{{.}}}{{^-last}}, {{/-last}}{{/values}}]{{/allowableValues}}
+{{/allParams}}
+
+### Return type
+
+{{#returnType}}{{#returnTypeIsPrimitive}}**{{returnType}}**{{/returnTypeIsPrimitive}}{{^returnTypeIsPrimitive}}{{#generateModelDocs}}[**{{returnType}}**]({{returnBaseType}}.md){{/generateModelDocs}}{{^generateModelDocs}}**{{returnType}}**{{/generateModelDocs}}{{/returnTypeIsPrimitive}}{{/returnType}}{{^returnType}}null (empty response body){{/returnType}}
+
+### Authorization
+
+{{^authMethods}}No authorization required{{/authMethods}}{{#authMethods}}[{{name}}](../README.md#{{name}}){{^-last}}, {{/-last}}{{/authMethods}}
+
+### HTTP request headers
+
+ - **Content-Type**: {{#consumes}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/consumes}}{{^consumes}}Not defined{{/consumes}}
+ - **Accept**: {{#produces}}{{{mediaType}}}{{^-last}}, {{/-last}}{{/produces}}{{^produces}}Not defined{{/produces}}
+
+{{/operation}}
+{{/operations}}
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/class_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/class_doc.mustache
new file mode 100644
index 00000000000..a3405b25c84
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/class_doc.mustache
@@ -0,0 +1,15 @@
+# {{classname}}
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+{{#vars}}**{{name}}** | {{#isEnum}}[**inline**](#{{datatypeWithEnum}}){{/isEnum}}{{^isEnum}}{{#isPrimitiveType}}**{{dataType}}**{{/isPrimitiveType}}{{^isPrimitiveType}}[**{{dataType}}**]({{complexType}}.md){{/isPrimitiveType}}{{/isEnum}} | {{description}} | {{^required}} [optional]{{/required}}{{#isReadOnly}} [readonly]{{/isReadOnly}}
+{{/vars}}
+{{#vars}}{{#isEnum}}
+
+{{!NOTE: see java's resources "pojo_doc.mustache" once enums are fully implemented}}
+## Enum: {{baseName}}
+Name | Value
+---- | -----{{#allowableValues}}
+{{name}} | {{#values}}{{.}}{{^-last}}, {{/-last}}{{/values}}{{/allowableValues}}
+{{/isEnum}}{{/vars}}
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/data_class.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/data_class.mustache
new file mode 100644
index 00000000000..e22559b5cc9
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/data_class.mustache
@@ -0,0 +1,52 @@
+{{#parcelizeModels}}
+import android.os.Parcelable
+import kotlinx.parcelize.Parcelize
+
+{{/parcelizeModels}}
+{{#serializableModel}}
+import java.io.Serializable
+{{/serializableModel}}
+/**
+ * {{{description}}}
+{{#vars}}
+ * @param {{name}} {{{description}}}
+{{/vars}}
+ */
+{{#parcelizeModels}}
+@Parcelize
+{{/parcelizeModels}}
+data class {{classname}} (
+{{#requiredVars}}
+{{>data_class_req_var}}{{^-last}},
+{{/-last}}{{/requiredVars}}{{#hasRequired}}{{#hasOptional}},
+{{/hasOptional}}{{/hasRequired}}{{#optionalVars}}{{>data_class_opt_var}}{{^-last}},
+{{/-last}}{{/optionalVars}}
+) {{^serializableModel}}{{#parcelizeModels}} : Parcelable{{/parcelizeModels}}{{/serializableModel}}{{^parcelizeModels}}{{#serializableModel}}: Serializable {{/serializableModel}}{{/parcelizeModels}}{{#parcelizeModels}}{{#serializableModel}} : Parcelable, Serializable {{/serializableModel}}{{/parcelizeModels}}
+{{#vendorExtensions.x-has-data-class-body}}
+{
+{{/vendorExtensions.x-has-data-class-body}}
+{{#serializableModel}}
+ companion object {
+ private const val serialVersionUID: Long = 123
+ }
+{{/serializableModel}}
+{{#hasEnums}}
+ {{#vars}}
+ {{#isEnum}}
+ /**
+ * {{{description}}}
+ * Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}}
+ */
+ enum class {{nameInCamelCase}}(val value: {{dataType}}){
+ {{#allowableValues}}
+ {{#enumVars}}
+ {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}}
+ {{/enumVars}}
+ {{/allowableValues}}
+ }
+{{/isEnum}}
+{{/vars}}
+{{/hasEnums}}
+{{#vendorExtensions.x-has-data-class-body}}
+}
+{{/vendorExtensions.x-has-data-class-body}}
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/data_class_opt_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/data_class_opt_var.mustache
new file mode 100644
index 00000000000..b1060118732
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/data_class_opt_var.mustache
@@ -0,0 +1,4 @@
+{{#description}}
+ /* {{{description}}} */
+{{/description}}
+ {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}? = {{#defaultvalue}}{{defaultvalue}}{{/defaultvalue}}{{^defaultvalue}}null{{/defaultvalue}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/data_class_req_var.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/data_class_req_var.mustache
new file mode 100644
index 00000000000..c79bfec01bd
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/data_class_req_var.mustache
@@ -0,0 +1,4 @@
+{{#description}}
+ /* {{{description}}} */
+{{/description}}
+ {{>modelMutable}} {{{name}}}: {{#isEnum}}{{classname}}.{{nameInCamelCase}}{{/isEnum}}{{^isEnum}}{{{dataType}}}{{/isEnum}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/enum_class.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/enum_class.mustache
new file mode 100644
index 00000000000..791398b9789
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/enum_class.mustache
@@ -0,0 +1,9 @@
+/**
+* {{{description}}}
+* Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}}
+*/
+enum class {{classname}}(val value: {{dataType}}){
+{{#allowableValues}}{{#enumVars}}
+ {{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}}
+{{/enumVars}}{{/allowableValues}}
+}
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/enum_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/enum_doc.mustache
new file mode 100644
index 00000000000..fcb3d7e61aa
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/enum_doc.mustache
@@ -0,0 +1,7 @@
+# {{classname}}
+
+## Enum
+
+{{#allowableValues}}{{#enumVars}}
+ * `{{name}}` (value: `{{{value}}}`)
+{{/enumVars}}{{/allowableValues}}
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/ApiKeyAuth.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/ApiKeyAuth.kt.mustache
new file mode 100644
index 00000000000..e50c0793be4
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/ApiKeyAuth.kt.mustache
@@ -0,0 +1,85 @@
+package {{packageName}}.infrastructure
+
+import io.ktor.application.ApplicationCall
+import io.ktor.application.call
+import io.ktor.auth.Authentication
+import io.ktor.auth.AuthenticationFailedCause
+import io.ktor.auth.AuthenticationPipeline
+import io.ktor.auth.AuthenticationProvider
+import io.ktor.auth.Credential
+import io.ktor.auth.Principal
+import io.ktor.auth.UnauthorizedResponse
+import io.ktor.http.auth.HeaderValueEncoding
+import io.ktor.http.auth.HttpAuthHeader
+import io.ktor.request.ApplicationRequest
+import io.ktor.response.respond
+
+enum class ApiKeyLocation(val location: String) {
+ QUERY("query"),
+ HEADER("header")
+}
+data class ApiKeyCredential(val value: String): Credential
+data class ApiPrincipal(val apiKeyCredential: ApiKeyCredential?) : Principal
+
+
+
+/**
+* Represents a Api Key authentication provider
+* @param name is the name of the provider, or `null` for a default provider
+*/
+class ApiKeyAuthenticationProvider(name: String?) : AuthenticationProvider(name) {
+ internal var authenticationFunction: suspend ApplicationCall.(ApiKeyCredential) -> Principal? = { null }
+
+ var apiKeyName: String = "";
+
+ var apiKeyLocation: ApiKeyLocation = ApiKeyLocation.QUERY;
+
+ /**
+ * Sets a validation function that will check given [ApiKeyCredential] instance and return [Principal],
+ * or null if credential does not correspond to an authenticated principal
+ */
+ fun validate(body: suspend ApplicationCall.(ApiKeyCredential) -> Principal?) {
+ authenticationFunction = body
+ }
+}
+
+fun Authentication.Configuration.apiKeyAuth(name: String? = null, configure: ApiKeyAuthenticationProvider.() -> Unit) {
+ val provider = ApiKeyAuthenticationProvider(name).apply(configure)
+ val apiKeyName = provider.apiKeyName
+ val apiKeyLocation = provider.apiKeyLocation
+ val authenticate = provider.authenticationFunction
+
+ provider.pipeline.intercept(AuthenticationPipeline.RequestAuthentication) { context ->
+ val credentials = call.request.apiKeyAuthenticationCredentials(apiKeyName, apiKeyLocation)
+ val principal = credentials?.let { authenticate(call, it) }
+
+ val cause = when {
+ credentials == null -> AuthenticationFailedCause.NoCredentials
+ principal == null -> AuthenticationFailedCause.InvalidCredentials
+ else -> null
+ }
+
+ if (cause != null) {
+ context.challenge(apiKeyName, cause) {
+ // TODO: Verify correct response structure here.
+ call.respond(UnauthorizedResponse(HttpAuthHeader.Parameterized("API_KEY", mapOf("key" to apiKeyName), HeaderValueEncoding.QUOTED_ALWAYS)))
+ it.complete()
+ }
+ }
+
+ if (principal != null) {
+ context.principal(principal)
+ }
+ }
+}
+
+fun ApplicationRequest.apiKeyAuthenticationCredentials(apiKeyName: String, apiKeyLocation: ApiKeyLocation): ApiKeyCredential? {
+ val value: String? = when(apiKeyLocation) {
+ ApiKeyLocation.QUERY -> this.queryParameters[apiKeyName]
+ ApiKeyLocation.HEADER -> this.headers[apiKeyName]
+ }
+ when (value) {
+ null -> return null
+ else -> return ApiKeyCredential(value)
+ }
+}
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/AppMain.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/AppMain.kt.mustache
new file mode 100644
index 00000000000..bef736de059
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/AppMain.kt.mustache
@@ -0,0 +1,145 @@
+package {{packageName}}
+
+import com.codahale.metrics.Slf4jReporter
+import com.typesafe.config.ConfigFactory
+import io.ktor.application.Application
+import io.ktor.application.ApplicationStopping
+import io.ktor.application.install
+import io.ktor.application.log
+import io.ktor.client.HttpClient
+import io.ktor.client.engine.apache.Apache
+import io.ktor.config.HoconApplicationConfig
+{{#featureAutoHead}}
+import io.ktor.features.AutoHeadResponse
+{{/featureAutoHead}}
+{{#featureCompression}}
+import io.ktor.features.Compression
+{{/featureCompression}}
+{{#featureCORS}}
+import io.ktor.features.CORS
+{{/featureCORS}}
+{{#featureConditionalHeaders}}
+import io.ktor.features.ConditionalHeaders
+{{/featureConditionalHeaders}}
+import io.ktor.features.ContentNegotiation
+import io.ktor.features.DefaultHeaders
+{{#featureHSTS}}
+import io.ktor.features.HSTS
+{{/featureHSTS}}
+import io.ktor.gson.GsonConverter
+import io.ktor.http.ContentType
+import io.ktor.locations.KtorExperimentalLocationsAPI
+import io.ktor.locations.Locations
+import io.ktor.metrics.Metrics
+import io.ktor.routing.Routing
+import java.util.concurrent.TimeUnit
+import io.ktor.util.KtorExperimentalAPI
+{{#hasAuthMethods}}
+import io.ktor.auth.Authentication
+import io.ktor.auth.oauth
+import org.openapitools.server.infrastructure.ApiKeyCredential
+import org.openapitools.server.infrastructure.ApiPrincipal
+import org.openapitools.server.infrastructure.apiKeyAuth
+{{/hasAuthMethods}}
+{{#generateApis}}{{#apiInfo}}{{#apis}}import {{apiPackage}}.{{classname}}
+{{/apis}}{{/apiInfo}}{{/generateApis}}
+
+@KtorExperimentalAPI
+internal val settings = HoconApplicationConfig(ConfigFactory.defaultApplication(HTTP::class.java.classLoader))
+
+object HTTP {
+ val client = HttpClient(Apache)
+}
+
+@KtorExperimentalAPI
+@KtorExperimentalLocationsAPI
+fun Application.main() {
+ install(DefaultHeaders)
+ install(Metrics) {
+ val reporter = Slf4jReporter.forRegistry(registry)
+ .outputTo(log)
+ .convertRatesTo(TimeUnit.SECONDS)
+ .convertDurationsTo(TimeUnit.MILLISECONDS)
+ .build()
+ reporter.start(10, TimeUnit.SECONDS)
+ }
+{{#generateApis}}
+ install(ContentNegotiation) {
+ register(ContentType.Application.Json, GsonConverter())
+ }
+ {{#featureAutoHead}}
+ install(AutoHeadResponse) // see http://ktor.io/features/autoheadresponse.html
+ {{/featureAutoHead}}
+ {{#featureConditionalHeaders}}
+ install(ConditionalHeaders) // see http://ktor.io/features/conditional-headers.html
+ {{/featureConditionalHeaders}}
+ {{#featureHSTS}}
+ install(HSTS, ApplicationHstsConfiguration()) // see http://ktor.io/features/hsts.html
+ {{/featureHSTS}}
+ {{#featureCORS}}
+ install(CORS, ApplicationCORSConfiguration()) // see http://ktor.io/features/cors.html
+ {{/featureCORS}}
+ {{#featureCompression}}
+ install(Compression, ApplicationCompressionConfiguration()) // see http://ktor.io/features/compression.html
+ {{/featureCompression}}
+ install(Locations) // see http://ktor.io/features/locations.html
+ {{#hasAuthMethods}}
+ install(Authentication) {
+ {{#authMethods}}
+ {{#isBasic}}
+ basic("{{{name}}}") {
+ validate { credentials ->
+ // TODO: "Apply your basic authentication functionality."
+ // Accessible in-method via call.principal()
+ if (credentials.name == "Swagger" && "Codegen" == credentials.password) {
+ UserIdPrincipal(credentials.name)
+ } else {
+ null
+ }
+ }
+ {{/isBasic}}
+ {{#isApiKey}}
+ // "Implement API key auth ({{{name}}}) for parameter name '{{{keyParamName}}}'."
+ apiKeyAuth("{{{name}}}") {
+ validate { apikeyCredential: ApiKeyCredential ->
+ when {
+ apikeyCredential.value == "keyboardcat" -> ApiPrincipal(apikeyCredential)
+ else -> null
+ }
+ }
+ }
+ {{/isApiKey}}
+ {{#isOAuth}}
+ {{#bodyAllowed}}
+ {{/bodyAllowed}}
+ {{^bodyAllowed}}
+ oauth("{{name}}") {
+ client = HttpClient(Apache)
+ providerLookup = { ApplicationAuthProviders["{{{name}}}"] }
+ urlProvider = { _ ->
+ // TODO: define a callback url here.
+ "/"
+ }
+ }
+ {{/bodyAllowed}}
+ {{/isOAuth}}
+ {{/authMethods}}
+ }
+ {{/hasAuthMethods}}
+ install(Routing) {
+ {{#apiInfo}}
+ {{#apis}}
+ {{#operations}}
+ {{classname}}()
+ {{/operations}}
+ {{/apis}}
+ {{/apiInfo}}
+ }
+
+{{/generateApis}}
+
+ environment.monitor.subscribe(ApplicationStopping)
+ {
+ HTTP.client.close()
+ }
+}
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/Configuration.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/Configuration.kt.mustache
new file mode 100644
index 00000000000..3b568d21eba
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/Configuration.kt.mustache
@@ -0,0 +1,114 @@
+package {{packageName}}
+
+// Use this file to hold package-level internal functions that return receiver object passed to the `install` method.
+import io.ktor.auth.OAuthServerSettings
+import io.ktor.features.Compression
+import io.ktor.features.HSTS
+import io.ktor.features.deflate
+import io.ktor.features.gzip
+import io.ktor.features.minimumSize
+import io.ktor.http.HttpMethod
+import io.ktor.util.KtorExperimentalAPI
+import java.time.Duration
+import java.util.concurrent.Executors
+
+import {{packageName}}.settings
+
+{{#featureCORS}}
+/**
+ * Application block for [CORS] configuration.
+ *
+ * This file may be excluded in .openapi-generator-ignore,
+ * and application specific configuration can be applied in this function.
+ *
+ * See http://ktor.io/features/cors.html
+ */
+internal fun ApplicationCORSConfiguration(): CORS.Configuration.() -> Unit {
+ return {
+ // method(HttpMethod.Options)
+ // header(HttpHeaders.XForwardedProto)
+ // anyHost()
+ // host("my-host")
+ // host("my-host:80")
+ // host("my-host", subDomains = listOf("www"))
+ // host("my-host", schemes = listOf("http", "https"))
+ // allowCredentials = true
+ // maxAge = Duration.ofDays(1)
+ }
+}
+{{/featureCORS}}
+
+{{#featureHSTS}}
+/**
+ * Application block for [HSTS] configuration.
+ *
+ * This file may be excluded in .openapi-generator-ignore,
+ * and application specific configuration can be applied in this function.
+ *
+ * See http://ktor.io/features/hsts.html
+ */
+internal fun ApplicationHstsConfiguration(): HSTS.Configuration.() -> Unit {
+ return {
+ maxAge = Duration.ofDays(365)
+ includeSubDomains = true
+ preload = false
+
+ // You may also apply any custom directives supported by specific user-agent. For example:
+ // customDirectives.put("redirectHttpToHttps", "false")
+ }
+}
+{{/featureHSTS}}
+
+{{#featureCompression}}
+/**
+ * Application block for [Compression] configuration.
+ *
+ * This file may be excluded in .openapi-generator-ignore,
+ * and application specific configuration can be applied in this function.
+ *
+ * See http://ktor.io/features/compression.html
+ */
+internal fun ApplicationCompressionConfiguration(): Compression.Configuration.() -> Unit {
+ return {
+ gzip {
+ priority = 1.0
+ }
+ deflate {
+ priority = 10.0
+ minimumSize(1024) // condition
+ }
+ }
+}
+{{/featureCompression}}
+
+// Defines authentication mechanisms used throughout the application.
+@KtorExperimentalAPI
+val ApplicationAuthProviders: Map = listOf(
+{{#authMethods}}
+ {{#isOAuth}}
+ OAuthServerSettings.OAuth2ServerSettings(
+ name = "{{name}}",
+ authorizeUrl = "{{authorizationUrl}}",
+ accessTokenUrl = "{{tokenUrl}}",
+ requestMethod = HttpMethod.Get,
+ {{! TODO: flow, doesn't seem to be supported yet by ktor }}
+ clientId = settings.property("auth.oauth.{{name}}.clientId").getString(),
+ clientSecret = settings.property("auth.oauth.{{name}}.clientSecret").getString(),
+ defaultScopes = listOf({{#scopes}}"{{scope}}"{{^-last}}, {{/-last}}{{/scopes}})
+ ){{^-last}},{{/-last}}
+ {{/isOAuth}}
+{{/authMethods}}
+// OAuthServerSettings.OAuth2ServerSettings(
+// name = "facebook",
+// authorizeUrl = "https://graph.facebook.com/oauth/authorize",
+// accessTokenUrl = "https://graph.facebook.com/oauth/access_token",
+// requestMethod = HttpMethod.Post,
+//
+// clientId = "settings.property("auth.oauth.facebook.clientId").getString()",
+// clientSecret = "settings.property("auth.oauth.facebook.clientSecret").getString()",
+// defaultScopes = listOf("public_profile")
+// )
+).associateBy { it.name }
+
+// Provides an application-level fixed thread pool on which to execute coroutines (mainly)
+internal val ApplicationExecutors = Executors.newFixedThreadPool(Runtime.getRuntime().availableProcessors() * 4)
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/Dockerfile.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/Dockerfile.mustache
new file mode 100644
index 00000000000..b9158ac26e3
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/Dockerfile.mustache
@@ -0,0 +1,7 @@
+FROM openjdk:8-jre-alpine
+
+COPY ./build/libs/{{artifactId}}.jar /root/{{artifactId}}.jar
+
+WORKDIR /root
+
+CMD ["java", "-server", "-Xms4g", "-Xmx4g", "-XX:+UseG1GC", "-XX:MaxGCPauseMillis=100", "-XX:+UseStringDeduplication", "-jar", "{{artifactId}}.jar"]
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/Paths.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/Paths.kt.mustache
new file mode 100644
index 00000000000..610f48203aa
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/Paths.kt.mustache
@@ -0,0 +1,28 @@
+{{>licenseInfo}}
+package {{packageName}}
+
+import io.ktor.locations.KtorExperimentalLocationsAPI
+import io.ktor.locations.Location
+{{#imports}}import {{import}}
+{{/imports}}
+
+{{#apiInfo}}
+object Paths {
+{{#apis}}
+{{#operations}}
+ {{#operation}}
+ {{^bodyAllowed}}
+ /**
+ * {{summary}}
+ * {{#unescapedNotes}}{{.}}{{/unescapedNotes}}
+ {{#allParams}}* @param {{paramName}} {{description}} {{^required}}(optional{{#defaultValue}}, default to {{{.}}}{{/defaultValue}}){{/required}}
+ {{/allParams}}*/
+ @KtorExperimentalLocationsAPI
+ @Location("{{path}}") class {{operationId}}({{#allParams}}val {{paramName}}: {{{dataType}}}{{^required}}? = null{{/required}}{{#required}}{{#isNullable}}?{{/isNullable}}{{/required}}{{^-last}}, {{/-last}}{{/allParams}})
+
+ {{/bodyAllowed}}
+ {{/operation}}
+{{/operations}}
+{{/apis}}
+}
+{{/apiInfo}}
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/README.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/README.mustache
new file mode 100644
index 00000000000..4c34e8f6bf2
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/README.mustache
@@ -0,0 +1,101 @@
+# {{packageName}} - Kotlin Server library for {{appName}}
+
+{{#unescapedAppDescription}}
+{{.}}
+{{/unescapedAppDescription}}
+
+Generated by OpenAPI Generator {{generatorVersion}}{{^hideGenerationTimestamp}} ({{generatedDate}}){{/hideGenerationTimestamp}}.
+
+## Requires
+
+* Kotlin 1.3.21
+* Gradle 4.9
+
+## Build
+
+First, create the gradle wrapper script:
+
+```
+gradle wrapper
+```
+
+Then, run:
+
+```
+./gradlew check assemble
+```
+
+This runs all tests and packages the library.
+
+## Running
+
+The server builds as a fat jar with a main entrypoint. To start the service, run `java -jar ./build/libs/{{artifactId}}.jar`.
+
+You may also run in docker:
+
+```
+docker build -t {{artifactId}} .
+docker run -p 8080:8080 {{artifactId}}
+```
+
+## Features/Implementation Notes
+
+* Supports JSON inputs/outputs, File inputs, and Form inputs (see ktor documentation for more info).
+* ~Supports collection formats for query parameters: csv, tsv, ssv, pipes.~
+* Some Kotlin and Java types are fully qualified to avoid conflicts with types defined in OpenAPI definitions.
+
+{{#generateApiDocs}}
+
+## Documentation for API Endpoints
+
+All URIs are relative to *{{{basePath}}}*
+
+Class | Method | HTTP request | Description
+------------ | ------------- | ------------- | -------------
+{{#apiInfo}}{{#apis}}{{#operations}}{{#operation}}*{{classname}}* | [**{{operationId}}**]({{apiDocPath}}{{classname}}.md#{{operationIdLowerCase}}) | **{{httpMethod}}** {{path}} | {{#summary}}{{{summary}}}{{/summary}}
+{{/operation}}{{/operations}}{{/apis}}{{/apiInfo}}
+{{/generateApiDocs}}
+
+{{#generateModelDocs}}
+
+## Documentation for Models
+
+{{#modelPackage}}
+{{#models}}{{#model}} - [{{{modelPackage}}}.{{{classname}}}]({{modelDocPath}}{{{classname}}}.md)
+{{/model}}{{/models}}
+{{/modelPackage}}
+{{^modelPackage}}
+No model defined in this package
+{{/modelPackage}}
+{{/generateModelDocs}}
+
+{{! TODO: optional documentation for authorization? }}
+## Documentation for Authorization
+
+{{^authMethods}}
+All endpoints do not require authorization.
+{{/authMethods}}
+{{#authMethods}}
+{{#last}}
+Authentication schemes defined for the API:
+{{/last}}
+{{/authMethods}}
+{{#authMethods}}
+
+### {{name}}
+
+{{#isApiKey}}- **Type**: API key
+- **API key parameter name**: {{keyParamName}}
+- **Location**: {{#isKeyInQuery}}URL query string{{/isKeyInQuery}}{{#isKeyInHeader}}HTTP header{{/isKeyInHeader}}
+{{/isApiKey}}
+{{#isBasic}}- **Type**: HTTP basic authentication
+{{/isBasic}}
+{{#isOAuth}}- **Type**: OAuth
+- **Flow**: {{flow}}
+- **Authorization URL**: {{authorizationUrl}}
+- **Scopes**: {{^scopes}}N/A{{/scopes}}
+{{#scopes}} - {{scope}}: {{description}}
+{{/scopes}}
+{{/isOAuth}}
+
+{{/authMethods}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/_api_body.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/_api_body.mustache
new file mode 100644
index 00000000000..9dcf500f49b
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/_api_body.mustache
@@ -0,0 +1,25 @@
+{{#hasAuthMethods}}
+{{>libraries/ktor/_principal}}
+if (principal == null) {
+ call.respond(HttpStatusCode.Unauthorized)
+} else {
+ {{#examples}}
+ {{#-first}}
+ {{#lambda.indented}}{{>_response}}{{/lambda.indented}}
+ {{/-first}}
+ {{/examples}}
+ {{^examples}}
+ call.respond(HttpStatusCode.NotImplemented)
+ {{/examples}}
+}
+{{/hasAuthMethods}}
+{{^hasAuthMethods}}
+{{#examples}}
+{{#-first}}
+{{>libraries/ktor/_response}}
+{{/-first}}
+{{/examples}}
+{{^examples}}
+call.respond(HttpStatusCode.NotImplemented)
+{{/examples}}
+{{/hasAuthMethods}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/_principal.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/_principal.mustache
new file mode 100644
index 00000000000..d49c5d537f0
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/_principal.mustache
@@ -0,0 +1,11 @@
+{{#authMethods}}
+{{#isBasic}}
+val principal = call.authentication.principal()
+{{/isBasic}}
+{{#isApiKey}}
+val principal = call.authentication.principal()
+{{/isApiKey}}
+{{#isOAuth}}
+val principal = call.authentication.principal()
+{{/isOAuth}}
+{{/authMethods}}
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/_response.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/_response.mustache
new file mode 100644
index 00000000000..fb26fb4a7f1
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/_response.mustache
@@ -0,0 +1,8 @@
+val exampleContentType = "{{{contentType}}}"
+val exampleContentString = """{{&example}}"""
+
+when(exampleContentType) {
+ "application/json" -> call.respond(gson.fromJson(exampleContentString, empty::class.java))
+ "application/xml" -> call.respondText(exampleContentString, ContentType.Text.Xml)
+ else -> call.respondText(exampleContentString)
+}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/api.mustache
new file mode 100644
index 00000000000..881e3b108ec
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/api.mustache
@@ -0,0 +1,62 @@
+{{>licenseInfo}}
+package {{apiPackage}}
+
+import com.google.gson.Gson
+import io.ktor.application.call
+import io.ktor.auth.UserIdPrincipal
+import io.ktor.auth.authentication
+import io.ktor.auth.authenticate
+import io.ktor.auth.OAuthAccessTokenResponse
+import io.ktor.auth.OAuthServerSettings
+import io.ktor.http.ContentType
+import io.ktor.http.HttpStatusCode
+import io.ktor.locations.KtorExperimentalLocationsAPI
+import io.ktor.locations.delete
+import io.ktor.locations.get
+import io.ktor.response.respond
+import io.ktor.response.respondText
+import io.ktor.routing.Route
+import io.ktor.routing.post
+import io.ktor.routing.put
+import io.ktor.routing.route
+
+import {{packageName}}.Paths
+import {{packageName}}.infrastructure.ApiPrincipal
+
+
+{{#imports}}import {{import}}
+{{/imports}}
+
+{{#operations}}
+@KtorExperimentalLocationsAPI
+fun Route.{{classname}}() {
+ val gson = Gson()
+ val empty = mutableMapOf()
+{{#operation}}
+ {{#bodyAllowed}}
+
+ route("{{path}}") {
+ {{#hasAuthMethods}}
+ {{#authMethods}}
+ authenticate("{{{name}}}") {
+ {{/authMethods}}
+ {{/hasAuthMethods}}
+ {{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}} {
+ {{#lambda.indented_12}}{{>libraries/ktor/_api_body}}{{/lambda.indented_12}}
+ }
+ {{#hasAuthMethods}}
+ }
+ {{/hasAuthMethods}}
+ }
+ {{/bodyAllowed}}
+ {{^bodyAllowed}}
+
+ {{! NOTE: Locations can be used on routes without body parameters.}}
+ {{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}} { _: Paths.{{operationId}} ->
+ {{#lambda.indented_8}}{{>libraries/ktor/_api_body}}{{/lambda.indented_8}}
+ }
+ {{/bodyAllowed}}
+
+{{/operation}}
+}
+{{/operations}}
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/application.conf.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/application.conf.mustache
new file mode 100644
index 00000000000..032be42fa11
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/application.conf.mustache
@@ -0,0 +1,27 @@
+ktor {
+ deployment {
+ environment = development
+ port = 8080
+ autoreload = true
+ watch = [ {{packageName}} ]
+ }
+
+ application {
+ modules = [ {{packageName}}.AppMainKt.main ]
+ }
+}
+
+# Typesafe config allows multiple ways to provide configuration values without hard-coding them here.
+# Please see https://github.com/lightbend/config for details.
+auth {
+ oauth {
+{{#authMethods}}
+{{#isOAuth}}
+ {{name}} {
+ clientId = ""
+ clientSecret = ""
+ }
+{{/isOAuth}}
+{{/authMethods}}
+ }
+}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/build.gradle.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/build.gradle.mustache
new file mode 100644
index 00000000000..08c317ea666
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/build.gradle.mustache
@@ -0,0 +1,68 @@
+group '{{groupId}}'
+version '{{artifactVersion}}'
+
+wrapper {
+ gradleVersion = '4.9'
+ distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
+}
+
+buildscript {
+ ext.kotlin_version = '1.3.21'
+ ext.ktor_version = '1.1.3'
+ ext.shadow_version = '2.0.3'
+
+ repositories {
+ maven { url "https://repo1.maven.org/maven2" }
+ maven {
+ url = "https://plugins.gradle.org/m2/"
+ }
+ }
+ dependencies {
+ classpath "org.jetbrains.kotlin:kotlin-gradle-plugin:$kotlin_version"
+ classpath "com.github.jengelman.gradle.plugins:shadow:$shadow_version"
+ }
+}
+
+apply plugin: 'java'
+apply plugin: 'kotlin'
+apply plugin: 'application'
+
+mainClassName = "io.ktor.server.netty.DevelopmentEngine"
+
+// Initialization order with shadow 2.0.1 and Gradle 4.3 is weird.
+// See https://github.com/johnrengelman/shadow/issues/336#issuecomment-355402508
+apply plugin: 'com.github.johnrengelman.shadow'
+
+sourceCompatibility = 1.8
+
+compileKotlin {
+ kotlinOptions.jvmTarget = "1.8"
+}
+
+compileTestKotlin {
+ kotlinOptions.jvmTarget = "1.8"
+}
+
+shadowJar {
+ baseName = '{{artifactId}}'
+ classifier = null
+ version = null
+}
+
+repositories {
+ maven { url "https://repo1.maven.org/maven2" }
+ maven { url "https://dl.bintray.com/kotlin/ktor" }
+ maven { url "https://dl.bintray.com/kotlin/kotlinx" }
+}
+
+dependencies {
+ compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
+ compile "io.ktor:ktor-server-netty:$ktor_version"
+ compile "io.ktor:ktor-metrics:$ktor_version"
+ compile "io.ktor:ktor-locations:$ktor_version"
+ compile "io.ktor:ktor-gson:$ktor_version"
+ compile "io.ktor:ktor-client-core:$ktor_version"
+ compile "io.ktor:ktor-client-apache:$ktor_version"
+ compile "ch.qos.logback:logback-classic:1.2.1"
+ testCompile group: 'junit', name: 'junit', version: '4.13'
+}
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/gradle.properties b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/gradle.properties
new file mode 100644
index 00000000000..5f1ed7bbe02
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/gradle.properties
@@ -0,0 +1 @@
+org.gradle.caching=true
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/licenseInfo.mustache
new file mode 100644
index 00000000000..3a547de74bb
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/licenseInfo.mustache
@@ -0,0 +1,11 @@
+/**
+* {{{appName}}}
+* {{{appDescription}}}
+*
+* {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}}
+* {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}}
+*
+* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+* https://openapi-generator.tech
+* Do not edit the class manually.
+*/
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/logback.xml b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/logback.xml
new file mode 100644
index 00000000000..d0eaba8debd
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/libraries/ktor/logback.xml
@@ -0,0 +1,15 @@
+
+
+
+ %d{YYYY-MM-dd HH:mm:ss.SSS} [%thread] %-5level %logger{36} - %msg%n
+
+
+
+
+
+
+
+
+
+
+
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/licenseInfo.mustache
new file mode 100644
index 00000000000..3a547de74bb
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/licenseInfo.mustache
@@ -0,0 +1,11 @@
+/**
+* {{{appName}}}
+* {{{appDescription}}}
+*
+* {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}}
+* {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}}
+*
+* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+* https://openapi-generator.tech
+* Do not edit the class manually.
+*/
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/model.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/model.mustache
new file mode 100644
index 00000000000..780dd84b97e
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/model.mustache
@@ -0,0 +1,11 @@
+{{>licenseInfo}}
+package {{modelPackage}}
+
+{{#imports}}import {{import}}
+{{/imports}}
+
+{{#models}}
+{{#model}}
+{{#isEnum}}{{>enum_class}}{{/isEnum}}{{^isEnum}}{{>data_class}}{{/isEnum}}
+{{/model}}
+{{/models}}
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/modelMutable.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/modelMutable.mustache
new file mode 100644
index 00000000000..4c7f3900717
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/modelMutable.mustache
@@ -0,0 +1 @@
+{{#modelMutable}}var{{/modelMutable}}{{^modelMutable}}val{{/modelMutable}}
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/model_doc.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/model_doc.mustache
new file mode 100644
index 00000000000..e3b71842118
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/model_doc.mustache
@@ -0,0 +1,3 @@
+{{#models}}{{#model}}
+{{#isEnum}}{{>enum_doc}}{{/isEnum}}{{^isEnum}}{{>class_doc}}{{/isEnum}}
+{{/model}}{{/models}}
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/settings.gradle.mustache b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/settings.gradle.mustache
new file mode 100644
index 00000000000..448dc07602e
--- /dev/null
+++ b/modules/openapi-generator/src/main/resources/kotlin-server-deprecated/settings.gradle.mustache
@@ -0,0 +1 @@
+rootProject.name = '{{artifactId}}'
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/README.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/README.mustache
index 24c4728fdd3..910f1a9c9e2 100644
--- a/modules/openapi-generator/src/main/resources/kotlin-server/README.mustache
+++ b/modules/openapi-generator/src/main/resources/kotlin-server/README.mustache
@@ -2,8 +2,8 @@
## Requires
-* Kotlin 1.1.2
-* Gradle 3.3
+* Kotlin 1.4.31
+* Gradle 6.8.2
## Build
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/data_class.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/data_class.mustache
index e22559b5cc9..215a291253f 100644
--- a/modules/openapi-generator/src/main/resources/kotlin-server/data_class.mustache
+++ b/modules/openapi-generator/src/main/resources/kotlin-server/data_class.mustache
@@ -15,7 +15,7 @@ import java.io.Serializable
{{#parcelizeModels}}
@Parcelize
{{/parcelizeModels}}
-data class {{classname}} (
+data class {{classname}}(
{{#requiredVars}}
{{>data_class_req_var}}{{^-last}},
{{/-last}}{{/requiredVars}}{{#hasRequired}}{{#hasOptional}},
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/enum_class.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/enum_class.mustache
index 791398b9789..2f24a1de76b 100644
--- a/modules/openapi-generator/src/main/resources/kotlin-server/enum_class.mustache
+++ b/modules/openapi-generator/src/main/resources/kotlin-server/enum_class.mustache
@@ -2,7 +2,7 @@
* {{{description}}}
* Values: {{#allowableValues}}{{#enumVars}}{{&name}}{{^-last}},{{/-last}}{{/enumVars}}{{/allowableValues}}
*/
-enum class {{classname}}(val value: {{dataType}}){
+enum class {{classname}}(val value: {{dataType}}) {
{{#allowableValues}}{{#enumVars}}
{{&name}}({{{value}}}){{^-last}},{{/-last}}{{#-last}};{{/-last}}
{{/enumVars}}{{/allowableValues}}
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/ApiKeyAuth.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/ApiKeyAuth.kt.mustache
index e50c0793be4..a0abbcddfd0 100644
--- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/ApiKeyAuth.kt.mustache
+++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/ApiKeyAuth.kt.mustache
@@ -1,85 +1,105 @@
package {{packageName}}.infrastructure
-import io.ktor.application.ApplicationCall
-import io.ktor.application.call
-import io.ktor.auth.Authentication
-import io.ktor.auth.AuthenticationFailedCause
-import io.ktor.auth.AuthenticationPipeline
-import io.ktor.auth.AuthenticationProvider
-import io.ktor.auth.Credential
-import io.ktor.auth.Principal
-import io.ktor.auth.UnauthorizedResponse
-import io.ktor.http.auth.HeaderValueEncoding
-import io.ktor.http.auth.HttpAuthHeader
-import io.ktor.request.ApplicationRequest
-import io.ktor.response.respond
+import io.ktor.application.*
+import io.ktor.auth.*
+import io.ktor.http.auth.*
+import io.ktor.request.*
+import io.ktor.response.*
enum class ApiKeyLocation(val location: String) {
QUERY("query"),
HEADER("header")
}
-data class ApiKeyCredential(val value: String): Credential
+
+data class ApiKeyCredential(val value: String) : Credential
data class ApiPrincipal(val apiKeyCredential: ApiKeyCredential?) : Principal
-
-
/**
* Represents a Api Key authentication provider
* @param name is the name of the provider, or `null` for a default provider
*/
-class ApiKeyAuthenticationProvider(name: String?) : AuthenticationProvider(name) {
- internal var authenticationFunction: suspend ApplicationCall.(ApiKeyCredential) -> Principal? = { null }
+class ApiKeyAuthenticationProvider(configuration: Configuration) : AuthenticationProvider(configuration) {
- var apiKeyName: String = "";
+ private val authenticationFunction = configuration.authenticationFunction
- var apiKeyLocation: ApiKeyLocation = ApiKeyLocation.QUERY;
+ private val apiKeyName: String = configuration.apiKeyName
- /**
- * Sets a validation function that will check given [ApiKeyCredential] instance and return [Principal],
- * or null if credential does not correspond to an authenticated principal
- */
- fun validate(body: suspend ApplicationCall.(ApiKeyCredential) -> Principal?) {
- authenticationFunction = body
- }
-}
+ private val apiKeyLocation: ApiKeyLocation = configuration.apiKeyLocation
-fun Authentication.Configuration.apiKeyAuth(name: String? = null, configure: ApiKeyAuthenticationProvider.() -> Unit) {
- val provider = ApiKeyAuthenticationProvider(name).apply(configure)
- val apiKeyName = provider.apiKeyName
- val apiKeyLocation = provider.apiKeyLocation
- val authenticate = provider.authenticationFunction
+ internal fun install() {
+ pipeline.intercept(AuthenticationPipeline.RequestAuthentication) { context ->
+ val credentials = call.request.apiKeyAuthenticationCredentials(apiKeyName, apiKeyLocation)
+ val principal = credentials?.let { authenticationFunction(call, it) }
- provider.pipeline.intercept(AuthenticationPipeline.RequestAuthentication) { context ->
- val credentials = call.request.apiKeyAuthenticationCredentials(apiKeyName, apiKeyLocation)
- val principal = credentials?.let { authenticate(call, it) }
+ val cause = when {
+ credentials == null -> AuthenticationFailedCause.NoCredentials
+ principal == null -> AuthenticationFailedCause.InvalidCredentials
+ else -> null
+ }
- val cause = when {
- credentials == null -> AuthenticationFailedCause.NoCredentials
- principal == null -> AuthenticationFailedCause.InvalidCredentials
- else -> null
- }
+ if (cause != null) {
+ context.challenge(apiKeyName, cause) {
+ call.respond(
+ UnauthorizedResponse(
+ HttpAuthHeader.Parameterized(
+ "API_KEY",
+ mapOf("key" to apiKeyName),
+ HeaderValueEncoding.QUOTED_ALWAYS
+ )
+ )
+ )
+ it.complete()
+ }
+ }
- if (cause != null) {
- context.challenge(apiKeyName, cause) {
- // TODO: Verify correct response structure here.
- call.respond(UnauthorizedResponse(HttpAuthHeader.Parameterized("API_KEY", mapOf("key" to apiKeyName), HeaderValueEncoding.QUOTED_ALWAYS)))
- it.complete()
+ if (principal != null) {
+ context.principal(principal)
}
}
+ }
- if (principal != null) {
- context.principal(principal)
+ class Configuration internal constructor(name: String?) : AuthenticationProvider.Configuration(name) {
+
+ internal var authenticationFunction: suspend ApplicationCall.(ApiKeyCredential) -> Principal? = {
+ throw NotImplementedError(
+ "Api Key auth validate function is not specified. Use apiKeyAuth { validate { ... } } to fix."
+ )
+ }
+
+ var apiKeyName: String = ""
+
+ var apiKeyLocation: ApiKeyLocation = ApiKeyLocation.QUERY
+
+ /**
+ * Sets a validation function that will check given [ApiKeyCredential] instance and return [Principal],
+ * or null if credential does not correspond to an authenticated principal
+ */
+ fun validate(body: suspend ApplicationCall.(ApiKeyCredential) -> Principal?) {
+ authenticationFunction = body
}
}
}
-fun ApplicationRequest.apiKeyAuthenticationCredentials(apiKeyName: String, apiKeyLocation: ApiKeyLocation): ApiKeyCredential? {
- val value: String? = when(apiKeyLocation) {
+fun Authentication.Configuration.apiKeyAuth(
+ name: String? = null,
+ configure: ApiKeyAuthenticationProvider.Configuration.() -> Unit
+) {
+ val configuration = ApiKeyAuthenticationProvider.Configuration(name).apply(configure)
+ val provider = ApiKeyAuthenticationProvider(configuration)
+ provider.install()
+ register(provider)
+}
+
+fun ApplicationRequest.apiKeyAuthenticationCredentials(
+ apiKeyName: String,
+ apiKeyLocation: ApiKeyLocation
+): ApiKeyCredential? {
+ val value: String? = when (apiKeyLocation) {
ApiKeyLocation.QUERY -> this.queryParameters[apiKeyName]
ApiKeyLocation.HEADER -> this.headers[apiKeyName]
}
- when (value) {
- null -> return null
- else -> return ApiKeyCredential(value)
+ return when (value) {
+ null -> null
+ else -> ApiKeyCredential(value)
}
}
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/AppMain.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/AppMain.kt.mustache
index bef736de059..1556c44ae58 100644
--- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/AppMain.kt.mustache
+++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/AppMain.kt.mustache
@@ -28,15 +28,16 @@ import io.ktor.features.HSTS
{{/featureHSTS}}
import io.ktor.gson.GsonConverter
import io.ktor.http.ContentType
+{{#featureLocations}}
import io.ktor.locations.KtorExperimentalLocationsAPI
import io.ktor.locations.Locations
-import io.ktor.metrics.Metrics
+{{/featureLocations}}
import io.ktor.routing.Routing
import java.util.concurrent.TimeUnit
-import io.ktor.util.KtorExperimentalAPI
{{#hasAuthMethods}}
import io.ktor.auth.Authentication
import io.ktor.auth.oauth
+import io.ktor.metrics.dropwizard.DropwizardMetrics
import org.openapitools.server.infrastructure.ApiKeyCredential
import org.openapitools.server.infrastructure.ApiPrincipal
import org.openapitools.server.infrastructure.apiKeyAuth
@@ -44,23 +45,23 @@ import org.openapitools.server.infrastructure.apiKeyAuth
{{#generateApis}}{{#apiInfo}}{{#apis}}import {{apiPackage}}.{{classname}}
{{/apis}}{{/apiInfo}}{{/generateApis}}
-@KtorExperimentalAPI
internal val settings = HoconApplicationConfig(ConfigFactory.defaultApplication(HTTP::class.java.classLoader))
object HTTP {
val client = HttpClient(Apache)
}
-@KtorExperimentalAPI
+{{#featureLocations}}
@KtorExperimentalLocationsAPI
+{{/featureLocations}}
fun Application.main() {
install(DefaultHeaders)
- install(Metrics) {
+ install(DropwizardMetrics) {
val reporter = Slf4jReporter.forRegistry(registry)
- .outputTo(log)
- .convertRatesTo(TimeUnit.SECONDS)
- .convertDurationsTo(TimeUnit.MILLISECONDS)
- .build()
+ .outputTo(log)
+ .convertRatesTo(TimeUnit.SECONDS)
+ .convertDurationsTo(TimeUnit.MILLISECONDS)
+ .build()
reporter.start(10, TimeUnit.SECONDS)
}
{{#generateApis}}
@@ -82,7 +83,9 @@ fun Application.main() {
{{#featureCompression}}
install(Compression, ApplicationCompressionConfiguration()) // see http://ktor.io/features/compression.html
{{/featureCompression}}
+ {{#featureLocations}}
install(Locations) // see http://ktor.io/features/locations.html
+ {{/featureLocations}}
{{#hasAuthMethods}}
install(Authentication) {
{{#authMethods}}
@@ -117,8 +120,8 @@ fun Application.main() {
client = HttpClient(Apache)
providerLookup = { ApplicationAuthProviders["{{{name}}}"] }
urlProvider = { _ ->
- // TODO: define a callback url here.
- "/"
+ // TODO: define a callback url here.
+ "/"
}
}
{{/bodyAllowed}}
@@ -138,8 +141,7 @@ fun Application.main() {
{{/generateApis}}
- environment.monitor.subscribe(ApplicationStopping)
- {
+ environment.monitor.subscribe(ApplicationStopping) {
HTTP.client.close()
}
}
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/Configuration.kt.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/Configuration.kt.mustache
index 3b568d21eba..a8956ec5905 100644
--- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/Configuration.kt.mustache
+++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/Configuration.kt.mustache
@@ -8,11 +8,7 @@ import io.ktor.features.deflate
import io.ktor.features.gzip
import io.ktor.features.minimumSize
import io.ktor.http.HttpMethod
-import io.ktor.util.KtorExperimentalAPI
-import java.time.Duration
-import java.util.concurrent.Executors
-
-import {{packageName}}.settings
+import java.util.concurrent.TimeUnit
{{#featureCORS}}
/**
@@ -49,7 +45,7 @@ internal fun ApplicationCORSConfiguration(): CORS.Configuration.() -> Unit {
*/
internal fun ApplicationHstsConfiguration(): HSTS.Configuration.() -> Unit {
return {
- maxAge = Duration.ofDays(365)
+ maxAgeInSeconds = TimeUnit.DAYS.toSeconds(365)
includeSubDomains = true
preload = false
@@ -82,7 +78,6 @@ internal fun ApplicationCompressionConfiguration(): Compression.Configuration.()
{{/featureCompression}}
// Defines authentication mechanisms used throughout the application.
-@KtorExperimentalAPI
val ApplicationAuthProviders: Map = listOf(
{{#authMethods}}
{{#isOAuth}}
@@ -109,6 +104,3 @@ val ApplicationAuthProviders: Map = listOflibraries/ktor/_principal}}
-if (principal == null) {
- call.respond(HttpStatusCode.Unauthorized)
-} else {
- {{#examples}}
- {{#-first}}
- {{#lambda.indented}}{{>_response}}{{/lambda.indented}}
- {{/-first}}
- {{/examples}}
- {{^examples}}
- call.respond(HttpStatusCode.NotImplemented)
- {{/examples}}
-}
+{{#examples}}
+{{#-first}}
+{{#lambda.indented}}{{>_response}}{{/lambda.indented}}
+{{/-first}}
+{{/examples}}
+{{^examples}}
+call.respond(HttpStatusCode.NotImplemented)
+{{/examples}}
{{/hasAuthMethods}}
{{^hasAuthMethods}}
{{#examples}}
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/_principal.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/_principal.mustache
index d49c5d537f0..09ae65906ea 100644
--- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/_principal.mustache
+++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/_principal.mustache
@@ -1,11 +1,11 @@
{{#authMethods}}
{{#isBasic}}
-val principal = call.authentication.principal()
+val principal = call.authentication.principal()!!
{{/isBasic}}
{{#isApiKey}}
-val principal = call.authentication.principal()
+val principal = call.authentication.principal()!!
{{/isApiKey}}
{{#isOAuth}}
-val principal = call.authentication.principal()
+val principal = call.authentication.principal()!!
{{/isOAuth}}
{{/authMethods}}
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/_response.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/_response.mustache
index fb26fb4a7f1..931dad98f5e 100644
--- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/_response.mustache
+++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/_response.mustache
@@ -1,7 +1,7 @@
val exampleContentType = "{{{contentType}}}"
val exampleContentString = """{{&example}}"""
-when(exampleContentType) {
+when (exampleContentType) {
"application/json" -> call.respond(gson.fromJson(exampleContentString, empty::class.java))
"application/xml" -> call.respondText(exampleContentString, ContentType.Text.Xml)
else -> call.respondText(exampleContentString)
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/api.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/api.mustache
index 881e3b108ec..a3d8c124e81 100644
--- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/api.mustache
+++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/api.mustache
@@ -10,17 +10,29 @@ import io.ktor.auth.OAuthAccessTokenResponse
import io.ktor.auth.OAuthServerSettings
import io.ktor.http.ContentType
import io.ktor.http.HttpStatusCode
-import io.ktor.locations.KtorExperimentalLocationsAPI
-import io.ktor.locations.delete
-import io.ktor.locations.get
import io.ktor.response.respond
import io.ktor.response.respondText
import io.ktor.routing.Route
+{{#featureLocations}}
+import {{packageName}}.Paths
+import io.ktor.locations.KtorExperimentalLocationsAPI
+import io.ktor.locations.delete
+import io.ktor.locations.get
+import io.ktor.locations.post
+import io.ktor.locations.put
+import io.ktor.locations.options
+import io.ktor.locations.head
+{{/featureLocations}}
+{{^featureLocations}}
+import io.ktor.routing.delete
+import io.ktor.routing.get
import io.ktor.routing.post
import io.ktor.routing.put
+import io.ktor.routing.options
+import io.ktor.routing.head
import io.ktor.routing.route
+{{/featureLocations}}
-import {{packageName}}.Paths
import {{packageName}}.infrastructure.ApiPrincipal
@@ -28,34 +40,33 @@ import {{packageName}}.infrastructure.ApiPrincipal
{{/imports}}
{{#operations}}
+ {{#featureLocations}}
@KtorExperimentalLocationsAPI
+ {{/featureLocations}}
fun Route.{{classname}}() {
val gson = Gson()
val empty = mutableMapOf()
{{#operation}}
- {{#bodyAllowed}}
-
+ {{#hasAuthMethods}}
+ {{#authMethods}}
+ authenticate("{{{name}}}") {
+ {{/authMethods}}
+ {{/hasAuthMethods}}
+ {{^featureLocations}}
route("{{path}}") {
- {{#hasAuthMethods}}
- {{#authMethods}}
- authenticate("{{{name}}}") {
- {{/authMethods}}
- {{/hasAuthMethods}}
{{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}} {
{{#lambda.indented_12}}{{>libraries/ktor/_api_body}}{{/lambda.indented_12}}
}
- {{#hasAuthMethods}}
- }
- {{/hasAuthMethods}}
}
- {{/bodyAllowed}}
- {{^bodyAllowed}}
-
- {{! NOTE: Locations can be used on routes without body parameters.}}
- {{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}} { _: Paths.{{operationId}} ->
+ {{/featureLocations}}
+ {{#featureLocations}}
+ {{#lambda.lowercase}}{{httpMethod}}{{/lambda.lowercase}} {
{{#lambda.indented_8}}{{>libraries/ktor/_api_body}}{{/lambda.indented_8}}
}
- {{/bodyAllowed}}
+ {{/featureLocations}}
+ {{#hasAuthMethods}}
+ }
+ {{/hasAuthMethods}}
{{/operation}}
}
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/build.gradle.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/build.gradle.mustache
index 08c317ea666..173686fdf88 100644
--- a/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/build.gradle.mustache
+++ b/modules/openapi-generator/src/main/resources/kotlin-server/libraries/ktor/build.gradle.mustache
@@ -2,13 +2,13 @@ group '{{groupId}}'
version '{{artifactVersion}}'
wrapper {
- gradleVersion = '4.9'
+ gradleVersion = '6.8.2'
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
}
buildscript {
- ext.kotlin_version = '1.3.21'
- ext.ktor_version = '1.1.3'
+ ext.kotlin_version = '1.4.31'
+ ext.ktor_version = '1.5.2'
ext.shadow_version = '2.0.3'
repositories {
@@ -29,7 +29,7 @@ apply plugin: 'application'
mainClassName = "io.ktor.server.netty.DevelopmentEngine"
-// Initialization order with shadow 2.0.1 and Gradle 4.3 is weird.
+// Initialization order with shadow 2.0.1 and Gradle 6.8.2 is weird.
// See https://github.com/johnrengelman/shadow/issues/336#issuecomment-355402508
apply plugin: 'com.github.johnrengelman.shadow'
@@ -59,7 +59,10 @@ dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "io.ktor:ktor-server-netty:$ktor_version"
compile "io.ktor:ktor-metrics:$ktor_version"
+ compile "io.ktor:ktor-auth:$ktor_version"
+{{#featureLocations}}
compile "io.ktor:ktor-locations:$ktor_version"
+{{/featureLocations}}
compile "io.ktor:ktor-gson:$ktor_version"
compile "io.ktor:ktor-client-core:$ktor_version"
compile "io.ktor:ktor-client-apache:$ktor_version"
diff --git a/modules/openapi-generator/src/main/resources/kotlin-server/licenseInfo.mustache b/modules/openapi-generator/src/main/resources/kotlin-server/licenseInfo.mustache
index 3a547de74bb..d890606a94f 100644
--- a/modules/openapi-generator/src/main/resources/kotlin-server/licenseInfo.mustache
+++ b/modules/openapi-generator/src/main/resources/kotlin-server/licenseInfo.mustache
@@ -1,11 +1,11 @@
/**
-* {{{appName}}}
-* {{{appDescription}}}
-*
-* {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}}
-* {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}}
-*
-* NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
-* https://openapi-generator.tech
-* Do not edit the class manually.
+ * {{{appName}}}
+ * {{{appDescription}}}
+ *
+ * {{#version}}The version of the OpenAPI document: {{{version}}}{{/version}}
+ * {{#infoEmail}}Contact: {{{infoEmail}}}{{/infoEmail}}
+ *
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech).
+ * https://openapi-generator.tech
+ * Do not edit the class manually.
*/
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/python/model_doc.mustache b/modules/openapi-generator/src/main/resources/python/model_doc.mustache
index ff7358618ea..3f7c8263df2 100644
--- a/modules/openapi-generator/src/main/resources/python/model_doc.mustache
+++ b/modules/openapi-generator/src/main/resources/python/model_doc.mustache
@@ -28,9 +28,9 @@ Name | Type | Description | Notes
{{#optionalVars}}
**{{name}}** | {{^complexType}}**{{dataType}}**{{/complexType}}{{#complexType}}[**{{dataType}}**]({{complexType}}.md){{/complexType}} | {{description}} | [optional] {{#isReadOnly}}[readonly] {{/isReadOnly}}{{#defaultValue}} if omitted the server will use the default value of {{{.}}}{{/defaultValue}}
{{/optionalVars}}
-{{#additionalPropertiesType}}
-**any string name** | **{{additionalPropertiesType}}** | any string name can be used but the value must be the correct type | [optional]
-{{/additionalPropertiesType}}
+{{#additionalProperties}}
+**any string name** | {{^complexType}}**{{dataType}}**{{/complexType}}{{#complexType}}[**{{dataType}}**]({{complexType}}.md){{/complexType}} | any string name can be used but the value must be the correct type | [optional]
+{{/additionalProperties}}
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/modules/openapi-generator/src/main/resources/python/model_templates/classvars.mustache b/modules/openapi-generator/src/main/resources/python/model_templates/classvars.mustache
index 88ae5df9f12..0e5ff25b97f 100644
--- a/modules/openapi-generator/src/main/resources/python/model_templates/classvars.mustache
+++ b/modules/openapi-generator/src/main/resources/python/model_templates/classvars.mustache
@@ -60,7 +60,7 @@
{{/optionalVars}}
}
-{{#additionalPropertiesType}}
+{{#additionalProperties}}
@cached_property
def additional_properties_type():
"""
@@ -72,11 +72,11 @@
lazy_import()
{{/-first}}
{{/imports}}
- return ({{{additionalPropertiesType}}},) # noqa: E501
-{{/additionalPropertiesType}}
-{{^additionalPropertiesType}}
+ return ({{{dataType}}},) # noqa: E501
+{{/additionalProperties}}
+{{^additionalProperties}}
additional_properties_type = None
-{{/additionalPropertiesType}}
+{{/additionalProperties}}
_nullable = {{#isNullable}}True{{/isNullable}}{{^isNullable}}False{{/isNullable}}
diff --git a/modules/openapi-generator/src/main/resources/python/model_templates/method_init_composed.mustache b/modules/openapi-generator/src/main/resources/python/model_templates/method_init_composed.mustache
index 9b298379710..ca0505ead96 100644
--- a/modules/openapi-generator/src/main/resources/python/model_templates/method_init_composed.mustache
+++ b/modules/openapi-generator/src/main/resources/python/model_templates/method_init_composed.mustache
@@ -10,7 +10,52 @@
'_additional_properties_model_instances',
])
-{{> model_templates/method_init_shared }}
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """{{classname}} - a model defined in OpenAPI
+
+ Keyword Args:
+{{#requiredVars}}
+{{#defaultValue}}
+ {{name}} ({{{dataType}}}):{{#description}} {{{description}}}.{{/description}} defaults to {{{defaultValue}}}{{#allowableValues}}, must be one of [{{#enumVars}}{{{value}}}, {{/enumVars}}]{{/allowableValues}} # noqa: E501
+{{/defaultValue}}
+{{^defaultValue}}
+ {{name}} ({{{dataType}}}):{{#description}} {{{description}}}{{/description}}
+{{/defaultValue}}
+{{/requiredVars}}
+{{> model_templates/docstring_init_required_kwargs }}
+{{#optionalVars}}
+ {{name}} ({{{dataType}}}):{{#description}} {{{description}}}.{{/description}} [optional]{{#defaultValue}} if omitted the server will use the default value of {{{defaultValue}}}{{/defaultValue}} # noqa: E501
+{{/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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
constant_args = {
'_check_type': _check_type,
@@ -19,28 +64,18 @@
'_configuration': _configuration,
'_visited_composed_classes': self._visited_composed_classes,
}
- required_args = {
-{{#requiredVars}}
- '{{name}}': {{name}},
-{{/requiredVars}}
- }
- model_args = {}
- model_args.update(required_args)
- model_args.update(kwargs)
composed_info = validate_get_composed_info(
- constant_args, model_args, self)
+ constant_args, kwargs, self)
self._composed_instances = composed_info[0]
self._var_name_to_model_instances = composed_info[1]
self._additional_properties_model_instances = composed_info[2]
- unused_args = composed_info[3]
+ discarded_args = composed_info[3]
- for var_name, var_value in required_args.items():
- setattr(self, var_name, var_value)
for var_name, var_value in kwargs.items():
- if var_name in unused_args and \
+ if var_name in discarded_args and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
- not self._additional_properties_model_instances:
+ self._additional_properties_model_instances:
# discard variable.
continue
setattr(self, var_name, var_value)
\ No newline at end of file
diff --git a/modules/openapi-generator/src/main/resources/python/model_templates/methods_setattr_getattr_composed.mustache b/modules/openapi-generator/src/main/resources/python/model_templates/methods_setattr_getattr_composed.mustache
index 6b1013ca997..de7887ebdbd 100644
--- a/modules/openapi-generator/src/main/resources/python/model_templates/methods_setattr_getattr_composed.mustache
+++ b/modules/openapi-generator/src/main/resources/python/model_templates/methods_setattr_getattr_composed.mustache
@@ -4,27 +4,43 @@
self.__dict__[name] = value
return
- # set the attribute on the correct instance
- model_instances = self._var_name_to_model_instances.get(
- name, self._additional_properties_model_instances)
- if model_instances:
- for model_instance in model_instances:
- if model_instance == self:
- self.set_attribute(name, value)
- else:
- setattr(model_instance, name, value)
- if name not in self._var_name_to_model_instances:
- # we assigned an additional property
- self.__dict__['_var_name_to_model_instances'][name] = (
- model_instance
- )
- return None
+ """
+ Use cases:
+ 1. additional_properties_type is None (additionalProperties == False in spec)
+ Check for property presence in self.openapi_types
+ if not present then throw an error
+ if present set in self, set attribute
+ always set on composed schemas
+ 2. additional_properties_type exists
+ set attribute on self
+ always set on composed schemas
+ """
+ if self.additional_properties_type is None:
+ """
+ For an attribute to exist on a composed schema it must:
+ - fulfill schema_requirements in the self composed schema not considering oneOf/anyOf/allOf schemas AND
+ - fulfill schema_requirements in each oneOf/anyOf/allOf schemas
- raise ApiAttributeError(
- "{0} has no attribute '{1}'".format(
- type(self).__name__, name),
- [e for e in [self._path_to_item, name] if e]
- )
+ schema_requirements:
+ For an attribute to exist on a schema it must:
+ - be present in properties at the schema OR
+ - have additionalProperties unset (defaults additionalProperties = any type) OR
+ - have additionalProperties set
+ """
+ if name not in self.openapi_types:
+ raise ApiAttributeError(
+ "{0} has no attribute '{1}'".format(
+ type(self).__name__, name),
+ [e for e in [self._path_to_item, name] if e]
+ )
+ # attribute must be set on self and composed instances
+ self.set_attribute(name, value)
+ for model_instance in self._composed_instances:
+ setattr(model_instance, name, value)
+ if name not in self._var_name_to_model_instances:
+ # we assigned an additional property
+ self.__dict__['_var_name_to_model_instances'][name] = self._composed_instances + [self]
+ return None
__unset_attribute_value__ = object()
@@ -34,13 +50,12 @@
return self.__dict__[name]
# get the attribute from the correct instance
- model_instances = self._var_name_to_model_instances.get(
- name, self._additional_properties_model_instances)
+ model_instances = self._var_name_to_model_instances.get(name)
values = []
- # A composed model stores child (oneof/anyOf/allOf) models under
- # self._var_name_to_model_instances. A named property can exist in
- # multiple child models. If the property is present in more than one
- # child model, the value must be the same across all the child models.
+ # A composed model stores self and child (oneof/anyOf/allOf) models under
+ # self._var_name_to_model_instances.
+ # Any property must exist in self and all model instances
+ # The value stored in all model instances must be the same
if model_instances:
for model_instance in model_instances:
if name in model_instance._data_store:
diff --git a/modules/openapi-generator/src/main/resources/python/model_utils.mustache b/modules/openapi-generator/src/main/resources/python/model_utils.mustache
index fb60afb60d6..3621a5eec51 100644
--- a/modules/openapi-generator/src/main/resources/python/model_utils.mustache
+++ b/modules/openapi-generator/src/main/resources/python/model_utils.mustache
@@ -1302,8 +1302,13 @@ def get_allof_instances(self, model_args, constant_args):
self: the class we are handling
model_args (dict): var_name to var_value
used to make instances
- constant_args (dict): var_name to var_value
- used to make instances
+ constant_args (dict):
+ metadata arguments:
+ _check_type
+ _path_to_item
+ _spec_property_naming
+ _configuration
+ _visited_composed_classes
Returns
composed_instances (list)
@@ -1311,20 +1316,8 @@ def get_allof_instances(self, model_args, constant_args):
composed_instances = []
for allof_class in self._composed_schemas['allOf']:
- # no need to handle changing js keys to python because
- # for composed schemas, allof parameters are included in the
- # composed schema and were changed to python keys in __new__
- # extract a dict of only required keys from fixed_model_args
- kwargs = {}
- var_names = set(allof_class.openapi_types.keys())
- for var_name in var_names:
- if var_name in model_args:
- kwargs[var_name] = model_args[var_name]
-
- # and use it to make the instance
- kwargs.update(constant_args)
try:
- allof_instance = allof_class(**kwargs)
+ allof_instance = allof_class(**model_args, **constant_args)
composed_instances.append(allof_instance)
except Exception as ex:
raise ApiValueError(
@@ -1384,31 +1377,9 @@ def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None):
single_value_input = allows_single_value_input(oneof_class)
- if not single_value_input:
- # transform js keys from input data to python keys in fixed_model_args
- fixed_model_args = change_keys_js_to_python(
- model_kwargs, oneof_class)
-
- # Extract a dict with the properties that are declared in the oneOf schema.
- # Undeclared properties (e.g. properties that are allowed because of the
- # additionalProperties attribute in the OAS document) are not added to
- # the dict.
- kwargs = {}
- var_names = set(oneof_class.openapi_types.keys())
- for var_name in var_names:
- if var_name in fixed_model_args:
- kwargs[var_name] = fixed_model_args[var_name]
-
- # do not try to make a model with no input args
- if len(kwargs) == 0:
- continue
-
- # and use it to make the instance
- kwargs.update(constant_kwargs)
-
try:
if not single_value_input:
- oneof_instance = oneof_class(**kwargs)
+ oneof_instance = oneof_class(**model_kwargs, **constant_kwargs)
else:
if issubclass(oneof_class, ModelSimple):
oneof_instance = oneof_class(model_arg, **constant_kwargs)
@@ -1465,24 +1436,8 @@ def get_anyof_instances(self, model_args, constant_args):
# none_type deserialization is handled in the __new__ method
continue
- # transform js keys to python keys in fixed_model_args
- fixed_model_args = change_keys_js_to_python(model_args, anyof_class)
-
- # extract a dict of only required keys from these_model_vars
- kwargs = {}
- var_names = set(anyof_class.openapi_types.keys())
- for var_name in var_names:
- if var_name in fixed_model_args:
- kwargs[var_name] = fixed_model_args[var_name]
-
- # do not try to make a model with no input args
- if len(kwargs) == 0:
- continue
-
- # and use it to make the instance
- kwargs.update(constant_args)
try:
- anyof_instance = anyof_class(**kwargs)
+ anyof_instance = anyof_class(**model_args, **constant_args)
anyof_instances.append(anyof_instance)
except Exception:
pass
@@ -1495,47 +1450,34 @@ def get_anyof_instances(self, model_args, constant_args):
return anyof_instances
-def get_additional_properties_model_instances(
- composed_instances, self):
- additional_properties_model_instances = []
- all_instances = [self]
- all_instances.extend(composed_instances)
- for instance in all_instances:
- if instance.additional_properties_type is not None:
- additional_properties_model_instances.append(instance)
- return additional_properties_model_instances
-
-
-def get_var_name_to_model_instances(self, composed_instances):
- var_name_to_model_instances = {}
- all_instances = [self]
- all_instances.extend(composed_instances)
- for instance in all_instances:
- for var_name in instance.openapi_types:
- if var_name not in var_name_to_model_instances:
- var_name_to_model_instances[var_name] = [instance]
- else:
- var_name_to_model_instances[var_name].append(instance)
- return var_name_to_model_instances
-
-
-def get_unused_args(self, composed_instances, model_args):
- unused_args = dict(model_args)
- # arguments apssed to self were already converted to python names
+def get_discarded_args(self, composed_instances, model_args):
+ """
+ Gathers the args that were discarded by configuration.discard_unknown_keys
+ """
+ model_arg_keys = model_args.keys()
+ discarded_args = set()
+ # arguments passed to self were already converted to python names
# before __init__ was called
- for var_name_py in self.attribute_map:
- if var_name_py in unused_args:
- del unused_args[var_name_py]
for instance in composed_instances:
if instance.__class__ in self._composed_schemas['allOf']:
- for var_name_py in instance.attribute_map:
- if var_name_py in unused_args:
- del unused_args[var_name_py]
+ try:
+ keys = instance.to_dict().keys()
+ discarded_keys = model_args - keys
+ discarded_args.update(discarded_keys)
+ except Exception:
+ # allOf integer schema will throw exception
+ pass
else:
- for var_name_js in instance.attribute_map.values():
- if var_name_js in unused_args:
- del unused_args[var_name_js]
- return unused_args
+ try:
+ all_keys = set(model_to_dict(instance, serialize=False).keys())
+ js_keys = model_to_dict(instance, serialize=True).keys()
+ all_keys.update(js_keys)
+ discarded_keys = model_arg_keys - all_keys
+ discarded_args.update(discarded_keys)
+ except Exception:
+ # allOf integer schema will throw exception
+ pass
+ return discarded_args
def validate_get_composed_info(constant_args, model_args, self):
@@ -1579,36 +1521,42 @@ def validate_get_composed_info(constant_args, model_args, self):
composed_instances.append(oneof_instance)
anyof_instances = get_anyof_instances(self, model_args, constant_args)
composed_instances.extend(anyof_instances)
+ """
+ set additional_properties_model_instances
+ additional properties must be evaluated at the schema level
+ so self's additional properties are most important
+ If self is a composed schema with:
+ - no properties defined in self
+ - additionalProperties: False
+ Then for object payloads every property is an additional property
+ and they are not allowed, so only empty dict is allowed
+
+ Properties must be set on all matching schemas
+ so when a property is assigned toa composed instance, it must be set on all
+ composed instances regardless of additionalProperties presence
+ keeping it to prevent breaking changes in v5.0.1
+ TODO remove cls._additional_properties_model_instances in 6.0.0
+ """
+ additional_properties_model_instances = []
+ if self.additional_properties_type is not None:
+ additional_properties_model_instances = [self]
+
+ """
+ no need to set properties on self in here, they will be set in __init__
+ By here all composed schema oneOf/anyOf/allOf instances have their properties set using
+ model_args
+ """
+ discarded_args = get_discarded_args(self, composed_instances, model_args)
# map variable names to composed_instances
- var_name_to_model_instances = get_var_name_to_model_instances(
- self, composed_instances)
-
- # set additional_properties_model_instances
- additional_properties_model_instances = (
- get_additional_properties_model_instances(composed_instances, self)
- )
-
- # set any remaining values
- unused_args = get_unused_args(self, composed_instances, model_args)
- if len(unused_args) > 0 and \
- len(additional_properties_model_instances) == 0 and \
- (self._configuration is None or
- not self._configuration.discard_unknown_keys):
- raise ApiValueError(
- "Invalid input arguments input when making an instance of "
- "class %s. Not all inputs were used. The unused input data "
- "is %s" % (self.__class__.__name__, unused_args)
- )
-
- # no need to add additional_properties to var_name_to_model_instances here
- # because additional_properties_model_instances will direct us to that
- # instance when we use getattr or setattr
- # and we update var_name_to_model_instances in setattr
+ var_name_to_model_instances = {}
+ for prop_name in model_args:
+ if prop_name not in discarded_args:
+ var_name_to_model_instances[prop_name] = [self] + composed_instances
return [
composed_instances,
var_name_to_model_instances,
additional_properties_model_instances,
- unused_args
+ discarded_args
]
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/KotlinModelCodegenTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/KotlinModelCodegenTest.java
index 6885057c1c0..19829496e23 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/KotlinModelCodegenTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/kotlin/KotlinModelCodegenTest.java
@@ -9,6 +9,7 @@ import org.openapitools.codegen.DefaultGenerator;
import org.openapitools.codegen.languages.AbstractKotlinCodegen;
import org.openapitools.codegen.languages.KotlinClientCodegen;
import org.openapitools.codegen.languages.KotlinServerCodegen;
+import org.openapitools.codegen.languages.KotlinServerDeprecatedCodegen;
import org.openapitools.codegen.languages.KotlinSpringServerCodegen;
import org.openapitools.codegen.languages.KotlinVertxServerCodegen;
import org.testng.annotations.DataProvider;
@@ -28,6 +29,7 @@ public class KotlinModelCodegenTest {
return new Object[][]{
{new KotlinClientCodegen()},
{new KotlinServerCodegen()},
+ {new KotlinServerDeprecatedCodegen()},
{new KotlinSpringServerCodegen()},
{new KotlinVertxServerCodegen()},
};
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PythonClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PythonClientOptionsProvider.java
index 7beb3ec69c0..fc7d74074dd 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PythonClientOptionsProvider.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PythonClientOptionsProvider.java
@@ -19,7 +19,7 @@ package org.openapitools.codegen.options;
import com.google.common.collect.ImmutableMap;
import org.openapitools.codegen.CodegenConstants;
-import org.openapitools.codegen.languages.PythonLegacyClientCodegen;
+import org.openapitools.codegen.languages.PythonClientCodegen;
import java.util.Map;
@@ -30,6 +30,8 @@ public class PythonClientOptionsProvider implements OptionsProvider {
public static final String PACKAGE_URL_VALUE = "";
public static final String USE_NOSE_VALUE = "false";
public static final String RECURSION_LIMIT = "1200";
+ public static final String DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT = "false";
+ public static final String PYTHON_ATTR_NONE_IF_UNSET = "false";
@Override
public String getLanguage() {
@@ -39,16 +41,17 @@ public class PythonClientOptionsProvider implements OptionsProvider {
@Override
public Map createOptions() {
ImmutableMap.Builder builder = new ImmutableMap.Builder();
- return builder.put(PythonLegacyClientCodegen.PACKAGE_URL, PACKAGE_URL_VALUE)
+ return builder.put(PythonClientCodegen.PACKAGE_URL, PACKAGE_URL_VALUE)
.put(CodegenConstants.PACKAGE_NAME, PACKAGE_NAME_VALUE)
.put(CodegenConstants.PROJECT_NAME, PROJECT_NAME_VALUE)
.put(CodegenConstants.PACKAGE_VERSION, PACKAGE_VERSION_VALUE)
- .put(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG, "true")
.put(CodegenConstants.HIDE_GENERATION_TIMESTAMP, "true")
.put(CodegenConstants.SOURCECODEONLY_GENERATION, "false")
.put(CodegenConstants.LIBRARY, "urllib3")
- .put(PythonLegacyClientCodegen.USE_NOSE, USE_NOSE_VALUE)
- .put(PythonLegacyClientCodegen.RECURSION_LIMIT, RECURSION_LIMIT)
+ .put(CodegenConstants.DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT, DISALLOW_ADDITIONAL_PROPERTIES_IF_NOT_PRESENT)
+ .put(PythonClientCodegen.USE_NOSE, USE_NOSE_VALUE)
+ .put(PythonClientCodegen.RECURSION_LIMIT, RECURSION_LIMIT)
+ .put(PythonClientCodegen.PYTHON_ATTR_NONE_IF_UNSET, PYTHON_ATTR_NONE_IF_UNSET)
.build();
}
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PythonLegacyClientOptionsProvider.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PythonLegacyClientOptionsProvider.java
new file mode 100644
index 00000000000..90e76caea16
--- /dev/null
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/options/PythonLegacyClientOptionsProvider.java
@@ -0,0 +1,59 @@
+/*
+ * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+ * Copyright 2018 SmartBear Software
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.openapitools.codegen.options;
+
+import com.google.common.collect.ImmutableMap;
+import org.openapitools.codegen.CodegenConstants;
+import org.openapitools.codegen.languages.PythonLegacyClientCodegen;
+
+import java.util.Map;
+
+public class PythonLegacyClientOptionsProvider implements OptionsProvider {
+ public static final String PACKAGE_NAME_VALUE = "swagger_client_python";
+ public static final String PROJECT_NAME_VALUE = "swagger-client-python";
+ public static final String PACKAGE_VERSION_VALUE = "1.0.0-SNAPSHOT";
+ public static final String PACKAGE_URL_VALUE = "";
+ public static final String USE_NOSE_VALUE = "false";
+ public static final String RECURSION_LIMIT = "1200";
+
+ @Override
+ public String getLanguage() {
+ return "python";
+ }
+
+ @Override
+ public Map createOptions() {
+ ImmutableMap.Builder builder = new ImmutableMap.Builder();
+ return builder.put(PythonLegacyClientCodegen.PACKAGE_URL, PACKAGE_URL_VALUE)
+ .put(CodegenConstants.PACKAGE_NAME, PACKAGE_NAME_VALUE)
+ .put(CodegenConstants.PROJECT_NAME, PROJECT_NAME_VALUE)
+ .put(CodegenConstants.PACKAGE_VERSION, PACKAGE_VERSION_VALUE)
+ .put(CodegenConstants.SORT_PARAMS_BY_REQUIRED_FLAG, "true")
+ .put(CodegenConstants.HIDE_GENERATION_TIMESTAMP, "true")
+ .put(CodegenConstants.SOURCECODEONLY_GENERATION, "false")
+ .put(CodegenConstants.LIBRARY, "urllib3")
+ .put(PythonLegacyClientCodegen.USE_NOSE, USE_NOSE_VALUE)
+ .put(PythonLegacyClientCodegen.RECURSION_LIMIT, RECURSION_LIMIT)
+ .build();
+ }
+
+ @Override
+ public boolean isServer() {
+ return false;
+ }
+}
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientOptionsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientOptionsTest.java
index 8bec98892ef..e423c6e8584 100644
--- a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientOptionsTest.java
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonClientOptionsTest.java
@@ -19,7 +19,7 @@ package org.openapitools.codegen.python;
import org.openapitools.codegen.AbstractOptionsTest;
import org.openapitools.codegen.CodegenConfig;
-import org.openapitools.codegen.languages.PythonLegacyClientCodegen;
+import org.openapitools.codegen.languages.PythonClientCodegen;
import org.openapitools.codegen.options.PythonClientOptionsProvider;
import org.testng.Assert;
@@ -29,7 +29,7 @@ import static org.mockito.Mockito.mock;
import static org.mockito.Mockito.verify;
public class PythonClientOptionsTest extends AbstractOptionsTest {
- private PythonLegacyClientCodegen clientCodegen = mock(PythonLegacyClientCodegen.class, mockSettings);
+ private PythonClientCodegen clientCodegen = mock(PythonClientCodegen.class, mockSettings);
public PythonClientOptionsTest() {
super(new PythonClientOptionsProvider());
diff --git a/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonLegacyClientOptionsTest.java b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonLegacyClientOptionsTest.java
new file mode 100644
index 00000000000..8c17cdbb2fd
--- /dev/null
+++ b/modules/openapi-generator/src/test/java/org/openapitools/codegen/python/PythonLegacyClientOptionsTest.java
@@ -0,0 +1,54 @@
+/*
+ * Copyright 2018 OpenAPI-Generator Contributors (https://openapi-generator.tech)
+ * Copyright 2018 SmartBear Software
+ *
+ * Licensed under the Apache License, Version 2.0 (the "License");
+ * you may not use this file except in compliance with the License.
+ * You may obtain a copy of the License at
+ *
+ * https://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
+package org.openapitools.codegen.python;
+
+import org.openapitools.codegen.AbstractOptionsTest;
+import org.openapitools.codegen.CodegenConfig;
+import org.openapitools.codegen.languages.PythonLegacyClientCodegen;
+import org.openapitools.codegen.options.PythonLegacyClientOptionsProvider;
+import org.testng.Assert;
+
+import java.io.File;
+
+import static org.mockito.Mockito.mock;
+import static org.mockito.Mockito.verify;
+
+public class PythonLegacyClientOptionsTest extends AbstractOptionsTest {
+ private PythonLegacyClientCodegen clientCodegen = mock(PythonLegacyClientCodegen.class, mockSettings);
+
+ public PythonLegacyClientOptionsTest() {
+ super(new PythonLegacyClientOptionsProvider());
+ }
+
+ @Override
+ protected CodegenConfig getCodegenConfig() {
+ return clientCodegen;
+ }
+
+ @SuppressWarnings("unused")
+ @Override
+ protected void verifyOptions() {
+ Assert.assertEquals(clientCodegen.packagePath(), PythonLegacyClientOptionsProvider.PACKAGE_NAME_VALUE.replace('.', File.separatorChar));
+
+ verify(clientCodegen).setPackageName(PythonLegacyClientOptionsProvider.PACKAGE_NAME_VALUE);
+ verify(clientCodegen).setProjectName(PythonLegacyClientOptionsProvider.PROJECT_NAME_VALUE);
+ verify(clientCodegen).setPackageVersion(PythonLegacyClientOptionsProvider.PACKAGE_VERSION_VALUE);
+ verify(clientCodegen).setPackageUrl(PythonLegacyClientOptionsProvider.PACKAGE_URL_VALUE);
+ verify(clientCodegen).setUseNose(PythonLegacyClientOptionsProvider.USE_NOSE_VALUE);
+ }
+}
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 9e9451dcc5b..097ae6768bb 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
@@ -1373,8 +1373,6 @@ definitions:
properties:
breed:
type: string
- additionalProperties: false
- additionalProperties: false
Cat:
allOf:
- $ref: '#/definitions/Animal'
@@ -1523,8 +1521,7 @@ definitions:
type: object
additionalProperties:
type: array
- items:
- type: object
+ items: {}
map_map_string:
type: object
additionalProperties:
@@ -1535,14 +1532,15 @@ definitions:
type: object
additionalProperties:
type: object
- additionalProperties:
- type: object
- anytype_1:
- type: object
- anytype_2: {}
+ additionalProperties: {}
+ anytype_1: {}
+ anytype_2:
+ description: no type is set for this
anytype_3:
type: object
properties: {}
+ description: 'because of a bug in swagger-parser, this should have values {str: (str, int, float...)}
+ but instead we get any type. See https://github.com/swagger-api/swagger-parser/issues/1378'
AdditionalPropertiesString:
type: object
properties:
@@ -2091,7 +2089,6 @@ definitions:
properties:
interNet:
type: boolean
- additionalProperties: false
GrandparentAnimal:
type: object
required:
diff --git a/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
index a1e07d488bd..27b97c89d8c 100644
--- a/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
+++ b/modules/openapi-generator/src/test/resources/3_0/python/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
@@ -1646,7 +1646,6 @@ components:
Cat:
allOf:
- $ref: '#/components/schemas/Animal'
- - $ref: '#/components/schemas/Address'
- type: object
properties:
declawed:
@@ -2107,6 +2106,9 @@ components:
items:
type: object
nullable: true
+ object_nullable:
+ type: object
+ nullable: true
object_nullable_prop:
type: object
nullable: true
@@ -2124,18 +2126,27 @@ components:
type: object
nullable: true
additionalProperties:
- type: object
nullable: true
+ ComposedSchemaWithPropsAndNoAddProps:
+ properties:
+ color:
+ type: string
+ allOf:
+ - $ref: '#/components/schemas/Tag'
+ # Below additionalProperties is set to false to validate the use
+ # case when a composed schema has additionalProperties set to false.
+ # This definition will only allow in object payloads that set color and no other properties because
+ # additionalProperties are evaluated at the schema level and do not include composed schema
+ # properties. Only color is defined here, all others are additional
+ additionalProperties: false
fruit:
+ description: a schema that tests oneOf and includes a schema level property
properties:
color:
type: string
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:
@@ -2145,12 +2156,16 @@ components:
origin:
type: string
pattern: /^[A-Z\s]*$/i
+ required:
+ - cultivar
nullable: true
banana:
type: object
properties:
lengthCm:
type: number
+ required:
+ - lengthCm
mammal:
oneOf:
- $ref: '#/components/schemas/whale'
@@ -2210,13 +2225,13 @@ components:
anyOf:
- $ref: '#/components/schemas/apple'
- $ref: '#/components/schemas/banana'
- additionalProperties: false
fruitReq:
+ description: a schema where additionalProperties is on in the composed schema and off in the oneOf object schemas
+ also, this schem accepts null as a value
oneOf:
- type: 'null'
- $ref: '#/components/schemas/appleReq'
- $ref: '#/components/schemas/bananaReq'
- additionalProperties: false
appleReq:
type: object
properties:
@@ -2320,7 +2335,6 @@ components:
allOf:
- $ref: '#/components/schemas/ShapeInterface'
- $ref: '#/components/schemas/TriangleInterface'
- additionalProperties: false
ScaleneTriangle:
allOf:
- $ref: '#/components/schemas/ShapeInterface'
diff --git a/pom.xml b/pom.xml
index 9e32caa32aa..01940dccf7a 100644
--- a/pom.xml
+++ b/pom.xml
@@ -10,7 +10,7 @@
pom
openapi-generator-project
- 5.1.1
+ 5.2.0-SNAPSHOT
https://github.com/openapitools/openapi-generator
@@ -1206,6 +1206,7 @@
samples/client/petstore/javascript-flowtyped
samples/client/petstore/python
+ samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent
samples/client/petstore/python-legacy
samples/client/petstore/python-asyncio
samples/client/petstore/python-tornado
diff --git a/samples/client/petstore/R/.openapi-generator/VERSION b/samples/client/petstore/R/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/R/.openapi-generator/VERSION
+++ b/samples/client/petstore/R/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/apex/.openapi-generator/VERSION b/samples/client/petstore/apex/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/apex/.openapi-generator/VERSION
+++ b/samples/client/petstore/apex/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/bash/.openapi-generator/VERSION b/samples/client/petstore/bash/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/bash/.openapi-generator/VERSION
+++ b/samples/client/petstore/bash/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/c/.openapi-generator/VERSION b/samples/client/petstore/c/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/c/.openapi-generator/VERSION
+++ b/samples/client/petstore/c/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION b/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION
+++ b/samples/client/petstore/cpp-qt5/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION b/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION
+++ b/samples/client/petstore/cpp-restsdk/client/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp b/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp
index aee3c61f9dc..cb51123c894 100644
--- a/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/ApiClient.cpp
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/ApiClient.h b/samples/client/petstore/cpp-restsdk/client/ApiClient.h
index 3fb863be6c3..46e2f100ef2 100644
--- a/samples/client/petstore/cpp-restsdk/client/ApiClient.h
+++ b/samples/client/petstore/cpp-restsdk/client/ApiClient.h
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp
index a60b978a01d..52554ff63c7 100644
--- a/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.cpp
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h
index 4bbbc82d19d..74c298a5a94 100644
--- a/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h
+++ b/samples/client/petstore/cpp-restsdk/client/ApiConfiguration.h
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/ApiException.cpp b/samples/client/petstore/cpp-restsdk/client/ApiException.cpp
index 587302df0f4..bfae070986e 100644
--- a/samples/client/petstore/cpp-restsdk/client/ApiException.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/ApiException.cpp
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/ApiException.h b/samples/client/petstore/cpp-restsdk/client/ApiException.h
index a07cb2886ee..cd7915e04e0 100644
--- a/samples/client/petstore/cpp-restsdk/client/ApiException.h
+++ b/samples/client/petstore/cpp-restsdk/client/ApiException.h
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp b/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp
index 31b2074889b..9de06a9eea1 100644
--- a/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/HttpContent.cpp
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/HttpContent.h b/samples/client/petstore/cpp-restsdk/client/HttpContent.h
index 9f63c217160..ffba49f782a 100644
--- a/samples/client/petstore/cpp-restsdk/client/HttpContent.h
+++ b/samples/client/petstore/cpp-restsdk/client/HttpContent.h
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/IHttpBody.h b/samples/client/petstore/cpp-restsdk/client/IHttpBody.h
index 68403ab6e56..1a1b0a55e90 100644
--- a/samples/client/petstore/cpp-restsdk/client/IHttpBody.h
+++ b/samples/client/petstore/cpp-restsdk/client/IHttpBody.h
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp b/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp
index 75bb6c83cb6..658ef28191c 100644
--- a/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/JsonBody.cpp
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/JsonBody.h b/samples/client/petstore/cpp-restsdk/client/JsonBody.h
index 7c521220a29..f9717b9c9be 100644
--- a/samples/client/petstore/cpp-restsdk/client/JsonBody.h
+++ b/samples/client/petstore/cpp-restsdk/client/JsonBody.h
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp b/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp
index 5a183729603..4803353fa2c 100644
--- a/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/ModelBase.cpp
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/ModelBase.h b/samples/client/petstore/cpp-restsdk/client/ModelBase.h
index 1efa72dea2c..417c04a69e0 100644
--- a/samples/client/petstore/cpp-restsdk/client/ModelBase.h
+++ b/samples/client/petstore/cpp-restsdk/client/ModelBase.h
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp
index 5ba899102e9..c6c22d58185 100644
--- a/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.cpp
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h
index 0ec4344fac8..ea1f59b31a4 100644
--- a/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h
+++ b/samples/client/petstore/cpp-restsdk/client/MultipartFormData.h
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/Object.cpp b/samples/client/petstore/cpp-restsdk/client/Object.cpp
index e168728a550..0c05fe80e4b 100644
--- a/samples/client/petstore/cpp-restsdk/client/Object.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/Object.cpp
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/Object.h b/samples/client/petstore/cpp-restsdk/client/Object.h
index 4f24052e5be..fcb51a1da3b 100644
--- a/samples/client/petstore/cpp-restsdk/client/Object.h
+++ b/samples/client/petstore/cpp-restsdk/client/Object.h
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp b/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp
index a5e2fc91fc9..fe9bcacf458 100644
--- a/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/api/PetApi.cpp
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/api/PetApi.h b/samples/client/petstore/cpp-restsdk/client/api/PetApi.h
index 0cb38bd28c3..694cde1512c 100644
--- a/samples/client/petstore/cpp-restsdk/client/api/PetApi.h
+++ b/samples/client/petstore/cpp-restsdk/client/api/PetApi.h
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp
index 3d1dbc21292..b60e41cfcfc 100644
--- a/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.cpp
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h
index 37dc0e7914e..c5241a6e2d8 100644
--- a/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h
+++ b/samples/client/petstore/cpp-restsdk/client/api/StoreApi.h
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp b/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp
index b562a62781f..4927b6785ec 100644
--- a/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/api/UserApi.cpp
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/api/UserApi.h b/samples/client/petstore/cpp-restsdk/client/api/UserApi.h
index 43b9b21a192..c4aa9ed6024 100644
--- a/samples/client/petstore/cpp-restsdk/client/api/UserApi.h
+++ b/samples/client/petstore/cpp-restsdk/client/api/UserApi.h
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp
index a00af3e6906..e43dcecded1 100644
--- a/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.cpp
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h
index feef2b4e3aa..f892cedb7f8 100644
--- a/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h
+++ b/samples/client/petstore/cpp-restsdk/client/model/ApiResponse.h
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/model/Category.cpp b/samples/client/petstore/cpp-restsdk/client/model/Category.cpp
index 4c8474c8288..38ee7a83130 100644
--- a/samples/client/petstore/cpp-restsdk/client/model/Category.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/model/Category.cpp
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/model/Category.h b/samples/client/petstore/cpp-restsdk/client/model/Category.h
index f48a03d1952..5aab92bf04d 100644
--- a/samples/client/petstore/cpp-restsdk/client/model/Category.h
+++ b/samples/client/petstore/cpp-restsdk/client/model/Category.h
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/model/Order.cpp b/samples/client/petstore/cpp-restsdk/client/model/Order.cpp
index 9dd76252a7d..17f40a62a73 100644
--- a/samples/client/petstore/cpp-restsdk/client/model/Order.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/model/Order.cpp
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/model/Order.h b/samples/client/petstore/cpp-restsdk/client/model/Order.h
index 5b31e77553a..dbe4b2cb774 100644
--- a/samples/client/petstore/cpp-restsdk/client/model/Order.h
+++ b/samples/client/petstore/cpp-restsdk/client/model/Order.h
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp b/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp
index 798d5286d40..e7e6228a95f 100644
--- a/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/model/Pet.cpp
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/model/Pet.h b/samples/client/petstore/cpp-restsdk/client/model/Pet.h
index cd9843e18ae..543a4fed12e 100644
--- a/samples/client/petstore/cpp-restsdk/client/model/Pet.h
+++ b/samples/client/petstore/cpp-restsdk/client/model/Pet.h
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp b/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp
index 175703246bd..401b81b6893 100644
--- a/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/model/Tag.cpp
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/model/Tag.h b/samples/client/petstore/cpp-restsdk/client/model/Tag.h
index c10ffe79433..f183c7adf9d 100644
--- a/samples/client/petstore/cpp-restsdk/client/model/Tag.h
+++ b/samples/client/petstore/cpp-restsdk/client/model/Tag.h
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/model/User.cpp b/samples/client/petstore/cpp-restsdk/client/model/User.cpp
index 2b4e5194602..3065eb0b554 100644
--- a/samples/client/petstore/cpp-restsdk/client/model/User.cpp
+++ b/samples/client/petstore/cpp-restsdk/client/model/User.cpp
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/cpp-restsdk/client/model/User.h b/samples/client/petstore/cpp-restsdk/client/model/User.h
index 9b2e0d7b983..731b2517d6d 100644
--- a/samples/client/petstore/cpp-restsdk/client/model/User.h
+++ b/samples/client/petstore/cpp-restsdk/client/model/User.h
@@ -4,7 +4,7 @@
*
* The version of the OpenAPI document: 1.0.0
*
- * NOTE: This class is auto generated by OpenAPI-Generator 5.1.1.
+ * NOTE: This class is auto generated by OpenAPI-Generator 5.2.0-SNAPSHOT.
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/crystal/.openapi-generator/VERSION b/samples/client/petstore/crystal/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/crystal/.openapi-generator/VERSION
+++ b/samples/client/petstore/crystal/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/crystal/.travis.yml b/samples/client/petstore/crystal/.travis.yml
index 03fe6908f22..b40e33fb20e 100644
--- a/samples/client/petstore/crystal/.travis.yml
+++ b/samples/client/petstore/crystal/.travis.yml
@@ -5,7 +5,7 @@
#The version of the OpenAPI document: 1.0.0
#
#Generated by: https://openapi-generator.tech
-#OpenAPI Generator version: 5.1.1
+#OpenAPI Generator version: 5.2.0-SNAPSHOT
#
language: crystal
diff --git a/samples/client/petstore/crystal/spec/spec_helper.cr b/samples/client/petstore/crystal/spec/spec_helper.cr
index 8e6463d1dc6..6532505ff2b 100644
--- a/samples/client/petstore/crystal/spec/spec_helper.cr
+++ b/samples/client/petstore/crystal/spec/spec_helper.cr
@@ -5,7 +5,7 @@
#The version of the OpenAPI document: 1.0.0
#
#Generated by: https://openapi-generator.tech
-#OpenAPI Generator version: 5.1.1
+#OpenAPI Generator version: 5.2.0-SNAPSHOT
#
# load modules
diff --git a/samples/client/petstore/crystal/src/petstore.cr b/samples/client/petstore/crystal/src/petstore.cr
index 2714eeb12a2..1f02cc1930d 100644
--- a/samples/client/petstore/crystal/src/petstore.cr
+++ b/samples/client/petstore/crystal/src/petstore.cr
@@ -5,7 +5,7 @@
#The version of the OpenAPI document: 1.0.0
#
#Generated by: https://openapi-generator.tech
-#OpenAPI Generator version: 5.1.1
+#OpenAPI Generator version: 5.2.0-SNAPSHOT
#
# Dependencies
diff --git a/samples/client/petstore/crystal/src/petstore/api/pet_api.cr b/samples/client/petstore/crystal/src/petstore/api/pet_api.cr
index e09038a5ba9..7e672a21a61 100644
--- a/samples/client/petstore/crystal/src/petstore/api/pet_api.cr
+++ b/samples/client/petstore/crystal/src/petstore/api/pet_api.cr
@@ -5,7 +5,7 @@
#The version of the OpenAPI document: 1.0.0
#
#Generated by: https://openapi-generator.tech
-#OpenAPI Generator version: 5.1.1
+#OpenAPI Generator version: 5.2.0-SNAPSHOT
#
require "uri"
diff --git a/samples/client/petstore/crystal/src/petstore/api/store_api.cr b/samples/client/petstore/crystal/src/petstore/api/store_api.cr
index 4be9e250868..126dbab7bf4 100644
--- a/samples/client/petstore/crystal/src/petstore/api/store_api.cr
+++ b/samples/client/petstore/crystal/src/petstore/api/store_api.cr
@@ -5,7 +5,7 @@
#The version of the OpenAPI document: 1.0.0
#
#Generated by: https://openapi-generator.tech
-#OpenAPI Generator version: 5.1.1
+#OpenAPI Generator version: 5.2.0-SNAPSHOT
#
require "uri"
diff --git a/samples/client/petstore/crystal/src/petstore/api/user_api.cr b/samples/client/petstore/crystal/src/petstore/api/user_api.cr
index 5ba42511c13..2b6d6acdace 100644
--- a/samples/client/petstore/crystal/src/petstore/api/user_api.cr
+++ b/samples/client/petstore/crystal/src/petstore/api/user_api.cr
@@ -5,7 +5,7 @@
#The version of the OpenAPI document: 1.0.0
#
#Generated by: https://openapi-generator.tech
-#OpenAPI Generator version: 5.1.1
+#OpenAPI Generator version: 5.2.0-SNAPSHOT
#
require "uri"
diff --git a/samples/client/petstore/crystal/src/petstore/api_client.cr b/samples/client/petstore/crystal/src/petstore/api_client.cr
index 7e241a63aa3..75fe8faa203 100644
--- a/samples/client/petstore/crystal/src/petstore/api_client.cr
+++ b/samples/client/petstore/crystal/src/petstore/api_client.cr
@@ -5,7 +5,7 @@
#The version of the OpenAPI document: 1.0.0
#
#Generated by: https://openapi-generator.tech
-#OpenAPI Generator version: 5.1.1
+#OpenAPI Generator version: 5.2.0-SNAPSHOT
#
require "json"
diff --git a/samples/client/petstore/crystal/src/petstore/api_error.cr b/samples/client/petstore/crystal/src/petstore/api_error.cr
index b21ef0e666d..ef28c709d56 100644
--- a/samples/client/petstore/crystal/src/petstore/api_error.cr
+++ b/samples/client/petstore/crystal/src/petstore/api_error.cr
@@ -5,7 +5,7 @@
#The version of the OpenAPI document: 1.0.0
#
#Generated by: https://openapi-generator.tech
-#OpenAPI Generator version: 5.1.1
+#OpenAPI Generator version: 5.2.0-SNAPSHOT
#
module Petstore
diff --git a/samples/client/petstore/crystal/src/petstore/configuration.cr b/samples/client/petstore/crystal/src/petstore/configuration.cr
index 1d58733f2a4..78022839159 100644
--- a/samples/client/petstore/crystal/src/petstore/configuration.cr
+++ b/samples/client/petstore/crystal/src/petstore/configuration.cr
@@ -5,7 +5,7 @@
#The version of the OpenAPI document: 1.0.0
#
#Generated by: https://openapi-generator.tech
-#OpenAPI Generator version: 5.1.1
+#OpenAPI Generator version: 5.2.0-SNAPSHOT
#
require "log"
diff --git a/samples/client/petstore/crystal/src/petstore/models/api_response.cr b/samples/client/petstore/crystal/src/petstore/models/api_response.cr
index e78afdcab44..b0603e98c03 100644
--- a/samples/client/petstore/crystal/src/petstore/models/api_response.cr
+++ b/samples/client/petstore/crystal/src/petstore/models/api_response.cr
@@ -5,7 +5,7 @@
#The version of the OpenAPI document: 1.0.0
#
#Generated by: https://openapi-generator.tech
-#OpenAPI Generator version: 5.1.1
+#OpenAPI Generator version: 5.2.0-SNAPSHOT
#
require "time"
diff --git a/samples/client/petstore/crystal/src/petstore/models/category.cr b/samples/client/petstore/crystal/src/petstore/models/category.cr
index 8028347a310..d96bac1cf1c 100644
--- a/samples/client/petstore/crystal/src/petstore/models/category.cr
+++ b/samples/client/petstore/crystal/src/petstore/models/category.cr
@@ -5,7 +5,7 @@
#The version of the OpenAPI document: 1.0.0
#
#Generated by: https://openapi-generator.tech
-#OpenAPI Generator version: 5.1.1
+#OpenAPI Generator version: 5.2.0-SNAPSHOT
#
require "time"
diff --git a/samples/client/petstore/crystal/src/petstore/models/order.cr b/samples/client/petstore/crystal/src/petstore/models/order.cr
index 49683b62739..ee5a4356492 100644
--- a/samples/client/petstore/crystal/src/petstore/models/order.cr
+++ b/samples/client/petstore/crystal/src/petstore/models/order.cr
@@ -5,7 +5,7 @@
#The version of the OpenAPI document: 1.0.0
#
#Generated by: https://openapi-generator.tech
-#OpenAPI Generator version: 5.1.1
+#OpenAPI Generator version: 5.2.0-SNAPSHOT
#
require "time"
diff --git a/samples/client/petstore/crystal/src/petstore/models/pet.cr b/samples/client/petstore/crystal/src/petstore/models/pet.cr
index 8052f073825..91e5552b02e 100644
--- a/samples/client/petstore/crystal/src/petstore/models/pet.cr
+++ b/samples/client/petstore/crystal/src/petstore/models/pet.cr
@@ -5,7 +5,7 @@
#The version of the OpenAPI document: 1.0.0
#
#Generated by: https://openapi-generator.tech
-#OpenAPI Generator version: 5.1.1
+#OpenAPI Generator version: 5.2.0-SNAPSHOT
#
require "time"
diff --git a/samples/client/petstore/crystal/src/petstore/models/tag.cr b/samples/client/petstore/crystal/src/petstore/models/tag.cr
index e65ea328c3f..4121f2e67a7 100644
--- a/samples/client/petstore/crystal/src/petstore/models/tag.cr
+++ b/samples/client/petstore/crystal/src/petstore/models/tag.cr
@@ -5,7 +5,7 @@
#The version of the OpenAPI document: 1.0.0
#
#Generated by: https://openapi-generator.tech
-#OpenAPI Generator version: 5.1.1
+#OpenAPI Generator version: 5.2.0-SNAPSHOT
#
require "time"
diff --git a/samples/client/petstore/crystal/src/petstore/models/user.cr b/samples/client/petstore/crystal/src/petstore/models/user.cr
index 0a63ffb9f01..4f0d617e98d 100644
--- a/samples/client/petstore/crystal/src/petstore/models/user.cr
+++ b/samples/client/petstore/crystal/src/petstore/models/user.cr
@@ -5,7 +5,7 @@
#The version of the OpenAPI document: 1.0.0
#
#Generated by: https://openapi-generator.tech
-#OpenAPI Generator version: 5.1.1
+#OpenAPI Generator version: 5.2.0-SNAPSHOT
#
require "time"
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/.openapi-generator/VERSION
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-httpclient/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/VERSION
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net47/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/VERSION
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient-net5.0/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClient/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCore/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/.openapi-generator/VERSION b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/.openapi-generator/VERSION
+++ b/samples/client/petstore/csharp-netcore/OpenAPIClientCoreAndNet47/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION
+++ b/samples/client/petstore/csharp/OpenAPIClient/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/elixir/.openapi-generator/VERSION b/samples/client/petstore/elixir/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/elixir/.openapi-generator/VERSION
+++ b/samples/client/petstore/elixir/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION b/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION
+++ b/samples/client/petstore/go/go-petstore/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/groovy/.openapi-generator/VERSION b/samples/client/petstore/groovy/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/groovy/.openapi-generator/VERSION
+++ b/samples/client/petstore/groovy/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION b/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION
+++ b/samples/client/petstore/haskell-http-client/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/feign-no-nullable/.openapi-generator/VERSION b/samples/client/petstore/java/feign-no-nullable/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/java/feign-no-nullable/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/feign-no-nullable/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/feign/.openapi-generator/VERSION b/samples/client/petstore/java/feign/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/java/feign/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/feign/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION b/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/google-api-client/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/jersey1/.openapi-generator/VERSION b/samples/client/petstore/java/jersey1/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/java/jersey1/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/jersey1/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/jersey2-java8-localdatetime/.openapi-generator/VERSION b/samples/client/petstore/java/jersey2-java8-localdatetime/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/java/jersey2-java8-localdatetime/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/jersey2-java8-localdatetime/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION b/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/jersey2-java8/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/VERSION b/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/microprofile-rest-client/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/native-async/.openapi-generator/VERSION b/samples/client/petstore/java/native-async/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/java/native-async/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/native-async/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/native/.openapi-generator/VERSION b/samples/client/petstore/java/native/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/java/native/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/native/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/okhttp-gson-dynamicOperations/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/okhttp-gson-parcelableModel/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION b/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/okhttp-gson/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION b/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/rest-assured-jackson/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION b/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/rest-assured/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/resteasy/.openapi-generator/VERSION b/samples/client/petstore/java/resteasy/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/java/resteasy/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/resteasy/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION b/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/resttemplate-withXml/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION b/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/resttemplate/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/retrofit2-play26/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/retrofit2/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/retrofit2rx2/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/retrofit2rx3/.openapi-generator/VERSION b/samples/client/petstore/java/retrofit2rx3/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/java/retrofit2rx3/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/retrofit2rx3/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/VERSION b/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/vertx-no-nullable/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/vertx/.openapi-generator/VERSION b/samples/client/petstore/java/vertx/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/java/vertx/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/vertx/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/java/webclient/.openapi-generator/VERSION b/samples/client/petstore/java/webclient/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/java/webclient/.openapi-generator/VERSION
+++ b/samples/client/petstore/java/webclient/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/javascript-es6/.openapi-generator/VERSION b/samples/client/petstore/javascript-es6/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/javascript-es6/.openapi-generator/VERSION
+++ b/samples/client/petstore/javascript-es6/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION b/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION
+++ b/samples/client/petstore/javascript-promise-es6/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION b/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION
+++ b/samples/client/petstore/kotlin-gson/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION
+++ b/samples/client/petstore/kotlin-jackson/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION b/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION
+++ b/samples/client/petstore/kotlin-json-request-string/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION
+++ b/samples/client/petstore/kotlin-jvm-okhttp4-coroutines/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION b/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION
+++ b/samples/client/petstore/kotlin-moshi-codegen/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION b/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION
+++ b/samples/client/petstore/kotlin-multiplatform/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION b/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION
+++ b/samples/client/petstore/kotlin-nonpublic/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION b/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION
+++ b/samples/client/petstore/kotlin-nullable/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION b/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION
+++ b/samples/client/petstore/kotlin-okhttp3/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/.openapi-generator/VERSION b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/.openapi-generator/VERSION
+++ b/samples/client/petstore/kotlin-retrofit2-kotlinx_serialization/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION b/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION
+++ b/samples/client/petstore/kotlin-retrofit2-rx3/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION b/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION
+++ b/samples/client/petstore/kotlin-retrofit2/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/kotlin-string/.openapi-generator/VERSION b/samples/client/petstore/kotlin-string/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/kotlin-string/.openapi-generator/VERSION
+++ b/samples/client/petstore/kotlin-string/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION
+++ b/samples/client/petstore/kotlin-threetenbp/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION b/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION
+++ b/samples/client/petstore/kotlin-uppercase-enum/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/kotlin/.openapi-generator/VERSION b/samples/client/petstore/kotlin/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/kotlin/.openapi-generator/VERSION
+++ b/samples/client/petstore/kotlin/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/lua/.openapi-generator/VERSION b/samples/client/petstore/lua/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/lua/.openapi-generator/VERSION
+++ b/samples/client/petstore/lua/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/nim/.openapi-generator/VERSION b/samples/client/petstore/nim/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/nim/.openapi-generator/VERSION
+++ b/samples/client/petstore/nim/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/objc/core-data/.openapi-generator/VERSION b/samples/client/petstore/objc/core-data/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/objc/core-data/.openapi-generator/VERSION
+++ b/samples/client/petstore/objc/core-data/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/objc/default/.openapi-generator/VERSION b/samples/client/petstore/objc/default/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/objc/default/.openapi-generator/VERSION
+++ b/samples/client/petstore/objc/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/perl/.openapi-generator/VERSION b/samples/client/petstore/perl/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/perl/.openapi-generator/VERSION
+++ b/samples/client/petstore/perl/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION
+++ b/samples/client/petstore/php/OpenAPIClient-php/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php
index 2264e521b0f..82512bbbbfc 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/AnotherFakeApi.php
@@ -16,7 +16,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php
index e97921554ea..32aaff8894b 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/DefaultApi.php
@@ -16,7 +16,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php
index c9508eb5f7e..69ea9500cde 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeApi.php
@@ -16,7 +16,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php
index 3980c298966..2958cadbd4d 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/FakeClassnameTags123Api.php
@@ -16,7 +16,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php
index 0978717a70f..55665ac20ad 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/PetApi.php
@@ -16,7 +16,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php
index bbe64b82b59..30af05a38c9 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/StoreApi.php
@@ -16,7 +16,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php
index 93a504be879..9ca62c9a05d 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Api/UserApi.php
@@ -16,7 +16,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php
index 1ea0d8316d5..e997b629e9b 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ApiException.php
@@ -16,7 +16,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php
index 2e5212335a9..b252ae5ef72 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Configuration.php
@@ -16,7 +16,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php b/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php
index bec28193003..f6c880c66d4 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/HeaderSelector.php
@@ -16,7 +16,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php
index dd92145054b..f17a767e8c1 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/AdditionalPropertiesClass.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php
index 1b19bd4761c..5b573b955dd 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Animal.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php
index 6a2266fd1d7..98a7e1675c1 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ApiResponse.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php
index 5689f1f085d..7e5efea61b0 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfArrayOfNumberOnly.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php
index 2fd9bf4f16c..fdb9ab4d80b 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayOfNumberOnly.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php
index a1d5f03cbfd..e882d134f8d 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ArrayTest.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php
index fc75181fc93..a817d7fc271 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Capitalization.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php
index 95407a7b882..789214ceee7 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Cat.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php
index f57dda054aa..c28e30e0647 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/CatAllOf.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php
index 6f8ce10190d..fe14739688b 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Category.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php
index 9f4c356f256..5c572564fcf 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ClassModel.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php
index 5acbc0e2749..c9296011f49 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Client.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php
index f5a46e21887..69ad47d8bc7 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Dog.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php
index 055ed63c376..8749ebfb71e 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/DogAllOf.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php
index c9000c137ed..89dee9f0bc0 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumArrays.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php
index 339ab035ab6..2581be3f148 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumClass.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php
index bd4c36298b4..f332f71f424 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/EnumTest.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php
index 241523e9eff..843efaf3eae 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/File.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php
index aec24769b0b..65eaad6cfa8 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FileSchemaTestClass.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php
index 2c14b2f68ca..3458c88050b 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Foo.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php
index ed372802828..d42e123e395 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/FormatTest.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php
index c245f6f7057..d8453ce363b 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HasOnlyReadOnly.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php
index 5f8d627321b..73eb87f3717 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/HealthCheckResult.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php
index 42bd9ea3030..442ebd36dce 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/InlineResponseDefault.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php
index ddeece82a4f..06b442f7f85 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MapTest.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php
index 9f0719e50d8..c0bb79463d6 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/MixedPropertiesAndAdditionalPropertiesClass.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php
index c16987e53cc..8208b69e7bd 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Model200Response.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php
index 24e21782262..1717e0cfc83 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelInterface.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php
index 858b33409b6..72b9ef4039f 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelList.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php
index 401c62f2e4f..9dcbc31a715 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ModelReturn.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php
index 2dd99e46619..7c795f93125 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Name.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php
index 805089634fb..5a33a1d812e 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NullableClass.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php
index ae7b7d006f2..7d75b5245b2 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/NumberOnly.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php
index 0eada2b8c79..81561ed34cf 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Order.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php
index e3654acd835..9107917c48e 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterComposite.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php
index 5e3906d6910..2db56f93296 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnum.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php
index 5635c586621..53fe34e2b38 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumDefaultValue.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php
index bc1634360f3..a79e24efb97 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumInteger.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php
index 1f2683a000b..5316f01f713 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterEnumIntegerDefaultValue.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterObjectWithEnumProperty.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterObjectWithEnumProperty.php
index bb4cc1f2e43..45138c5731d 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterObjectWithEnumProperty.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/OuterObjectWithEnumProperty.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php
index 7ca522f83d9..3d302123614 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Pet.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php
index a8343418d83..9f75dae4c0a 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/ReadOnlyFirst.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php
index 79aae3dbf53..cde888641f4 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/SpecialModelName.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php
index 1e0eb56e78f..51cff7e4eb4 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/Tag.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php
index 8fb76516e43..b3f94cc8a14 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/Model/User.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php
index ec4fb294155..bb58f3bbb9f 100644
--- a/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php
+++ b/samples/client/petstore/php/OpenAPIClient-php/lib/ObjectSerializer.php
@@ -17,7 +17,7 @@
*
* The version of the OpenAPI document: 1.0.0
* Generated by: https://openapi-generator.tech
- * OpenAPI Generator version: 5.1.1
+ * OpenAPI Generator version: 5.2.0-SNAPSHOT
*/
/**
diff --git a/samples/client/petstore/powershell/.openapi-generator/VERSION b/samples/client/petstore/powershell/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/powershell/.openapi-generator/VERSION
+++ b/samples/client/petstore/powershell/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/python-asyncio/.openapi-generator/VERSION b/samples/client/petstore/python-asyncio/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/python-asyncio/.openapi-generator/VERSION
+++ b/samples/client/petstore/python-asyncio/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/python-legacy/.openapi-generator/VERSION b/samples/client/petstore/python-legacy/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/python-legacy/.openapi-generator/VERSION
+++ b/samples/client/petstore/python-legacy/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/python-tornado/.openapi-generator/VERSION b/samples/client/petstore/python-tornado/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/python-tornado/.openapi-generator/VERSION
+++ b/samples/client/petstore/python-tornado/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/python/.openapi-generator/VERSION b/samples/client/petstore/python/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/python/.openapi-generator/VERSION
+++ b/samples/client/petstore/python/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/python/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/python/docs/AdditionalPropertiesAnyType.md
index a69ff4928f4..d31d12de082 100644
--- a/samples/client/petstore/python/docs/AdditionalPropertiesAnyType.md
+++ b/samples/client/petstore/python/docs/AdditionalPropertiesAnyType.md
@@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | | [optional]
-**any string name** | **bool, date, datetime, dict, float, int, list, str** | any string name can be used but the value must be the correct type | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/AdditionalPropertiesArray.md b/samples/client/petstore/python/docs/AdditionalPropertiesArray.md
index 697494b373f..40537cbf838 100644
--- a/samples/client/petstore/python/docs/AdditionalPropertiesArray.md
+++ b/samples/client/petstore/python/docs/AdditionalPropertiesArray.md
@@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | | [optional]
-**any string name** | **[bool, date, datetime, dict, float, int, list, str]** | any string name can be used but the value must be the correct type | [optional]
+**any string name** | **[bool, date, datetime, dict, float, int, list, str, none_type]** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/AdditionalPropertiesClass.md b/samples/client/petstore/python/docs/AdditionalPropertiesClass.md
index 3646837b853..3ba7bab6f3d 100644
--- a/samples/client/petstore/python/docs/AdditionalPropertiesClass.md
+++ b/samples/client/petstore/python/docs/AdditionalPropertiesClass.md
@@ -9,12 +9,13 @@ Name | Type | Description | Notes
**map_integer** | **{str: (int,)}** | | [optional]
**map_boolean** | **{str: (bool,)}** | | [optional]
**map_array_integer** | **{str: ([int],)}** | | [optional]
-**map_array_anytype** | **{str: ([bool, date, datetime, dict, float, int, list, str],)}** | | [optional]
+**map_array_anytype** | **{str: ([bool, date, datetime, dict, float, int, list, str, none_type],)}** | | [optional]
**map_map_string** | **{str: ({str: (str,)},)}** | | [optional]
-**map_map_anytype** | **{str: ({str: (bool, date, datetime, dict, float, int, list, str,)},)}** | | [optional]
-**anytype_1** | **bool, date, datetime, dict, float, int, list, str** | | [optional]
-**anytype_2** | **bool, date, datetime, dict, float, int, list, str** | | [optional]
-**anytype_3** | **bool, date, datetime, dict, float, int, list, str** | | [optional]
+**map_map_anytype** | **{str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)},)}** | | [optional]
+**anytype_1** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional]
+**anytype_2** | **bool, date, datetime, dict, float, int, list, str, none_type** | no type is set for this | [optional]
+**anytype_3** | **bool, date, datetime, dict, float, int, list, str, none_type** | because of a bug in swagger-parser, this should have values {str: (str, int, float...)} but instead we get any type. See https://github.com/swagger-api/swagger-parser/issues/1378 | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/AdditionalPropertiesObject.md b/samples/client/petstore/python/docs/AdditionalPropertiesObject.md
index 73ba5914712..dc64a0d91c2 100644
--- a/samples/client/petstore/python/docs/AdditionalPropertiesObject.md
+++ b/samples/client/petstore/python/docs/AdditionalPropertiesObject.md
@@ -5,7 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | | [optional]
-**any string name** | **{str: (bool, date, datetime, dict, float, int, list, str,)}** | any string name can be used but the value must be the correct type | [optional]
+**any string name** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type,)}** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/Animal.md b/samples/client/petstore/python/docs/Animal.md
index 1d1c77c01ab..d36c66a5d88 100644
--- a/samples/client/petstore/python/docs/Animal.md
+++ b/samples/client/petstore/python/docs/Animal.md
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**class_name** | **str** | |
**color** | **str** | | [optional] if omitted the server will use the default value of "red"
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/AnimalFarm.md b/samples/client/petstore/python/docs/AnimalFarm.md
index fc299cf27d3..fb3b33c9c9c 100644
--- a/samples/client/petstore/python/docs/AnimalFarm.md
+++ b/samples/client/petstore/python/docs/AnimalFarm.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**value** | [**[Animal]**](Animal.md) | |
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/ApiResponse.md b/samples/client/petstore/python/docs/ApiResponse.md
index 81a7d0d8522..bedefea9a9c 100644
--- a/samples/client/petstore/python/docs/ApiResponse.md
+++ b/samples/client/petstore/python/docs/ApiResponse.md
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
**code** | **int** | | [optional]
**type** | **str** | | [optional]
**message** | **str** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/python/docs/ArrayOfArrayOfNumberOnly.md
index 6ab77963788..11cd25c98ee 100644
--- a/samples/client/petstore/python/docs/ArrayOfArrayOfNumberOnly.md
+++ b/samples/client/petstore/python/docs/ArrayOfArrayOfNumberOnly.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**array_array_number** | **[[float]]** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/ArrayOfNumberOnly.md b/samples/client/petstore/python/docs/ArrayOfNumberOnly.md
index ebc65a54ba7..1e9bb12e4e8 100644
--- a/samples/client/petstore/python/docs/ArrayOfNumberOnly.md
+++ b/samples/client/petstore/python/docs/ArrayOfNumberOnly.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**array_number** | **[float]** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/ArrayTest.md b/samples/client/petstore/python/docs/ArrayTest.md
index 4e1bda8fc3a..9eac1f8874c 100644
--- a/samples/client/petstore/python/docs/ArrayTest.md
+++ b/samples/client/petstore/python/docs/ArrayTest.md
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
**array_of_string** | **[str]** | | [optional]
**array_array_of_integer** | **[[int]]** | | [optional]
**array_array_of_model** | [**[[ReadOnlyFirst]]**](ReadOnlyFirst.md) | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/Capitalization.md b/samples/client/petstore/python/docs/Capitalization.md
index 1ddeadeb3f4..df9989f8db5 100644
--- a/samples/client/petstore/python/docs/Capitalization.md
+++ b/samples/client/petstore/python/docs/Capitalization.md
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
**capital_snake** | **str** | | [optional]
**sca_eth_flow_points** | **str** | | [optional]
**att_name** | **str** | Name of the pet | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/Cat.md b/samples/client/petstore/python/docs/Cat.md
index e9ce235cd63..082715a2842 100644
--- a/samples/client/petstore/python/docs/Cat.md
+++ b/samples/client/petstore/python/docs/Cat.md
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
**class_name** | **str** | |
**declawed** | **bool** | | [optional]
**color** | **str** | | [optional] if omitted the server will use the default value of "red"
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/CatAllOf.md b/samples/client/petstore/python/docs/CatAllOf.md
index 0ff7809a99a..6fd1390a749 100644
--- a/samples/client/petstore/python/docs/CatAllOf.md
+++ b/samples/client/petstore/python/docs/CatAllOf.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**declawed** | **bool** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/Category.md b/samples/client/petstore/python/docs/Category.md
index 940f6a45e64..7650eccafba 100644
--- a/samples/client/petstore/python/docs/Category.md
+++ b/samples/client/petstore/python/docs/Category.md
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | | defaults to "default-name"
**id** | **int** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/Child.md b/samples/client/petstore/python/docs/Child.md
index eb439244571..6bf6903fb20 100644
--- a/samples/client/petstore/python/docs/Child.md
+++ b/samples/client/petstore/python/docs/Child.md
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
**radio_waves** | **bool** | | [optional]
**tele_vision** | **bool** | | [optional]
**inter_net** | **bool** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/ChildAllOf.md b/samples/client/petstore/python/docs/ChildAllOf.md
index f9ae99c7c15..bae8ced9006 100644
--- a/samples/client/petstore/python/docs/ChildAllOf.md
+++ b/samples/client/petstore/python/docs/ChildAllOf.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**inter_net** | **bool** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/ChildCat.md b/samples/client/petstore/python/docs/ChildCat.md
index 9e3a0fb4b51..513903ac579 100644
--- a/samples/client/petstore/python/docs/ChildCat.md
+++ b/samples/client/petstore/python/docs/ChildCat.md
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**pet_type** | **str** | |
**name** | **str** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/ChildCatAllOf.md b/samples/client/petstore/python/docs/ChildCatAllOf.md
index c5883b9a87c..c5b2f58f28c 100644
--- a/samples/client/petstore/python/docs/ChildCatAllOf.md
+++ b/samples/client/petstore/python/docs/ChildCatAllOf.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/ChildDog.md b/samples/client/petstore/python/docs/ChildDog.md
index 9a6e5b37266..e5b410ce1e7 100644
--- a/samples/client/petstore/python/docs/ChildDog.md
+++ b/samples/client/petstore/python/docs/ChildDog.md
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**pet_type** | **str** | |
**bark** | **str** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/ChildDogAllOf.md b/samples/client/petstore/python/docs/ChildDogAllOf.md
index 673050667cb..45928c57ef2 100644
--- a/samples/client/petstore/python/docs/ChildDogAllOf.md
+++ b/samples/client/petstore/python/docs/ChildDogAllOf.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bark** | **str** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/ChildLizard.md b/samples/client/petstore/python/docs/ChildLizard.md
index e881ee0a1d1..d2e22826e77 100644
--- a/samples/client/petstore/python/docs/ChildLizard.md
+++ b/samples/client/petstore/python/docs/ChildLizard.md
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**pet_type** | **str** | |
**loves_rocks** | **bool** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/ChildLizardAllOf.md b/samples/client/petstore/python/docs/ChildLizardAllOf.md
index 6e2b70c0150..6effcfd9313 100644
--- a/samples/client/petstore/python/docs/ChildLizardAllOf.md
+++ b/samples/client/petstore/python/docs/ChildLizardAllOf.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**loves_rocks** | **bool** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/ClassModel.md b/samples/client/petstore/python/docs/ClassModel.md
index 48ed7cbf2ff..6605a16d74a 100644
--- a/samples/client/petstore/python/docs/ClassModel.md
+++ b/samples/client/petstore/python/docs/ClassModel.md
@@ -6,6 +6,7 @@ Model for testing model with \"_class\" property
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**_class** | **str** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/Client.md b/samples/client/petstore/python/docs/Client.md
index c3986008d6c..1b293140f34 100644
--- a/samples/client/petstore/python/docs/Client.md
+++ b/samples/client/petstore/python/docs/Client.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**client** | **str** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/Dog.md b/samples/client/petstore/python/docs/Dog.md
index 7065c4c983d..51b5b32bdac 100644
--- a/samples/client/petstore/python/docs/Dog.md
+++ b/samples/client/petstore/python/docs/Dog.md
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
**class_name** | **str** | |
**breed** | **str** | | [optional]
**color** | **str** | | [optional] if omitted the server will use the default value of "red"
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/DogAllOf.md b/samples/client/petstore/python/docs/DogAllOf.md
index 6382bbd8067..2907a9fd5c4 100644
--- a/samples/client/petstore/python/docs/DogAllOf.md
+++ b/samples/client/petstore/python/docs/DogAllOf.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**breed** | **str** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/EnumArrays.md b/samples/client/petstore/python/docs/EnumArrays.md
index 9be5c645a80..ad4e9d2fcb7 100644
--- a/samples/client/petstore/python/docs/EnumArrays.md
+++ b/samples/client/petstore/python/docs/EnumArrays.md
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**just_symbol** | **str** | | [optional]
**array_enum** | **[str]** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/EnumClass.md b/samples/client/petstore/python/docs/EnumClass.md
index a1f9aae5819..39bb0e1644c 100644
--- a/samples/client/petstore/python/docs/EnumClass.md
+++ b/samples/client/petstore/python/docs/EnumClass.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**value** | **str** | | defaults to "-efg", must be one of ["_abc", "-efg", "(xyz)", ]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/EnumTest.md b/samples/client/petstore/python/docs/EnumTest.md
index eb884224139..052596bfd04 100644
--- a/samples/client/petstore/python/docs/EnumTest.md
+++ b/samples/client/petstore/python/docs/EnumTest.md
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
**enum_integer** | **int** | | [optional]
**enum_number** | **float** | | [optional]
**string_enum** | [**StringEnum**](StringEnum.md) | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/File.md b/samples/client/petstore/python/docs/File.md
index 63b1d1a6518..f84547d1933 100644
--- a/samples/client/petstore/python/docs/File.md
+++ b/samples/client/petstore/python/docs/File.md
@@ -6,6 +6,7 @@ Must be named `File` for test.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**source_uri** | **str** | Test capitalization | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/FileSchemaTestClass.md b/samples/client/petstore/python/docs/FileSchemaTestClass.md
index caf2440821d..4572aa0905b 100644
--- a/samples/client/petstore/python/docs/FileSchemaTestClass.md
+++ b/samples/client/petstore/python/docs/FileSchemaTestClass.md
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**file** | [**File**](File.md) | | [optional]
**files** | [**[File]**](File.md) | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/FormatTest.md b/samples/client/petstore/python/docs/FormatTest.md
index aef09bfcc83..dbb4c3e6683 100644
--- a/samples/client/petstore/python/docs/FormatTest.md
+++ b/samples/client/petstore/python/docs/FormatTest.md
@@ -17,6 +17,7 @@ Name | Type | Description | Notes
**binary** | **file_type** | | [optional]
**date_time** | **datetime** | | [optional]
**uuid** | **str** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/Grandparent.md b/samples/client/petstore/python/docs/Grandparent.md
index b6d80a71945..af143938ab5 100644
--- a/samples/client/petstore/python/docs/Grandparent.md
+++ b/samples/client/petstore/python/docs/Grandparent.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**radio_waves** | **bool** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/GrandparentAnimal.md b/samples/client/petstore/python/docs/GrandparentAnimal.md
index 15db0708bb1..a1c34037810 100644
--- a/samples/client/petstore/python/docs/GrandparentAnimal.md
+++ b/samples/client/petstore/python/docs/GrandparentAnimal.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**pet_type** | **str** | |
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/HasOnlyReadOnly.md b/samples/client/petstore/python/docs/HasOnlyReadOnly.md
index 0e1334519a8..88bc03d4ff5 100644
--- a/samples/client/petstore/python/docs/HasOnlyReadOnly.md
+++ b/samples/client/petstore/python/docs/HasOnlyReadOnly.md
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bar** | **str** | | [optional] [readonly]
**foo** | **str** | | [optional] [readonly]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/List.md b/samples/client/petstore/python/docs/List.md
index 4b60956971a..13f2694de35 100644
--- a/samples/client/petstore/python/docs/List.md
+++ b/samples/client/petstore/python/docs/List.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**_123_list** | **str** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/MapTest.md b/samples/client/petstore/python/docs/MapTest.md
index 15228ee1f28..e6584f3811e 100644
--- a/samples/client/petstore/python/docs/MapTest.md
+++ b/samples/client/petstore/python/docs/MapTest.md
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
**map_of_enum_string** | **{str: (str,)}** | | [optional]
**direct_map** | **{str: (bool,)}** | | [optional]
**indirect_map** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/python/docs/MixedPropertiesAndAdditionalPropertiesClass.md
index f489944a20a..f32c4e04134 100644
--- a/samples/client/petstore/python/docs/MixedPropertiesAndAdditionalPropertiesClass.md
+++ b/samples/client/petstore/python/docs/MixedPropertiesAndAdditionalPropertiesClass.md
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
**uuid** | **str** | | [optional]
**date_time** | **datetime** | | [optional]
**map** | [**{str: (Animal,)}**](Animal.md) | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/Model200Response.md b/samples/client/petstore/python/docs/Model200Response.md
index c958bd4b33f..f7ef7d79acf 100644
--- a/samples/client/petstore/python/docs/Model200Response.md
+++ b/samples/client/petstore/python/docs/Model200Response.md
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **int** | | [optional]
**_class** | **str** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/ModelReturn.md b/samples/client/petstore/python/docs/ModelReturn.md
index 043e9d466fa..75fb39a8869 100644
--- a/samples/client/petstore/python/docs/ModelReturn.md
+++ b/samples/client/petstore/python/docs/ModelReturn.md
@@ -6,6 +6,7 @@ Model for testing reserved words
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**_return** | **int** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/Name.md b/samples/client/petstore/python/docs/Name.md
index 3be719cdbfb..6e58fae6d0b 100644
--- a/samples/client/petstore/python/docs/Name.md
+++ b/samples/client/petstore/python/docs/Name.md
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
**snake_case** | **int** | | [optional] [readonly]
**_property** | **str** | | [optional]
**_123_number** | **int** | | [optional] [readonly]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/NumberOnly.md b/samples/client/petstore/python/docs/NumberOnly.md
index 37195c5d899..172e86163a4 100644
--- a/samples/client/petstore/python/docs/NumberOnly.md
+++ b/samples/client/petstore/python/docs/NumberOnly.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**just_number** | **float** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/NumberWithValidations.md b/samples/client/petstore/python/docs/NumberWithValidations.md
index 119e0f67823..cc6f77c152c 100644
--- a/samples/client/petstore/python/docs/NumberWithValidations.md
+++ b/samples/client/petstore/python/docs/NumberWithValidations.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**value** | **float** | |
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/ObjectModelWithRefProps.md b/samples/client/petstore/python/docs/ObjectModelWithRefProps.md
index 5ff4e52033d..a0d15f4bbd1 100644
--- a/samples/client/petstore/python/docs/ObjectModelWithRefProps.md
+++ b/samples/client/petstore/python/docs/ObjectModelWithRefProps.md
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
**my_number** | [**NumberWithValidations**](NumberWithValidations.md) | | [optional]
**my_string** | **str** | | [optional]
**my_boolean** | **bool** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/Order.md b/samples/client/petstore/python/docs/Order.md
index d29e1a381de..0423082932d 100644
--- a/samples/client/petstore/python/docs/Order.md
+++ b/samples/client/petstore/python/docs/Order.md
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
**ship_date** | **datetime** | | [optional]
**status** | **str** | Order Status | [optional]
**complete** | **bool** | | [optional] if omitted the server will use the default value of False
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/Parent.md b/samples/client/petstore/python/docs/Parent.md
index 9d3f02d68b3..9db770844ee 100644
--- a/samples/client/petstore/python/docs/Parent.md
+++ b/samples/client/petstore/python/docs/Parent.md
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**radio_waves** | **bool** | | [optional]
**tele_vision** | **bool** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/ParentAllOf.md b/samples/client/petstore/python/docs/ParentAllOf.md
index 569a5e4af14..84ac2c066ee 100644
--- a/samples/client/petstore/python/docs/ParentAllOf.md
+++ b/samples/client/petstore/python/docs/ParentAllOf.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**tele_vision** | **bool** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/ParentPet.md b/samples/client/petstore/python/docs/ParentPet.md
index 09e409c8fcf..111ada88b3d 100644
--- a/samples/client/petstore/python/docs/ParentPet.md
+++ b/samples/client/petstore/python/docs/ParentPet.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**pet_type** | **str** | |
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/Pet.md b/samples/client/petstore/python/docs/Pet.md
index 6e78495272e..e0b12978456 100644
--- a/samples/client/petstore/python/docs/Pet.md
+++ b/samples/client/petstore/python/docs/Pet.md
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
**category** | [**Category**](Category.md) | | [optional]
**tags** | [**[Tag]**](Tag.md) | | [optional]
**status** | **str** | pet status in the store | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/Player.md b/samples/client/petstore/python/docs/Player.md
index 2014198aa1b..97441ae316b 100644
--- a/samples/client/petstore/python/docs/Player.md
+++ b/samples/client/petstore/python/docs/Player.md
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | |
**enemy_player** | [**Player**](Player.md) | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/ReadOnlyFirst.md b/samples/client/petstore/python/docs/ReadOnlyFirst.md
index 53b4c61d844..ba39ec3d04e 100644
--- a/samples/client/petstore/python/docs/ReadOnlyFirst.md
+++ b/samples/client/petstore/python/docs/ReadOnlyFirst.md
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bar** | **str** | | [optional] [readonly]
**baz** | **str** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/SpecialModelName.md b/samples/client/petstore/python/docs/SpecialModelName.md
index 268e1134192..4a1c86ff4de 100644
--- a/samples/client/petstore/python/docs/SpecialModelName.md
+++ b/samples/client/petstore/python/docs/SpecialModelName.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**special_property_name** | **int** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/StringEnum.md b/samples/client/petstore/python/docs/StringEnum.md
index bb195ec0e45..1ac6df2fb79 100644
--- a/samples/client/petstore/python/docs/StringEnum.md
+++ b/samples/client/petstore/python/docs/StringEnum.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**value** | **str** | | must be one of ["placed", "approved", "delivered", ]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/Tag.md b/samples/client/petstore/python/docs/Tag.md
index b9fe1e0944c..bfe06d1c5bf 100644
--- a/samples/client/petstore/python/docs/Tag.md
+++ b/samples/client/petstore/python/docs/Tag.md
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
**id** | **int** | | [optional]
**name** | **str** | | [optional]
**full_name** | **str** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/TypeHolderDefault.md b/samples/client/petstore/python/docs/TypeHolderDefault.md
index 904915aec01..f15c61cc461 100644
--- a/samples/client/petstore/python/docs/TypeHolderDefault.md
+++ b/samples/client/petstore/python/docs/TypeHolderDefault.md
@@ -12,6 +12,7 @@ Name | Type | Description | Notes
**bool_item** | **bool** | | defaults to True
**date_item** | **date** | | [optional]
**datetime_item** | **datetime** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/TypeHolderExample.md b/samples/client/petstore/python/docs/TypeHolderExample.md
index d2954c64dce..d707ca3af20 100644
--- a/samples/client/petstore/python/docs/TypeHolderExample.md
+++ b/samples/client/petstore/python/docs/TypeHolderExample.md
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
**string_item** | **str** | | defaults to "what"
**number_item** | **float** | | defaults to 1.234
**integer_item** | **int** | | defaults to -2
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/User.md b/samples/client/petstore/python/docs/User.md
index b0079f591b6..8e677b63cca 100644
--- a/samples/client/petstore/python/docs/User.md
+++ b/samples/client/petstore/python/docs/User.md
@@ -12,6 +12,7 @@ Name | Type | Description | Notes
**password** | **str** | | [optional]
**phone** | **str** | | [optional]
**user_status** | **int** | User Status | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/docs/XmlItem.md b/samples/client/petstore/python/docs/XmlItem.md
index ea3d7f92804..9852234a736 100644
--- a/samples/client/petstore/python/docs/XmlItem.md
+++ b/samples/client/petstore/python/docs/XmlItem.md
@@ -33,6 +33,7 @@ Name | Type | Description | Notes
**prefix_ns_boolean** | **bool** | | [optional]
**prefix_ns_array** | **[int]** | | [optional]
**prefix_ns_wrapped_array** | **[int]** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/client/petstore/python/petstore_api/model/additional_properties_any_type.py b/samples/client/petstore/python/petstore_api/model/additional_properties_any_type.py
index 4531d8f2d86..7239795cf4a 100644
--- a/samples/client/petstore/python/petstore_api/model/additional_properties_any_type.py
+++ b/samples/client/petstore/python/petstore_api/model/additional_properties_any_type.py
@@ -63,7 +63,7 @@ class AdditionalPropertiesAnyType(ModelNormal):
This must be a method because a model may have properties that are
of type self, this must run after the class is loaded
"""
- return (bool, date, datetime, dict, float, int, list, str,) # noqa: E501
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/additional_properties_array.py b/samples/client/petstore/python/petstore_api/model/additional_properties_array.py
index 4a35500c63f..7d9403758a0 100644
--- a/samples/client/petstore/python/petstore_api/model/additional_properties_array.py
+++ b/samples/client/petstore/python/petstore_api/model/additional_properties_array.py
@@ -63,7 +63,7 @@ class AdditionalPropertiesArray(ModelNormal):
This must be a method because a model may have properties that are
of type self, this must run after the class is loaded
"""
- return ([bool, date, datetime, dict, float, int, list, str],) # noqa: E501
+ return ([bool, date, datetime, dict, float, int, list, str, none_type],) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/additional_properties_class.py b/samples/client/petstore/python/petstore_api/model/additional_properties_class.py
index 743f3be54d4..39719e00dcf 100644
--- a/samples/client/petstore/python/petstore_api/model/additional_properties_class.py
+++ b/samples/client/petstore/python/petstore_api/model/additional_properties_class.py
@@ -57,7 +57,13 @@ class AdditionalPropertiesClass(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
@@ -77,12 +83,12 @@ class AdditionalPropertiesClass(ModelNormal):
'map_integer': ({str: (int,)},), # noqa: E501
'map_boolean': ({str: (bool,)},), # noqa: E501
'map_array_integer': ({str: ([int],)},), # noqa: E501
- 'map_array_anytype': ({str: ([bool, date, datetime, dict, float, int, list, str],)},), # noqa: E501
+ 'map_array_anytype': ({str: ([bool, date, datetime, dict, float, int, list, str, none_type],)},), # noqa: E501
'map_map_string': ({str: ({str: (str,)},)},), # noqa: E501
- 'map_map_anytype': ({str: ({str: (bool, date, datetime, dict, float, int, list, str,)},)},), # noqa: E501
- 'anytype_1': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501
- 'anytype_2': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501
- 'anytype_3': (bool, date, datetime, dict, float, int, list, str,), # noqa: E501
+ 'map_map_anytype': ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)},)},), # noqa: E501
+ 'anytype_1': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
+ 'anytype_2': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
+ 'anytype_3': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
}
@cached_property
@@ -155,12 +161,12 @@ class AdditionalPropertiesClass(ModelNormal):
map_integer ({str: (int,)}): [optional] # noqa: E501
map_boolean ({str: (bool,)}): [optional] # noqa: E501
map_array_integer ({str: ([int],)}): [optional] # noqa: E501
- map_array_anytype ({str: ([bool, date, datetime, dict, float, int, list, str],)}): [optional] # noqa: E501
+ map_array_anytype ({str: ([bool, date, datetime, dict, float, int, list, str, none_type],)}): [optional] # noqa: E501
map_map_string ({str: ({str: (str,)},)}): [optional] # noqa: E501
- map_map_anytype ({str: ({str: (bool, date, datetime, dict, float, int, list, str,)},)}): [optional] # noqa: E501
- anytype_1 (bool, date, datetime, dict, float, int, list, str): [optional] # noqa: E501
- anytype_2 (bool, date, datetime, dict, float, int, list, str): [optional] # noqa: E501
- anytype_3 (bool, date, datetime, dict, float, int, list, str): [optional] # noqa: E501
+ map_map_anytype ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)},)}): [optional] # noqa: E501
+ anytype_1 (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501
+ anytype_2 (bool, date, datetime, dict, float, int, list, str, none_type): no type is set for this. [optional] # noqa: E501
+ anytype_3 (bool, date, datetime, dict, float, int, list, str, none_type): because of a bug in swagger-parser, this should have values {str: (str, int, float...)} but instead we get any type. See https://github.com/swagger-api/swagger-parser/issues/1378. [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
diff --git a/samples/client/petstore/python/petstore_api/model/additional_properties_object.py b/samples/client/petstore/python/petstore_api/model/additional_properties_object.py
index 40e80e16044..000653f13a7 100644
--- a/samples/client/petstore/python/petstore_api/model/additional_properties_object.py
+++ b/samples/client/petstore/python/petstore_api/model/additional_properties_object.py
@@ -63,7 +63,7 @@ class AdditionalPropertiesObject(ModelNormal):
This must be a method because a model may have properties that are
of type self, this must run after the class is loaded
"""
- return ({str: (bool, date, datetime, dict, float, int, list, str,)},) # noqa: E501
+ return ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)},) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/animal.py b/samples/client/petstore/python/petstore_api/model/animal.py
index a3d48b6ea97..c53b1e1ad28 100644
--- a/samples/client/petstore/python/petstore_api/model/animal.py
+++ b/samples/client/petstore/python/petstore_api/model/animal.py
@@ -63,7 +63,14 @@ class Animal(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/animal_farm.py b/samples/client/petstore/python/petstore_api/model/animal_farm.py
index 838b18a1297..fb58224ebd4 100644
--- a/samples/client/petstore/python/petstore_api/model/animal_farm.py
+++ b/samples/client/petstore/python/petstore_api/model/animal_farm.py
@@ -57,7 +57,14 @@ class AnimalFarm(ModelSimple):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/api_response.py b/samples/client/petstore/python/petstore_api/model/api_response.py
index 01e2175b800..53adb5aba12 100644
--- a/samples/client/petstore/python/petstore_api/model/api_response.py
+++ b/samples/client/petstore/python/petstore_api/model/api_response.py
@@ -57,7 +57,13 @@ class ApiResponse(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/array_of_array_of_number_only.py b/samples/client/petstore/python/petstore_api/model/array_of_array_of_number_only.py
index 008b74dd42a..8b6a2c42d0e 100644
--- a/samples/client/petstore/python/petstore_api/model/array_of_array_of_number_only.py
+++ b/samples/client/petstore/python/petstore_api/model/array_of_array_of_number_only.py
@@ -57,7 +57,13 @@ class ArrayOfArrayOfNumberOnly(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/array_of_number_only.py b/samples/client/petstore/python/petstore_api/model/array_of_number_only.py
index f2e080bc258..7b754dc283e 100644
--- a/samples/client/petstore/python/petstore_api/model/array_of_number_only.py
+++ b/samples/client/petstore/python/petstore_api/model/array_of_number_only.py
@@ -57,7 +57,13 @@ class ArrayOfNumberOnly(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/array_test.py b/samples/client/petstore/python/petstore_api/model/array_test.py
index ac42b07b93c..9691a1e6037 100644
--- a/samples/client/petstore/python/petstore_api/model/array_test.py
+++ b/samples/client/petstore/python/petstore_api/model/array_test.py
@@ -61,7 +61,14 @@ class ArrayTest(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/capitalization.py b/samples/client/petstore/python/petstore_api/model/capitalization.py
index 710c17e51a5..6d939535cee 100644
--- a/samples/client/petstore/python/petstore_api/model/capitalization.py
+++ b/samples/client/petstore/python/petstore_api/model/capitalization.py
@@ -57,7 +57,13 @@ class Capitalization(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/cat.py b/samples/client/petstore/python/petstore_api/model/cat.py
index 8b5c46413b9..eeea79359fc 100644
--- a/samples/client/petstore/python/petstore_api/model/cat.py
+++ b/samples/client/petstore/python/petstore_api/model/cat.py
@@ -63,7 +63,14 @@ class Cat(ModelComposed):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
@@ -111,13 +118,11 @@ class Cat(ModelComposed):
])
@convert_js_args_to_python_args
- def __init__(self, class_name, *args, **kwargs): # noqa: E501
+ def __init__(self, *args, **kwargs): # noqa: E501
"""Cat - a model defined in OpenAPI
- Args:
- class_name (str):
-
Keyword Args:
+ class_name (str):
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
@@ -182,26 +187,18 @@ class Cat(ModelComposed):
'_configuration': _configuration,
'_visited_composed_classes': self._visited_composed_classes,
}
- required_args = {
- 'class_name': class_name,
- }
- model_args = {}
- model_args.update(required_args)
- model_args.update(kwargs)
composed_info = validate_get_composed_info(
- constant_args, model_args, self)
+ constant_args, kwargs, self)
self._composed_instances = composed_info[0]
self._var_name_to_model_instances = composed_info[1]
self._additional_properties_model_instances = composed_info[2]
- unused_args = composed_info[3]
+ discarded_args = composed_info[3]
- for var_name, var_value in required_args.items():
- setattr(self, var_name, var_value)
for var_name, var_value in kwargs.items():
- if var_name in unused_args and \
+ if var_name in discarded_args and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
- not self._additional_properties_model_instances:
+ self._additional_properties_model_instances:
# discard variable.
continue
setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python/petstore_api/model/cat_all_of.py b/samples/client/petstore/python/petstore_api/model/cat_all_of.py
index 50b046510df..7efba680b4d 100644
--- a/samples/client/petstore/python/petstore_api/model/cat_all_of.py
+++ b/samples/client/petstore/python/petstore_api/model/cat_all_of.py
@@ -57,7 +57,13 @@ class CatAllOf(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/category.py b/samples/client/petstore/python/petstore_api/model/category.py
index ed167471d35..4936b4f0e44 100644
--- a/samples/client/petstore/python/petstore_api/model/category.py
+++ b/samples/client/petstore/python/petstore_api/model/category.py
@@ -57,7 +57,13 @@ class Category(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/child.py b/samples/client/petstore/python/petstore_api/model/child.py
index c8f0a70a193..8fad3bf107b 100644
--- a/samples/client/petstore/python/petstore_api/model/child.py
+++ b/samples/client/petstore/python/petstore_api/model/child.py
@@ -63,7 +63,14 @@ class Child(ModelComposed):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
@@ -177,25 +184,18 @@ class Child(ModelComposed):
'_configuration': _configuration,
'_visited_composed_classes': self._visited_composed_classes,
}
- required_args = {
- }
- model_args = {}
- model_args.update(required_args)
- model_args.update(kwargs)
composed_info = validate_get_composed_info(
- constant_args, model_args, self)
+ constant_args, kwargs, self)
self._composed_instances = composed_info[0]
self._var_name_to_model_instances = composed_info[1]
self._additional_properties_model_instances = composed_info[2]
- unused_args = composed_info[3]
+ discarded_args = composed_info[3]
- for var_name, var_value in required_args.items():
- setattr(self, var_name, var_value)
for var_name, var_value in kwargs.items():
- if var_name in unused_args and \
+ if var_name in discarded_args and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
- not self._additional_properties_model_instances:
+ self._additional_properties_model_instances:
# discard variable.
continue
setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python/petstore_api/model/child_all_of.py b/samples/client/petstore/python/petstore_api/model/child_all_of.py
index 2339e520bd6..9db852ec725 100644
--- a/samples/client/petstore/python/petstore_api/model/child_all_of.py
+++ b/samples/client/petstore/python/petstore_api/model/child_all_of.py
@@ -57,7 +57,13 @@ class ChildAllOf(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/child_cat.py b/samples/client/petstore/python/petstore_api/model/child_cat.py
index a7d52b48e8a..d054cb7a97a 100644
--- a/samples/client/petstore/python/petstore_api/model/child_cat.py
+++ b/samples/client/petstore/python/petstore_api/model/child_cat.py
@@ -63,7 +63,14 @@ class ChildCat(ModelComposed):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
@@ -109,13 +116,11 @@ class ChildCat(ModelComposed):
])
@convert_js_args_to_python_args
- def __init__(self, pet_type, *args, **kwargs): # noqa: E501
+ def __init__(self, *args, **kwargs): # noqa: E501
"""ChildCat - a model defined in OpenAPI
- Args:
- pet_type (str):
-
Keyword Args:
+ pet_type (str):
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
@@ -179,26 +184,18 @@ class ChildCat(ModelComposed):
'_configuration': _configuration,
'_visited_composed_classes': self._visited_composed_classes,
}
- required_args = {
- 'pet_type': pet_type,
- }
- model_args = {}
- model_args.update(required_args)
- model_args.update(kwargs)
composed_info = validate_get_composed_info(
- constant_args, model_args, self)
+ constant_args, kwargs, self)
self._composed_instances = composed_info[0]
self._var_name_to_model_instances = composed_info[1]
self._additional_properties_model_instances = composed_info[2]
- unused_args = composed_info[3]
+ discarded_args = composed_info[3]
- for var_name, var_value in required_args.items():
- setattr(self, var_name, var_value)
for var_name, var_value in kwargs.items():
- if var_name in unused_args and \
+ if var_name in discarded_args and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
- not self._additional_properties_model_instances:
+ self._additional_properties_model_instances:
# discard variable.
continue
setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python/petstore_api/model/child_cat_all_of.py b/samples/client/petstore/python/petstore_api/model/child_cat_all_of.py
index f0f1a1ae6bd..3d732d085fb 100644
--- a/samples/client/petstore/python/petstore_api/model/child_cat_all_of.py
+++ b/samples/client/petstore/python/petstore_api/model/child_cat_all_of.py
@@ -57,7 +57,13 @@ class ChildCatAllOf(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/child_dog.py b/samples/client/petstore/python/petstore_api/model/child_dog.py
index 2bc0882ac2a..6244359fea2 100644
--- a/samples/client/petstore/python/petstore_api/model/child_dog.py
+++ b/samples/client/petstore/python/petstore_api/model/child_dog.py
@@ -63,7 +63,14 @@ class ChildDog(ModelComposed):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
@@ -109,13 +116,11 @@ class ChildDog(ModelComposed):
])
@convert_js_args_to_python_args
- def __init__(self, pet_type, *args, **kwargs): # noqa: E501
+ def __init__(self, *args, **kwargs): # noqa: E501
"""ChildDog - a model defined in OpenAPI
- Args:
- pet_type (str):
-
Keyword Args:
+ pet_type (str):
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
@@ -179,26 +184,18 @@ class ChildDog(ModelComposed):
'_configuration': _configuration,
'_visited_composed_classes': self._visited_composed_classes,
}
- required_args = {
- 'pet_type': pet_type,
- }
- model_args = {}
- model_args.update(required_args)
- model_args.update(kwargs)
composed_info = validate_get_composed_info(
- constant_args, model_args, self)
+ constant_args, kwargs, self)
self._composed_instances = composed_info[0]
self._var_name_to_model_instances = composed_info[1]
self._additional_properties_model_instances = composed_info[2]
- unused_args = composed_info[3]
+ discarded_args = composed_info[3]
- for var_name, var_value in required_args.items():
- setattr(self, var_name, var_value)
for var_name, var_value in kwargs.items():
- if var_name in unused_args and \
+ if var_name in discarded_args and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
- not self._additional_properties_model_instances:
+ self._additional_properties_model_instances:
# discard variable.
continue
setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python/petstore_api/model/child_dog_all_of.py b/samples/client/petstore/python/petstore_api/model/child_dog_all_of.py
index d460b68b3d3..d3a0d89c4da 100644
--- a/samples/client/petstore/python/petstore_api/model/child_dog_all_of.py
+++ b/samples/client/petstore/python/petstore_api/model/child_dog_all_of.py
@@ -57,7 +57,13 @@ class ChildDogAllOf(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/child_lizard.py b/samples/client/petstore/python/petstore_api/model/child_lizard.py
index 6142b9c751f..b56925a0c92 100644
--- a/samples/client/petstore/python/petstore_api/model/child_lizard.py
+++ b/samples/client/petstore/python/petstore_api/model/child_lizard.py
@@ -63,7 +63,14 @@ class ChildLizard(ModelComposed):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
@@ -109,13 +116,11 @@ class ChildLizard(ModelComposed):
])
@convert_js_args_to_python_args
- def __init__(self, pet_type, *args, **kwargs): # noqa: E501
+ def __init__(self, *args, **kwargs): # noqa: E501
"""ChildLizard - a model defined in OpenAPI
- Args:
- pet_type (str):
-
Keyword Args:
+ pet_type (str):
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
@@ -179,26 +184,18 @@ class ChildLizard(ModelComposed):
'_configuration': _configuration,
'_visited_composed_classes': self._visited_composed_classes,
}
- required_args = {
- 'pet_type': pet_type,
- }
- model_args = {}
- model_args.update(required_args)
- model_args.update(kwargs)
composed_info = validate_get_composed_info(
- constant_args, model_args, self)
+ constant_args, kwargs, self)
self._composed_instances = composed_info[0]
self._var_name_to_model_instances = composed_info[1]
self._additional_properties_model_instances = composed_info[2]
- unused_args = composed_info[3]
+ discarded_args = composed_info[3]
- for var_name, var_value in required_args.items():
- setattr(self, var_name, var_value)
for var_name, var_value in kwargs.items():
- if var_name in unused_args and \
+ if var_name in discarded_args and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
- not self._additional_properties_model_instances:
+ self._additional_properties_model_instances:
# discard variable.
continue
setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python/petstore_api/model/child_lizard_all_of.py b/samples/client/petstore/python/petstore_api/model/child_lizard_all_of.py
index 669b9338d79..1c8f29548b5 100644
--- a/samples/client/petstore/python/petstore_api/model/child_lizard_all_of.py
+++ b/samples/client/petstore/python/petstore_api/model/child_lizard_all_of.py
@@ -57,7 +57,13 @@ class ChildLizardAllOf(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/class_model.py b/samples/client/petstore/python/petstore_api/model/class_model.py
index 18c16f89f90..9e65a937365 100644
--- a/samples/client/petstore/python/petstore_api/model/class_model.py
+++ b/samples/client/petstore/python/petstore_api/model/class_model.py
@@ -57,7 +57,13 @@ class ClassModel(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/client.py b/samples/client/petstore/python/petstore_api/model/client.py
index da615c54773..6218de1e19e 100644
--- a/samples/client/petstore/python/petstore_api/model/client.py
+++ b/samples/client/petstore/python/petstore_api/model/client.py
@@ -57,7 +57,13 @@ class Client(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/dog.py b/samples/client/petstore/python/petstore_api/model/dog.py
index e9c201c983b..3452f0d040a 100644
--- a/samples/client/petstore/python/petstore_api/model/dog.py
+++ b/samples/client/petstore/python/petstore_api/model/dog.py
@@ -63,7 +63,14 @@ class Dog(ModelComposed):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
@@ -111,13 +118,11 @@ class Dog(ModelComposed):
])
@convert_js_args_to_python_args
- def __init__(self, class_name, *args, **kwargs): # noqa: E501
+ def __init__(self, *args, **kwargs): # noqa: E501
"""Dog - a model defined in OpenAPI
- Args:
- class_name (str):
-
Keyword Args:
+ class_name (str):
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
@@ -182,26 +187,18 @@ class Dog(ModelComposed):
'_configuration': _configuration,
'_visited_composed_classes': self._visited_composed_classes,
}
- required_args = {
- 'class_name': class_name,
- }
- model_args = {}
- model_args.update(required_args)
- model_args.update(kwargs)
composed_info = validate_get_composed_info(
- constant_args, model_args, self)
+ constant_args, kwargs, self)
self._composed_instances = composed_info[0]
self._var_name_to_model_instances = composed_info[1]
self._additional_properties_model_instances = composed_info[2]
- unused_args = composed_info[3]
+ discarded_args = composed_info[3]
- for var_name, var_value in required_args.items():
- setattr(self, var_name, var_value)
for var_name, var_value in kwargs.items():
- if var_name in unused_args and \
+ if var_name in discarded_args and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
- not self._additional_properties_model_instances:
+ self._additional_properties_model_instances:
# discard variable.
continue
setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python/petstore_api/model/dog_all_of.py b/samples/client/petstore/python/petstore_api/model/dog_all_of.py
index b7b2e7db66d..962903d3a38 100644
--- a/samples/client/petstore/python/petstore_api/model/dog_all_of.py
+++ b/samples/client/petstore/python/petstore_api/model/dog_all_of.py
@@ -57,7 +57,13 @@ class DogAllOf(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/enum_arrays.py b/samples/client/petstore/python/petstore_api/model/enum_arrays.py
index 43ebac57de3..db56838d7e4 100644
--- a/samples/client/petstore/python/petstore_api/model/enum_arrays.py
+++ b/samples/client/petstore/python/petstore_api/model/enum_arrays.py
@@ -65,7 +65,13 @@ class EnumArrays(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/enum_class.py b/samples/client/petstore/python/petstore_api/model/enum_class.py
index 14188ca31d2..63be703c38e 100644
--- a/samples/client/petstore/python/petstore_api/model/enum_class.py
+++ b/samples/client/petstore/python/petstore_api/model/enum_class.py
@@ -58,7 +58,13 @@ class EnumClass(ModelSimple):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/enum_test.py b/samples/client/petstore/python/petstore_api/model/enum_test.py
index 79ba0f6a747..ee14c70b46f 100644
--- a/samples/client/petstore/python/petstore_api/model/enum_test.py
+++ b/samples/client/petstore/python/petstore_api/model/enum_test.py
@@ -79,7 +79,14 @@ class EnumTest(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/file.py b/samples/client/petstore/python/petstore_api/model/file.py
index a38cccacc6a..137d0026324 100644
--- a/samples/client/petstore/python/petstore_api/model/file.py
+++ b/samples/client/petstore/python/petstore_api/model/file.py
@@ -57,7 +57,13 @@ class File(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/file_schema_test_class.py b/samples/client/petstore/python/petstore_api/model/file_schema_test_class.py
index b8c519ed9c7..3722125ae48 100644
--- a/samples/client/petstore/python/petstore_api/model/file_schema_test_class.py
+++ b/samples/client/petstore/python/petstore_api/model/file_schema_test_class.py
@@ -61,7 +61,14 @@ class FileSchemaTestClass(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/format_test.py b/samples/client/petstore/python/petstore_api/model/format_test.py
index 494ce2646da..7b415af7ad2 100644
--- a/samples/client/petstore/python/petstore_api/model/format_test.py
+++ b/samples/client/petstore/python/petstore_api/model/format_test.py
@@ -92,7 +92,13 @@ class FormatTest(ModelNormal):
},
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/grandparent.py b/samples/client/petstore/python/petstore_api/model/grandparent.py
index a52744cc3e2..728b1e1d129 100644
--- a/samples/client/petstore/python/petstore_api/model/grandparent.py
+++ b/samples/client/petstore/python/petstore_api/model/grandparent.py
@@ -57,7 +57,13 @@ class Grandparent(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/grandparent_animal.py b/samples/client/petstore/python/petstore_api/model/grandparent_animal.py
index 48d3f6d9f0b..089f5a4a07c 100644
--- a/samples/client/petstore/python/petstore_api/model/grandparent_animal.py
+++ b/samples/client/petstore/python/petstore_api/model/grandparent_animal.py
@@ -67,7 +67,14 @@ class GrandparentAnimal(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/has_only_read_only.py b/samples/client/petstore/python/petstore_api/model/has_only_read_only.py
index c94781ae2c4..4ea0bb08721 100644
--- a/samples/client/petstore/python/petstore_api/model/has_only_read_only.py
+++ b/samples/client/petstore/python/petstore_api/model/has_only_read_only.py
@@ -57,7 +57,13 @@ class HasOnlyReadOnly(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/list.py b/samples/client/petstore/python/petstore_api/model/list.py
index 09c762d6a79..11b46f10b56 100644
--- a/samples/client/petstore/python/petstore_api/model/list.py
+++ b/samples/client/petstore/python/petstore_api/model/list.py
@@ -57,7 +57,13 @@ class List(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/map_test.py b/samples/client/petstore/python/petstore_api/model/map_test.py
index 169fb9d88ee..a5418b39e73 100644
--- a/samples/client/petstore/python/petstore_api/model/map_test.py
+++ b/samples/client/petstore/python/petstore_api/model/map_test.py
@@ -65,7 +65,14 @@ class MapTest(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.py b/samples/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.py
index 01df80d9d62..67b3f79d9e5 100644
--- a/samples/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.py
+++ b/samples/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.py
@@ -61,7 +61,14 @@ class MixedPropertiesAndAdditionalPropertiesClass(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/model200_response.py b/samples/client/petstore/python/petstore_api/model/model200_response.py
index 46b155b6523..056f4c56ad3 100644
--- a/samples/client/petstore/python/petstore_api/model/model200_response.py
+++ b/samples/client/petstore/python/petstore_api/model/model200_response.py
@@ -57,7 +57,13 @@ class Model200Response(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/model_return.py b/samples/client/petstore/python/petstore_api/model/model_return.py
index 377b3507a8b..5f34582cdb4 100644
--- a/samples/client/petstore/python/petstore_api/model/model_return.py
+++ b/samples/client/petstore/python/petstore_api/model/model_return.py
@@ -57,7 +57,13 @@ class ModelReturn(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/name.py b/samples/client/petstore/python/petstore_api/model/name.py
index 1432e185ad6..06b387ce9bf 100644
--- a/samples/client/petstore/python/petstore_api/model/name.py
+++ b/samples/client/petstore/python/petstore_api/model/name.py
@@ -57,7 +57,13 @@ class Name(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/number_only.py b/samples/client/petstore/python/petstore_api/model/number_only.py
index d4892dbede5..cb2c9e2ad52 100644
--- a/samples/client/petstore/python/petstore_api/model/number_only.py
+++ b/samples/client/petstore/python/petstore_api/model/number_only.py
@@ -57,7 +57,13 @@ class NumberOnly(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/number_with_validations.py b/samples/client/petstore/python/petstore_api/model/number_with_validations.py
index 458a7945975..fb47d885bfd 100644
--- a/samples/client/petstore/python/petstore_api/model/number_with_validations.py
+++ b/samples/client/petstore/python/petstore_api/model/number_with_validations.py
@@ -57,7 +57,13 @@ class NumberWithValidations(ModelSimple):
},
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/object_model_with_ref_props.py b/samples/client/petstore/python/petstore_api/model/object_model_with_ref_props.py
index b1dc4bf82e2..7256f67a8d6 100644
--- a/samples/client/petstore/python/petstore_api/model/object_model_with_ref_props.py
+++ b/samples/client/petstore/python/petstore_api/model/object_model_with_ref_props.py
@@ -61,7 +61,14 @@ class ObjectModelWithRefProps(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/order.py b/samples/client/petstore/python/petstore_api/model/order.py
index b42f066848a..48207e4560e 100644
--- a/samples/client/petstore/python/petstore_api/model/order.py
+++ b/samples/client/petstore/python/petstore_api/model/order.py
@@ -62,7 +62,13 @@ class Order(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/parent.py b/samples/client/petstore/python/petstore_api/model/parent.py
index a5e5d878d84..063d5051747 100644
--- a/samples/client/petstore/python/petstore_api/model/parent.py
+++ b/samples/client/petstore/python/petstore_api/model/parent.py
@@ -63,7 +63,14 @@ class Parent(ModelComposed):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
@@ -174,25 +181,18 @@ class Parent(ModelComposed):
'_configuration': _configuration,
'_visited_composed_classes': self._visited_composed_classes,
}
- required_args = {
- }
- model_args = {}
- model_args.update(required_args)
- model_args.update(kwargs)
composed_info = validate_get_composed_info(
- constant_args, model_args, self)
+ constant_args, kwargs, self)
self._composed_instances = composed_info[0]
self._var_name_to_model_instances = composed_info[1]
self._additional_properties_model_instances = composed_info[2]
- unused_args = composed_info[3]
+ discarded_args = composed_info[3]
- for var_name, var_value in required_args.items():
- setattr(self, var_name, var_value)
for var_name, var_value in kwargs.items():
- if var_name in unused_args and \
+ if var_name in discarded_args and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
- not self._additional_properties_model_instances:
+ self._additional_properties_model_instances:
# discard variable.
continue
setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python/petstore_api/model/parent_all_of.py b/samples/client/petstore/python/petstore_api/model/parent_all_of.py
index 0d109f25a4c..2f7b8a791d2 100644
--- a/samples/client/petstore/python/petstore_api/model/parent_all_of.py
+++ b/samples/client/petstore/python/petstore_api/model/parent_all_of.py
@@ -57,7 +57,13 @@ class ParentAllOf(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/parent_pet.py b/samples/client/petstore/python/petstore_api/model/parent_pet.py
index aac0ff12e86..b012d1558a7 100644
--- a/samples/client/petstore/python/petstore_api/model/parent_pet.py
+++ b/samples/client/petstore/python/petstore_api/model/parent_pet.py
@@ -67,7 +67,14 @@ class ParentPet(ModelComposed):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
@@ -115,13 +122,11 @@ class ParentPet(ModelComposed):
])
@convert_js_args_to_python_args
- def __init__(self, pet_type, *args, **kwargs): # noqa: E501
+ def __init__(self, *args, **kwargs): # noqa: E501
"""ParentPet - a model defined in OpenAPI
- Args:
- pet_type (str):
-
Keyword Args:
+ pet_type (str):
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
@@ -184,26 +189,18 @@ class ParentPet(ModelComposed):
'_configuration': _configuration,
'_visited_composed_classes': self._visited_composed_classes,
}
- required_args = {
- 'pet_type': pet_type,
- }
- model_args = {}
- model_args.update(required_args)
- model_args.update(kwargs)
composed_info = validate_get_composed_info(
- constant_args, model_args, self)
+ constant_args, kwargs, self)
self._composed_instances = composed_info[0]
self._var_name_to_model_instances = composed_info[1]
self._additional_properties_model_instances = composed_info[2]
- unused_args = composed_info[3]
+ discarded_args = composed_info[3]
- for var_name, var_value in required_args.items():
- setattr(self, var_name, var_value)
for var_name, var_value in kwargs.items():
- if var_name in unused_args and \
+ if var_name in discarded_args and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
- not self._additional_properties_model_instances:
+ self._additional_properties_model_instances:
# discard variable.
continue
setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python/petstore_api/model/pet.py b/samples/client/petstore/python/petstore_api/model/pet.py
index e9f1e30a319..b0c8b08607d 100644
--- a/samples/client/petstore/python/petstore_api/model/pet.py
+++ b/samples/client/petstore/python/petstore_api/model/pet.py
@@ -68,7 +68,14 @@ class Pet(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/player.py b/samples/client/petstore/python/petstore_api/model/player.py
index 6e4485fb650..2c51f9b57af 100644
--- a/samples/client/petstore/python/petstore_api/model/player.py
+++ b/samples/client/petstore/python/petstore_api/model/player.py
@@ -57,7 +57,13 @@ class Player(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/read_only_first.py b/samples/client/petstore/python/petstore_api/model/read_only_first.py
index 5c68eab91ea..0302bf96a7e 100644
--- a/samples/client/petstore/python/petstore_api/model/read_only_first.py
+++ b/samples/client/petstore/python/petstore_api/model/read_only_first.py
@@ -57,7 +57,13 @@ class ReadOnlyFirst(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/special_model_name.py b/samples/client/petstore/python/petstore_api/model/special_model_name.py
index 823e7759663..cfaedbc7881 100644
--- a/samples/client/petstore/python/petstore_api/model/special_model_name.py
+++ b/samples/client/petstore/python/petstore_api/model/special_model_name.py
@@ -57,7 +57,13 @@ class SpecialModelName(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/string_enum.py b/samples/client/petstore/python/petstore_api/model/string_enum.py
index 37dc04332ca..4c92316cb7e 100644
--- a/samples/client/petstore/python/petstore_api/model/string_enum.py
+++ b/samples/client/petstore/python/petstore_api/model/string_enum.py
@@ -58,7 +58,13 @@ class StringEnum(ModelSimple):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/tag.py b/samples/client/petstore/python/petstore_api/model/tag.py
index d3dcb78b7ea..01c28233598 100644
--- a/samples/client/petstore/python/petstore_api/model/tag.py
+++ b/samples/client/petstore/python/petstore_api/model/tag.py
@@ -57,7 +57,13 @@ class Tag(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/type_holder_default.py b/samples/client/petstore/python/petstore_api/model/type_holder_default.py
index 324b131f3a2..04a96f7e906 100644
--- a/samples/client/petstore/python/petstore_api/model/type_holder_default.py
+++ b/samples/client/petstore/python/petstore_api/model/type_holder_default.py
@@ -57,7 +57,13 @@ class TypeHolderDefault(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/type_holder_example.py b/samples/client/petstore/python/petstore_api/model/type_holder_example.py
index 30bbba178f4..f6e5f44c389 100644
--- a/samples/client/petstore/python/petstore_api/model/type_holder_example.py
+++ b/samples/client/petstore/python/petstore_api/model/type_holder_example.py
@@ -66,7 +66,13 @@ class TypeHolderExample(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/user.py b/samples/client/petstore/python/petstore_api/model/user.py
index 9a3cd081411..64bd6984933 100644
--- a/samples/client/petstore/python/petstore_api/model/user.py
+++ b/samples/client/petstore/python/petstore_api/model/user.py
@@ -57,7 +57,13 @@ class User(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model/xml_item.py b/samples/client/petstore/python/petstore_api/model/xml_item.py
index 8401b3f4007..ba096779721 100644
--- a/samples/client/petstore/python/petstore_api/model/xml_item.py
+++ b/samples/client/petstore/python/petstore_api/model/xml_item.py
@@ -57,7 +57,13 @@ class XmlItem(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/client/petstore/python/petstore_api/model_utils.py b/samples/client/petstore/python/petstore_api/model_utils.py
index f73278f35cc..3a555f0a88c 100644
--- a/samples/client/petstore/python/petstore_api/model_utils.py
+++ b/samples/client/petstore/python/petstore_api/model_utils.py
@@ -434,27 +434,43 @@ class ModelComposed(OpenApiModel):
self.__dict__[name] = value
return
- # set the attribute on the correct instance
- model_instances = self._var_name_to_model_instances.get(
- name, self._additional_properties_model_instances)
- if model_instances:
- for model_instance in model_instances:
- if model_instance == self:
- self.set_attribute(name, value)
- else:
- setattr(model_instance, name, value)
- if name not in self._var_name_to_model_instances:
- # we assigned an additional property
- self.__dict__['_var_name_to_model_instances'][name] = (
- model_instance
- )
- return None
+ """
+ Use cases:
+ 1. additional_properties_type is None (additionalProperties == False in spec)
+ Check for property presence in self.openapi_types
+ if not present then throw an error
+ if present set in self, set attribute
+ always set on composed schemas
+ 2. additional_properties_type exists
+ set attribute on self
+ always set on composed schemas
+ """
+ if self.additional_properties_type is None:
+ """
+ For an attribute to exist on a composed schema it must:
+ - fulfill schema_requirements in the self composed schema not considering oneOf/anyOf/allOf schemas AND
+ - fulfill schema_requirements in each oneOf/anyOf/allOf schemas
- raise ApiAttributeError(
- "{0} has no attribute '{1}'".format(
- type(self).__name__, name),
- [e for e in [self._path_to_item, name] if e]
- )
+ schema_requirements:
+ For an attribute to exist on a schema it must:
+ - be present in properties at the schema OR
+ - have additionalProperties unset (defaults additionalProperties = any type) OR
+ - have additionalProperties set
+ """
+ if name not in self.openapi_types:
+ raise ApiAttributeError(
+ "{0} has no attribute '{1}'".format(
+ type(self).__name__, name),
+ [e for e in [self._path_to_item, name] if e]
+ )
+ # attribute must be set on self and composed instances
+ self.set_attribute(name, value)
+ for model_instance in self._composed_instances:
+ setattr(model_instance, name, value)
+ if name not in self._var_name_to_model_instances:
+ # we assigned an additional property
+ self.__dict__['_var_name_to_model_instances'][name] = self._composed_instances + [self]
+ return None
__unset_attribute_value__ = object()
@@ -464,13 +480,12 @@ class ModelComposed(OpenApiModel):
return self.__dict__[name]
# get the attribute from the correct instance
- model_instances = self._var_name_to_model_instances.get(
- name, self._additional_properties_model_instances)
+ model_instances = self._var_name_to_model_instances.get(name)
values = []
- # A composed model stores child (oneof/anyOf/allOf) models under
- # self._var_name_to_model_instances. A named property can exist in
- # multiple child models. If the property is present in more than one
- # child model, the value must be the same across all the child models.
+ # A composed model stores self and child (oneof/anyOf/allOf) models under
+ # self._var_name_to_model_instances.
+ # Any property must exist in self and all model instances
+ # The value stored in all model instances must be the same
if model_instances:
for model_instance in model_instances:
if name in model_instance._data_store:
@@ -1584,8 +1599,13 @@ def get_allof_instances(self, model_args, constant_args):
self: the class we are handling
model_args (dict): var_name to var_value
used to make instances
- constant_args (dict): var_name to var_value
- used to make instances
+ constant_args (dict):
+ metadata arguments:
+ _check_type
+ _path_to_item
+ _spec_property_naming
+ _configuration
+ _visited_composed_classes
Returns
composed_instances (list)
@@ -1593,20 +1613,8 @@ def get_allof_instances(self, model_args, constant_args):
composed_instances = []
for allof_class in self._composed_schemas['allOf']:
- # no need to handle changing js keys to python because
- # for composed schemas, allof parameters are included in the
- # composed schema and were changed to python keys in __new__
- # extract a dict of only required keys from fixed_model_args
- kwargs = {}
- var_names = set(allof_class.openapi_types.keys())
- for var_name in var_names:
- if var_name in model_args:
- kwargs[var_name] = model_args[var_name]
-
- # and use it to make the instance
- kwargs.update(constant_args)
try:
- allof_instance = allof_class(**kwargs)
+ allof_instance = allof_class(**model_args, **constant_args)
composed_instances.append(allof_instance)
except Exception as ex:
raise ApiValueError(
@@ -1666,31 +1674,9 @@ def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None):
single_value_input = allows_single_value_input(oneof_class)
- if not single_value_input:
- # transform js keys from input data to python keys in fixed_model_args
- fixed_model_args = change_keys_js_to_python(
- model_kwargs, oneof_class)
-
- # Extract a dict with the properties that are declared in the oneOf schema.
- # Undeclared properties (e.g. properties that are allowed because of the
- # additionalProperties attribute in the OAS document) are not added to
- # the dict.
- kwargs = {}
- var_names = set(oneof_class.openapi_types.keys())
- for var_name in var_names:
- if var_name in fixed_model_args:
- kwargs[var_name] = fixed_model_args[var_name]
-
- # do not try to make a model with no input args
- if len(kwargs) == 0:
- continue
-
- # and use it to make the instance
- kwargs.update(constant_kwargs)
-
try:
if not single_value_input:
- oneof_instance = oneof_class(**kwargs)
+ oneof_instance = oneof_class(**model_kwargs, **constant_kwargs)
else:
if issubclass(oneof_class, ModelSimple):
oneof_instance = oneof_class(model_arg, **constant_kwargs)
@@ -1747,24 +1733,8 @@ def get_anyof_instances(self, model_args, constant_args):
# none_type deserialization is handled in the __new__ method
continue
- # transform js keys to python keys in fixed_model_args
- fixed_model_args = change_keys_js_to_python(model_args, anyof_class)
-
- # extract a dict of only required keys from these_model_vars
- kwargs = {}
- var_names = set(anyof_class.openapi_types.keys())
- for var_name in var_names:
- if var_name in fixed_model_args:
- kwargs[var_name] = fixed_model_args[var_name]
-
- # do not try to make a model with no input args
- if len(kwargs) == 0:
- continue
-
- # and use it to make the instance
- kwargs.update(constant_args)
try:
- anyof_instance = anyof_class(**kwargs)
+ anyof_instance = anyof_class(**model_args, **constant_args)
anyof_instances.append(anyof_instance)
except Exception:
pass
@@ -1777,47 +1747,34 @@ def get_anyof_instances(self, model_args, constant_args):
return anyof_instances
-def get_additional_properties_model_instances(
- composed_instances, self):
- additional_properties_model_instances = []
- all_instances = [self]
- all_instances.extend(composed_instances)
- for instance in all_instances:
- if instance.additional_properties_type is not None:
- additional_properties_model_instances.append(instance)
- return additional_properties_model_instances
-
-
-def get_var_name_to_model_instances(self, composed_instances):
- var_name_to_model_instances = {}
- all_instances = [self]
- all_instances.extend(composed_instances)
- for instance in all_instances:
- for var_name in instance.openapi_types:
- if var_name not in var_name_to_model_instances:
- var_name_to_model_instances[var_name] = [instance]
- else:
- var_name_to_model_instances[var_name].append(instance)
- return var_name_to_model_instances
-
-
-def get_unused_args(self, composed_instances, model_args):
- unused_args = dict(model_args)
- # arguments apssed to self were already converted to python names
+def get_discarded_args(self, composed_instances, model_args):
+ """
+ Gathers the args that were discarded by configuration.discard_unknown_keys
+ """
+ model_arg_keys = model_args.keys()
+ discarded_args = set()
+ # arguments passed to self were already converted to python names
# before __init__ was called
- for var_name_py in self.attribute_map:
- if var_name_py in unused_args:
- del unused_args[var_name_py]
for instance in composed_instances:
if instance.__class__ in self._composed_schemas['allOf']:
- for var_name_py in instance.attribute_map:
- if var_name_py in unused_args:
- del unused_args[var_name_py]
+ try:
+ keys = instance.to_dict().keys()
+ discarded_keys = model_args - keys
+ discarded_args.update(discarded_keys)
+ except Exception:
+ # allOf integer schema will throw exception
+ pass
else:
- for var_name_js in instance.attribute_map.values():
- if var_name_js in unused_args:
- del unused_args[var_name_js]
- return unused_args
+ try:
+ all_keys = set(model_to_dict(instance, serialize=False).keys())
+ js_keys = model_to_dict(instance, serialize=True).keys()
+ all_keys.update(js_keys)
+ discarded_keys = model_arg_keys - all_keys
+ discarded_args.update(discarded_keys)
+ except Exception:
+ # allOf integer schema will throw exception
+ pass
+ return discarded_args
def validate_get_composed_info(constant_args, model_args, self):
@@ -1861,36 +1818,42 @@ def validate_get_composed_info(constant_args, model_args, self):
composed_instances.append(oneof_instance)
anyof_instances = get_anyof_instances(self, model_args, constant_args)
composed_instances.extend(anyof_instances)
+ """
+ set additional_properties_model_instances
+ additional properties must be evaluated at the schema level
+ so self's additional properties are most important
+ If self is a composed schema with:
+ - no properties defined in self
+ - additionalProperties: False
+ Then for object payloads every property is an additional property
+ and they are not allowed, so only empty dict is allowed
+
+ Properties must be set on all matching schemas
+ so when a property is assigned toa composed instance, it must be set on all
+ composed instances regardless of additionalProperties presence
+ keeping it to prevent breaking changes in v5.0.1
+ TODO remove cls._additional_properties_model_instances in 6.0.0
+ """
+ additional_properties_model_instances = []
+ if self.additional_properties_type is not None:
+ additional_properties_model_instances = [self]
+
+ """
+ no need to set properties on self in here, they will be set in __init__
+ By here all composed schema oneOf/anyOf/allOf instances have their properties set using
+ model_args
+ """
+ discarded_args = get_discarded_args(self, composed_instances, model_args)
# map variable names to composed_instances
- var_name_to_model_instances = get_var_name_to_model_instances(
- self, composed_instances)
-
- # set additional_properties_model_instances
- additional_properties_model_instances = (
- get_additional_properties_model_instances(composed_instances, self)
- )
-
- # set any remaining values
- unused_args = get_unused_args(self, composed_instances, model_args)
- if len(unused_args) > 0 and \
- len(additional_properties_model_instances) == 0 and \
- (self._configuration is None or
- not self._configuration.discard_unknown_keys):
- raise ApiValueError(
- "Invalid input arguments input when making an instance of "
- "class %s. Not all inputs were used. The unused input data "
- "is %s" % (self.__class__.__name__, unused_args)
- )
-
- # no need to add additional_properties to var_name_to_model_instances here
- # because additional_properties_model_instances will direct us to that
- # instance when we use getattr or setattr
- # and we update var_name_to_model_instances in setattr
+ var_name_to_model_instances = {}
+ for prop_name in model_args:
+ if prop_name not in discarded_args:
+ var_name_to_model_instances[prop_name] = [self] + composed_instances
return [
composed_instances,
var_name_to_model_instances,
additional_properties_model_instances,
- unused_args
+ discarded_args
]
diff --git a/samples/client/petstore/python/pom.xml b/samples/client/petstore/python/pom.xml
index 9dc399cc808..f6178c5c09c 100644
--- a/samples/client/petstore/python/pom.xml
+++ b/samples/client/petstore/python/pom.xml
@@ -1,10 +1,10 @@
4.0.0
org.openapitools
- PythonExperimentalPetstoreClientTests
+ PythonV2PetstoreClientTestsWithComposition
pom
1.0-SNAPSHOT
- Python Experimental OpenAPI Petstore Client
+ Python OpenAPI Petstore Client
diff --git a/samples/client/petstore/python/test/test_child.py b/samples/client/petstore/python/test/test_child.py
index 3b49febd953..88e6b9ed4a8 100644
--- a/samples/client/petstore/python/test/test_child.py
+++ b/samples/client/petstore/python/test/test_child.py
@@ -73,14 +73,6 @@ class TestChild(unittest.TestCase):
}
)
- # setting a value that doesn't exist raises an exception
- # with a key
- with self.assertRaises(petstore_api.ApiAttributeError):
- child['invalid_variable'] = 'some value'
- # with setattr
- with self.assertRaises(petstore_api.ApiAttributeError):
- setattr(child, 'invalid_variable', 'some value')
-
# with hasattr
self.assertFalse(hasattr(child, 'invalid_variable'))
@@ -123,17 +115,26 @@ class TestChild(unittest.TestCase):
self.assertEqual(
child._var_name_to_model_instances,
{
- 'radio_waves': [child, parent_instance],
- 'tele_vision': [child, parent_instance],
- 'inter_net': [child, child_allof_instance]
+ 'radio_waves': [child, child_allof_instance, parent_instance],
+ 'tele_vision': [child, child_allof_instance, parent_instance],
+ 'inter_net': [child, child_allof_instance, parent_instance]
}
)
# model._additional_properties_model_instances stores a list of
# models which have the property additional_properties_type != None
self.assertEqual(
- child._additional_properties_model_instances, []
+ child._additional_properties_model_instances, [child]
)
+ # setting a value that doesn't exist works
+ # with a key
+ child['invalid_variable'] = 'a'
+ assert child.invalid_variable == 'a'
+ # with setattr
+ setattr(child, 'invalid_variable', 'b')
+ assert child.invalid_variable == 'b'
+
+
# if we modify one of the properties owned by multiple
# model_instances we get an exception when we try to access that
# property because the retrieved values are not all the same
@@ -141,13 +142,13 @@ class TestChild(unittest.TestCase):
with self.assertRaises(petstore_api.ApiValueError):
inter_net = child.inter_net
- # including extra parameters raises an exception
- with self.assertRaises(petstore_api.ApiValueError):
- child = Child(
- radio_waves=radio_waves,
- tele_vision=tele_vision,
- inter_net=inter_net,
- unknown_property='some value')
+ # including extra parameters works
+ child = Child(
+ radio_waves=radio_waves,
+ tele_vision=tele_vision,
+ inter_net=inter_net,
+ unknown_property='some value')
+ assert child.unknown_property == 'some value'
if __name__ == '__main__':
unittest.main()
diff --git a/samples/client/petstore/python/test/test_dog.py b/samples/client/petstore/python/test/test_dog.py
index 0b95c0a4c83..0352d794c92 100644
--- a/samples/client/petstore/python/test/test_dog.py
+++ b/samples/client/petstore/python/test/test_dog.py
@@ -73,23 +73,15 @@ class TestDog(unittest.TestCase):
}
)
- # setting a value that doesn't exist raises an exception
- # with a key
- with self.assertRaises(AttributeError):
- dog['invalid_variable'] = 'some value'
- # with setattr
- with self.assertRaises(AttributeError):
- setattr(dog, 'invalid_variable', 'some value')
-
# getting a value that doesn't exist raises an exception
# with a key
with self.assertRaises(AttributeError):
- invalid_variable = dog['invalid_variable']
+ invalid_variable = dog['not_here_a']
# with getattr
- self.assertEqual(getattr(dog, 'invalid_variable', 'some value'), 'some value')
+ self.assertEqual(getattr(dog, 'not_here_a', 'some value'), 'some value')
with self.assertRaises(AttributeError):
- invalid_variable = getattr(dog, 'invalid_variable')
+ invalid_variable = getattr(dog, 'not_here_a')
# make sure that the ModelComposed class properties are correct
# model.composed_schemas() stores the anyOf/allOf/oneOf info
@@ -120,17 +112,25 @@ class TestDog(unittest.TestCase):
self.assertEqual(
dog._var_name_to_model_instances,
{
- 'breed': [dog, dog_allof_instance],
- 'class_name': [dog, animal_instance],
- 'color': [dog, animal_instance]
+ 'breed': [dog, animal_instance, dog_allof_instance],
+ 'class_name': [dog, animal_instance, dog_allof_instance],
+ 'color': [dog, animal_instance, dog_allof_instance]
}
)
# model._additional_properties_model_instances stores a list of
# models which have the property additional_properties_type != None
self.assertEqual(
- dog._additional_properties_model_instances, []
+ dog._additional_properties_model_instances, [dog]
)
+ # setting a value that doesn't exist works
+ dog['invalid_variable'] = 'a'
+ assert dog.invalid_variable == 'a'
+
+ # with setattr
+ setattr(dog, 'invalid_variable', 'b')
+ assert dog.invalid_variable == 'b'
+
# if we modify one of the properties owned by multiple
# model_instances we get an exception when we try to access that
# property because the retrieved values are not all the same
@@ -138,14 +138,14 @@ class TestDog(unittest.TestCase):
with self.assertRaises(petstore_api.ApiValueError):
breed = dog.breed
- # including extra parameters raises an exception
- with self.assertRaises(petstore_api.ApiValueError):
- dog = Dog(
- class_name=class_name,
- color=color,
- breed=breed,
- unknown_property='some value'
- )
+ # including extra parameters works
+ dog = Dog(
+ class_name=class_name,
+ color=color,
+ breed=breed,
+ unknown_property='some value'
+ )
+ assert dog.unknown_property == 'some value'
if __name__ == '__main__':
unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.gitignore b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.gitignore
new file mode 100644
index 00000000000..43995bd42fa
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.gitignore
@@ -0,0 +1,66 @@
+# Byte-compiled / optimized / DLL files
+__pycache__/
+*.py[cod]
+*$py.class
+
+# C extensions
+*.so
+
+# Distribution / packaging
+.Python
+env/
+build/
+develop-eggs/
+dist/
+downloads/
+eggs/
+.eggs/
+lib/
+lib64/
+parts/
+sdist/
+var/
+*.egg-info/
+.installed.cfg
+*.egg
+
+# PyInstaller
+# Usually these files are written by a python script from a template
+# before PyInstaller builds the exe, so as to inject date/other infos into it.
+*.manifest
+*.spec
+
+# Installer logs
+pip-log.txt
+pip-delete-this-directory.txt
+
+# Unit test / coverage reports
+htmlcov/
+.tox/
+.coverage
+.coverage.*
+.cache
+nosetests.xml
+coverage.xml
+*,cover
+.hypothesis/
+venv/
+.venv/
+.python-version
+.pytest_cache
+
+# Translations
+*.mo
+*.pot
+
+# Django stuff:
+*.log
+
+# Sphinx documentation
+docs/_build/
+
+# PyBuilder
+target/
+
+#Ipython Notebook
+.ipynb_checkpoints
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.gitlab-ci.yml b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.gitlab-ci.yml
new file mode 100644
index 00000000000..9e84f517616
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.gitlab-ci.yml
@@ -0,0 +1,24 @@
+# ref: https://docs.gitlab.com/ee/ci/README.html
+
+stages:
+ - test
+
+.tests:
+ stage: test
+ script:
+ - pip install -r requirements.txt
+ - pip install -r test-requirements.txt
+ - pytest --cov=petstore_api
+
+test-3.6:
+ extends: .tests
+ image: python:3.6-alpine
+test-3.7:
+ extends: .tests
+ image: python:3.7-alpine
+test-3.8:
+ extends: .tests
+ image: python:3.8-alpine
+test-3.9:
+ extends: .tests
+ image: python:3.9-alpine
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.openapi-generator-ignore b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.openapi-generator-ignore
new file mode 100644
index 00000000000..7484ee590a3
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.openapi-generator-ignore
@@ -0,0 +1,23 @@
+# OpenAPI Generator Ignore
+# Generated by openapi-generator https://github.com/openapitools/openapi-generator
+
+# Use this file to prevent files from being overwritten by the generator.
+# The patterns follow closely to .gitignore or .dockerignore.
+
+# As an example, the C# client generator defines ApiClient.cs.
+# You can make changes and tell OpenAPI Generator to ignore just this file by uncommenting the following line:
+#ApiClient.cs
+
+# You can match any string of characters against a directory, file or extension with a single asterisk (*):
+#foo/*/qux
+# The above matches foo/bar/qux and foo/baz/qux, but not foo/bar/baz/qux
+
+# You can recursively match patterns against a directory, file or extension with a double asterisk (**):
+#foo/**/qux
+# This matches foo/bar/qux, foo/baz/qux, and foo/bar/baz/qux
+
+# You can also negate patterns with an exclamation (!).
+# For example, you can ignore all files in a docs folder with the file extension .md:
+#docs/*.md
+# Then explicitly reverse the ignore rule for a single file:
+#!docs/README.md
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.openapi-generator/FILES b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.openapi-generator/FILES
new file mode 100644
index 00000000000..a5adeaaddc6
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.openapi-generator/FILES
@@ -0,0 +1,159 @@
+.gitignore
+.gitlab-ci.yml
+.travis.yml
+README.md
+docs/AdditionalPropertiesAnyType.md
+docs/AdditionalPropertiesArray.md
+docs/AdditionalPropertiesBoolean.md
+docs/AdditionalPropertiesClass.md
+docs/AdditionalPropertiesInteger.md
+docs/AdditionalPropertiesNumber.md
+docs/AdditionalPropertiesObject.md
+docs/AdditionalPropertiesString.md
+docs/Animal.md
+docs/AnimalFarm.md
+docs/AnotherFakeApi.md
+docs/ApiResponse.md
+docs/ArrayOfArrayOfNumberOnly.md
+docs/ArrayOfNumberOnly.md
+docs/ArrayTest.md
+docs/Capitalization.md
+docs/Cat.md
+docs/CatAllOf.md
+docs/Category.md
+docs/Child.md
+docs/ChildAllOf.md
+docs/ChildCat.md
+docs/ChildCatAllOf.md
+docs/ChildDog.md
+docs/ChildDogAllOf.md
+docs/ChildLizard.md
+docs/ChildLizardAllOf.md
+docs/ClassModel.md
+docs/Client.md
+docs/Dog.md
+docs/DogAllOf.md
+docs/EnumArrays.md
+docs/EnumClass.md
+docs/EnumTest.md
+docs/FakeApi.md
+docs/FakeClassnameTags123Api.md
+docs/File.md
+docs/FileSchemaTestClass.md
+docs/FormatTest.md
+docs/Grandparent.md
+docs/GrandparentAnimal.md
+docs/HasOnlyReadOnly.md
+docs/List.md
+docs/MapTest.md
+docs/MixedPropertiesAndAdditionalPropertiesClass.md
+docs/Model200Response.md
+docs/ModelReturn.md
+docs/Name.md
+docs/NumberOnly.md
+docs/NumberWithValidations.md
+docs/ObjectModelWithRefProps.md
+docs/Order.md
+docs/Parent.md
+docs/ParentAllOf.md
+docs/ParentPet.md
+docs/Pet.md
+docs/PetApi.md
+docs/Player.md
+docs/ReadOnlyFirst.md
+docs/SpecialModelName.md
+docs/StoreApi.md
+docs/StringBooleanMap.md
+docs/StringEnum.md
+docs/Tag.md
+docs/TypeHolderDefault.md
+docs/TypeHolderExample.md
+docs/User.md
+docs/UserApi.md
+docs/XmlItem.md
+git_push.sh
+petstore_api/__init__.py
+petstore_api/api/__init__.py
+petstore_api/api/another_fake_api.py
+petstore_api/api/fake_api.py
+petstore_api/api/fake_classname_tags_123_api.py
+petstore_api/api/pet_api.py
+petstore_api/api/store_api.py
+petstore_api/api/user_api.py
+petstore_api/api_client.py
+petstore_api/apis/__init__.py
+petstore_api/configuration.py
+petstore_api/exceptions.py
+petstore_api/model/__init__.py
+petstore_api/model/additional_properties_any_type.py
+petstore_api/model/additional_properties_array.py
+petstore_api/model/additional_properties_boolean.py
+petstore_api/model/additional_properties_class.py
+petstore_api/model/additional_properties_integer.py
+petstore_api/model/additional_properties_number.py
+petstore_api/model/additional_properties_object.py
+petstore_api/model/additional_properties_string.py
+petstore_api/model/animal.py
+petstore_api/model/animal_farm.py
+petstore_api/model/api_response.py
+petstore_api/model/array_of_array_of_number_only.py
+petstore_api/model/array_of_number_only.py
+petstore_api/model/array_test.py
+petstore_api/model/capitalization.py
+petstore_api/model/cat.py
+petstore_api/model/cat_all_of.py
+petstore_api/model/category.py
+petstore_api/model/child.py
+petstore_api/model/child_all_of.py
+petstore_api/model/child_cat.py
+petstore_api/model/child_cat_all_of.py
+petstore_api/model/child_dog.py
+petstore_api/model/child_dog_all_of.py
+petstore_api/model/child_lizard.py
+petstore_api/model/child_lizard_all_of.py
+petstore_api/model/class_model.py
+petstore_api/model/client.py
+petstore_api/model/dog.py
+petstore_api/model/dog_all_of.py
+petstore_api/model/enum_arrays.py
+petstore_api/model/enum_class.py
+petstore_api/model/enum_test.py
+petstore_api/model/file.py
+petstore_api/model/file_schema_test_class.py
+petstore_api/model/format_test.py
+petstore_api/model/grandparent.py
+petstore_api/model/grandparent_animal.py
+petstore_api/model/has_only_read_only.py
+petstore_api/model/list.py
+petstore_api/model/map_test.py
+petstore_api/model/mixed_properties_and_additional_properties_class.py
+petstore_api/model/model200_response.py
+petstore_api/model/model_return.py
+petstore_api/model/name.py
+petstore_api/model/number_only.py
+petstore_api/model/number_with_validations.py
+petstore_api/model/object_model_with_ref_props.py
+petstore_api/model/order.py
+petstore_api/model/parent.py
+petstore_api/model/parent_all_of.py
+petstore_api/model/parent_pet.py
+petstore_api/model/pet.py
+petstore_api/model/player.py
+petstore_api/model/read_only_first.py
+petstore_api/model/special_model_name.py
+petstore_api/model/string_boolean_map.py
+petstore_api/model/string_enum.py
+petstore_api/model/tag.py
+petstore_api/model/type_holder_default.py
+petstore_api/model/type_holder_example.py
+petstore_api/model/user.py
+petstore_api/model/xml_item.py
+petstore_api/model_utils.py
+petstore_api/models/__init__.py
+petstore_api/rest.py
+requirements.txt
+setup.cfg
+setup.py
+test-requirements.txt
+test/__init__.py
+tox.ini
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.openapi-generator/VERSION b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.openapi-generator/VERSION
new file mode 100644
index 00000000000..6555596f931
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.openapi-generator/VERSION
@@ -0,0 +1 @@
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.travis.yml b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.travis.yml
new file mode 100644
index 00000000000..1fcc4b15596
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/.travis.yml
@@ -0,0 +1,13 @@
+# ref: https://docs.travis-ci.com/user/languages/python
+language: python
+python:
+ - "3.6"
+ - "3.7"
+ - "3.8"
+ - "3.9"
+# command to install dependencies
+install:
+ - "pip install -r requirements.txt"
+ - "pip install -r test-requirements.txt"
+# command to run tests
+script: pytest --cov=petstore_api
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/Makefile b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/Makefile
new file mode 100644
index 00000000000..a6bbba4a434
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/Makefile
@@ -0,0 +1,18 @@
+ #!/bin/bash
+
+REQUIREMENTS_FILE=dev-requirements.txt
+REQUIREMENTS_OUT=dev-requirements.txt.log
+SETUP_OUT=*.egg-info
+VENV=venv
+
+clean:
+ rm -rf $(REQUIREMENTS_OUT)
+ rm -rf $(SETUP_OUT)
+ rm -rf $(VENV)
+ rm -rf .tox
+ rm -rf .coverage
+ find . -name "*.py[oc]" -delete
+ find . -name "__pycache__" -delete
+
+test: clean
+ bash ./test_python.sh
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/README.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/README.md
new file mode 100644
index 00000000000..5f53c0f6423
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/README.md
@@ -0,0 +1,247 @@
+# petstore-api
+This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\
+
+This Python package is automatically generated by the [OpenAPI Generator](https://openapi-generator.tech) project:
+
+- API version: 1.0.0
+- Package version: 1.0.0
+- Build package: org.openapitools.codegen.languages.PythonClientCodegen
+
+## Requirements.
+
+Python >= 3.6
+
+## Installation & Usage
+### pip install
+
+If the python package is hosted on a repository, you can install directly using:
+
+```sh
+pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git
+```
+(you may need to run `pip` with root permission: `sudo pip install git+https://github.com/GIT_USER_ID/GIT_REPO_ID.git`)
+
+Then import the package:
+```python
+import petstore_api
+```
+
+### Setuptools
+
+Install via [Setuptools](http://pypi.python.org/pypi/setuptools).
+
+```sh
+python setup.py install --user
+```
+(or `sudo python setup.py install` to install the package for all users)
+
+Then import the package:
+```python
+import petstore_api
+```
+
+## Getting Started
+
+Please follow the [installation procedure](#installation--usage) and then run the following:
+
+```python
+
+import time
+import petstore_api
+from pprint import pprint
+from petstore_api.api import another_fake_api
+from petstore_api.model.client import Client
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = another_fake_api.AnotherFakeApi(api_client)
+ body = Client(
+ client="client_example",
+ ) # Client | client model
+
+ try:
+ # To test special tags
+ api_response = api_instance.call_123_test_special_tags(body)
+ pprint(api_response)
+ except petstore_api.ApiException as e:
+ print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e)
+```
+
+## Documentation for API Endpoints
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+Class | Method | HTTP request | Description
+------------ | ------------- | ------------- | -------------
+*AnotherFakeApi* | [**call_123_test_special_tags**](docs/AnotherFakeApi.md#call_123_test_special_tags) | **PATCH** /another-fake/dummy | To test special tags
+*FakeApi* | [**array_model**](docs/FakeApi.md#array_model) | **POST** /fake/refs/arraymodel |
+*FakeApi* | [**boolean**](docs/FakeApi.md#boolean) | **POST** /fake/refs/boolean |
+*FakeApi* | [**create_xml_item**](docs/FakeApi.md#create_xml_item) | **POST** /fake/create_xml_item | creates an XmlItem
+*FakeApi* | [**number_with_validations**](docs/FakeApi.md#number_with_validations) | **POST** /fake/refs/number |
+*FakeApi* | [**object_model_with_ref_props**](docs/FakeApi.md#object_model_with_ref_props) | **POST** /fake/refs/object_model_with_ref_props |
+*FakeApi* | [**string**](docs/FakeApi.md#string) | **POST** /fake/refs/string |
+*FakeApi* | [**string_enum**](docs/FakeApi.md#string_enum) | **POST** /fake/refs/enum |
+*FakeApi* | [**test_body_with_file_schema**](docs/FakeApi.md#test_body_with_file_schema) | **PUT** /fake/body-with-file-schema |
+*FakeApi* | [**test_body_with_query_params**](docs/FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params |
+*FakeApi* | [**test_client_model**](docs/FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model
+*FakeApi* | [**test_endpoint_enums_length_one**](docs/FakeApi.md#test_endpoint_enums_length_one) | **PUT** /fake/enums-of-length-one/{path_string}/{path_integer} |
+*FakeApi* | [**test_endpoint_parameters**](docs/FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+*FakeApi* | [**test_enum_parameters**](docs/FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters
+*FakeApi* | [**test_group_parameters**](docs/FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
+*FakeApi* | [**test_inline_additional_properties**](docs/FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
+*FakeApi* | [**test_json_form_data**](docs/FakeApi.md#test_json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data
+*FakeClassnameTags123Api* | [**test_classname**](docs/FakeClassnameTags123Api.md#test_classname) | **PATCH** /fake_classname_test | To test class name in snake case
+*PetApi* | [**add_pet**](docs/PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store
+*PetApi* | [**delete_pet**](docs/PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet
+*PetApi* | [**find_pets_by_status**](docs/PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status
+*PetApi* | [**find_pets_by_tags**](docs/PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags
+*PetApi* | [**get_pet_by_id**](docs/PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID
+*PetApi* | [**update_pet**](docs/PetApi.md#update_pet) | **PUT** /pet | Update an existing pet
+*PetApi* | [**update_pet_with_form**](docs/PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data
+*PetApi* | [**upload_file**](docs/PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image
+*PetApi* | [**upload_file_with_required_file**](docs/PetApi.md#upload_file_with_required_file) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
+*StoreApi* | [**delete_order**](docs/StoreApi.md#delete_order) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
+*StoreApi* | [**get_inventory**](docs/StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status
+*StoreApi* | [**get_order_by_id**](docs/StoreApi.md#get_order_by_id) | **GET** /store/order/{order_id} | Find purchase order by ID
+*StoreApi* | [**place_order**](docs/StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet
+*UserApi* | [**create_user**](docs/UserApi.md#create_user) | **POST** /user | Create user
+*UserApi* | [**create_users_with_array_input**](docs/UserApi.md#create_users_with_array_input) | **POST** /user/createWithArray | Creates list of users with given input array
+*UserApi* | [**create_users_with_list_input**](docs/UserApi.md#create_users_with_list_input) | **POST** /user/createWithList | Creates list of users with given input array
+*UserApi* | [**delete_user**](docs/UserApi.md#delete_user) | **DELETE** /user/{username} | Delete user
+*UserApi* | [**get_user_by_name**](docs/UserApi.md#get_user_by_name) | **GET** /user/{username} | Get user by user name
+*UserApi* | [**login_user**](docs/UserApi.md#login_user) | **GET** /user/login | Logs user into the system
+*UserApi* | [**logout_user**](docs/UserApi.md#logout_user) | **GET** /user/logout | Logs out current logged in user session
+*UserApi* | [**update_user**](docs/UserApi.md#update_user) | **PUT** /user/{username} | Updated user
+
+
+## Documentation For Models
+
+ - [AdditionalPropertiesAnyType](docs/AdditionalPropertiesAnyType.md)
+ - [AdditionalPropertiesArray](docs/AdditionalPropertiesArray.md)
+ - [AdditionalPropertiesBoolean](docs/AdditionalPropertiesBoolean.md)
+ - [AdditionalPropertiesClass](docs/AdditionalPropertiesClass.md)
+ - [AdditionalPropertiesInteger](docs/AdditionalPropertiesInteger.md)
+ - [AdditionalPropertiesNumber](docs/AdditionalPropertiesNumber.md)
+ - [AdditionalPropertiesObject](docs/AdditionalPropertiesObject.md)
+ - [AdditionalPropertiesString](docs/AdditionalPropertiesString.md)
+ - [Animal](docs/Animal.md)
+ - [AnimalFarm](docs/AnimalFarm.md)
+ - [ApiResponse](docs/ApiResponse.md)
+ - [ArrayOfArrayOfNumberOnly](docs/ArrayOfArrayOfNumberOnly.md)
+ - [ArrayOfNumberOnly](docs/ArrayOfNumberOnly.md)
+ - [ArrayTest](docs/ArrayTest.md)
+ - [Capitalization](docs/Capitalization.md)
+ - [Cat](docs/Cat.md)
+ - [CatAllOf](docs/CatAllOf.md)
+ - [Category](docs/Category.md)
+ - [Child](docs/Child.md)
+ - [ChildAllOf](docs/ChildAllOf.md)
+ - [ChildCat](docs/ChildCat.md)
+ - [ChildCatAllOf](docs/ChildCatAllOf.md)
+ - [ChildDog](docs/ChildDog.md)
+ - [ChildDogAllOf](docs/ChildDogAllOf.md)
+ - [ChildLizard](docs/ChildLizard.md)
+ - [ChildLizardAllOf](docs/ChildLizardAllOf.md)
+ - [ClassModel](docs/ClassModel.md)
+ - [Client](docs/Client.md)
+ - [Dog](docs/Dog.md)
+ - [DogAllOf](docs/DogAllOf.md)
+ - [EnumArrays](docs/EnumArrays.md)
+ - [EnumClass](docs/EnumClass.md)
+ - [EnumTest](docs/EnumTest.md)
+ - [File](docs/File.md)
+ - [FileSchemaTestClass](docs/FileSchemaTestClass.md)
+ - [FormatTest](docs/FormatTest.md)
+ - [Grandparent](docs/Grandparent.md)
+ - [GrandparentAnimal](docs/GrandparentAnimal.md)
+ - [HasOnlyReadOnly](docs/HasOnlyReadOnly.md)
+ - [List](docs/List.md)
+ - [MapTest](docs/MapTest.md)
+ - [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
+ - [Model200Response](docs/Model200Response.md)
+ - [ModelReturn](docs/ModelReturn.md)
+ - [Name](docs/Name.md)
+ - [NumberOnly](docs/NumberOnly.md)
+ - [NumberWithValidations](docs/NumberWithValidations.md)
+ - [ObjectModelWithRefProps](docs/ObjectModelWithRefProps.md)
+ - [Order](docs/Order.md)
+ - [Parent](docs/Parent.md)
+ - [ParentAllOf](docs/ParentAllOf.md)
+ - [ParentPet](docs/ParentPet.md)
+ - [Pet](docs/Pet.md)
+ - [Player](docs/Player.md)
+ - [ReadOnlyFirst](docs/ReadOnlyFirst.md)
+ - [SpecialModelName](docs/SpecialModelName.md)
+ - [StringBooleanMap](docs/StringBooleanMap.md)
+ - [StringEnum](docs/StringEnum.md)
+ - [Tag](docs/Tag.md)
+ - [TypeHolderDefault](docs/TypeHolderDefault.md)
+ - [TypeHolderExample](docs/TypeHolderExample.md)
+ - [User](docs/User.md)
+ - [XmlItem](docs/XmlItem.md)
+
+
+## Documentation For Authorization
+
+
+## api_key
+
+- **Type**: API key
+- **API key parameter name**: api_key
+- **Location**: HTTP header
+
+
+## api_key_query
+
+- **Type**: API key
+- **API key parameter name**: api_key_query
+- **Location**: URL query string
+
+
+## http_basic_test
+
+- **Type**: HTTP basic authentication
+
+
+## petstore_auth
+
+- **Type**: OAuth
+- **Flow**: implicit
+- **Authorization URL**: http://petstore.swagger.io/api/oauth/dialog
+- **Scopes**:
+ - **write:pets**: modify pets in your account
+ - **read:pets**: read your pets
+
+
+## Author
+
+
+
+
+## Notes for Large OpenAPI documents
+If the OpenAPI document is large, imports in petstore_api.apis and petstore_api.models may fail with a
+RecursionError indicating the maximum recursion limit has been exceeded. In that case, there are a couple of solutions:
+
+Solution 1:
+Use specific imports for apis and models like:
+- `from petstore_api.api.default_api import DefaultApi`
+- `from petstore_api.model.pet import Pet`
+
+Solution 2:
+Before importing the package, adjust the maximum recursion limit as shown below:
+```
+import sys
+sys.setrecursionlimit(1500)
+import petstore_api
+from petstore_api.apis import *
+from petstore_api.models import *
+```
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/dev-requirements.txt b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/dev-requirements.txt
new file mode 100644
index 00000000000..ccdfca62949
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/dev-requirements.txt
@@ -0,0 +1,2 @@
+tox
+flake8
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/AdditionalPropertiesAnyType.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/AdditionalPropertiesAnyType.md
new file mode 100644
index 00000000000..d31d12de082
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/AdditionalPropertiesAnyType.md
@@ -0,0 +1,12 @@
+# AdditionalPropertiesAnyType
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/AdditionalPropertiesArray.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/AdditionalPropertiesArray.md
new file mode 100644
index 00000000000..40537cbf838
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/AdditionalPropertiesArray.md
@@ -0,0 +1,12 @@
+# AdditionalPropertiesArray
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | | [optional]
+**any string name** | **[bool, date, datetime, dict, float, int, list, str, none_type]** | any string name can be used but the value must be the correct type | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/AdditionalPropertiesBoolean.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/AdditionalPropertiesBoolean.md
new file mode 100644
index 00000000000..bf7b5be4c13
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/AdditionalPropertiesBoolean.md
@@ -0,0 +1,12 @@
+# AdditionalPropertiesBoolean
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | | [optional]
+**any string name** | **bool** | any string name can be used but the value must be the correct type | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/AdditionalPropertiesClass.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/AdditionalPropertiesClass.md
new file mode 100644
index 00000000000..fe54cef0539
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/AdditionalPropertiesClass.md
@@ -0,0 +1,21 @@
+# AdditionalPropertiesClass
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**map_string** | **{str: (str,)}** | | [optional]
+**map_number** | **{str: (float,)}** | | [optional]
+**map_integer** | **{str: (int,)}** | | [optional]
+**map_boolean** | **{str: (bool,)}** | | [optional]
+**map_array_integer** | **{str: ([int],)}** | | [optional]
+**map_array_anytype** | **{str: ([bool, date, datetime, dict, float, int, list, str, none_type],)}** | | [optional]
+**map_map_string** | **{str: ({str: (str,)},)}** | | [optional]
+**map_map_anytype** | **{str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)},)}** | | [optional]
+**anytype_1** | **bool, date, datetime, dict, float, int, list, str, none_type** | | [optional]
+**anytype_2** | **bool, date, datetime, dict, float, int, list, str, none_type** | no type is set for this | [optional]
+**anytype_3** | **bool, date, datetime, dict, float, int, list, str, none_type** | because of a bug in swagger-parser, this should have values {str: (str, int, float...)} but instead we get any type. See https://github.com/swagger-api/swagger-parser/issues/1378 | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/AdditionalPropertiesInteger.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/AdditionalPropertiesInteger.md
new file mode 100644
index 00000000000..96345efd4cc
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/AdditionalPropertiesInteger.md
@@ -0,0 +1,12 @@
+# AdditionalPropertiesInteger
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | | [optional]
+**any string name** | **int** | any string name can be used but the value must be the correct type | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/AdditionalPropertiesNumber.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/AdditionalPropertiesNumber.md
new file mode 100644
index 00000000000..9af52dc6dcf
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/AdditionalPropertiesNumber.md
@@ -0,0 +1,12 @@
+# AdditionalPropertiesNumber
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | | [optional]
+**any string name** | **float** | any string name can be used but the value must be the correct type | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/AdditionalPropertiesObject.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/AdditionalPropertiesObject.md
new file mode 100644
index 00000000000..dc64a0d91c2
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/AdditionalPropertiesObject.md
@@ -0,0 +1,12 @@
+# AdditionalPropertiesObject
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | | [optional]
+**any string name** | **{str: (bool, date, datetime, dict, float, int, list, str, none_type,)}** | any string name can be used but the value must be the correct type | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/AdditionalPropertiesString.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/AdditionalPropertiesString.md
new file mode 100644
index 00000000000..fe3993d0226
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/AdditionalPropertiesString.md
@@ -0,0 +1,12 @@
+# AdditionalPropertiesString
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | | [optional]
+**any string name** | **str** | any string name can be used but the value must be the correct type | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Animal.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Animal.md
new file mode 100644
index 00000000000..1d1c77c01ab
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Animal.md
@@ -0,0 +1,12 @@
+# Animal
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**class_name** | **str** | |
+**color** | **str** | | [optional] if omitted the server will use the default value of "red"
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/AnimalFarm.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/AnimalFarm.md
new file mode 100644
index 00000000000..fc299cf27d3
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/AnimalFarm.md
@@ -0,0 +1,11 @@
+# AnimalFarm
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**value** | [**[Animal]**](Animal.md) | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/AnotherFakeApi.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/AnotherFakeApi.md
new file mode 100644
index 00000000000..470caed72cc
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/AnotherFakeApi.md
@@ -0,0 +1,76 @@
+# petstore_api.AnotherFakeApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**call_123_test_special_tags**](AnotherFakeApi.md#call_123_test_special_tags) | **PATCH** /another-fake/dummy | To test special tags
+
+
+# **call_123_test_special_tags**
+> Client call_123_test_special_tags(body)
+
+To test special tags
+
+To test special tags and operation ID starting with number
+
+### Example
+
+```python
+import time
+import petstore_api
+from petstore_api.api import another_fake_api
+from petstore_api.model.client import Client
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient() as api_client:
+ # Create an instance of the API class
+ api_instance = another_fake_api.AnotherFakeApi(api_client)
+ body = Client(
+ client="client_example",
+ ) # Client | client model
+
+ # example passing only required values which don't have defaults set
+ try:
+ # To test special tags
+ api_response = api_instance.call_123_test_special_tags(body)
+ pprint(api_response)
+ except petstore_api.ApiException as e:
+ print("Exception when calling AnotherFakeApi->call_123_test_special_tags: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**Client**](Client.md)| client model |
+
+### Return type
+
+[**Client**](Client.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | successful operation | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ApiResponse.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ApiResponse.md
new file mode 100644
index 00000000000..81a7d0d8522
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ApiResponse.md
@@ -0,0 +1,13 @@
+# ApiResponse
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**code** | **int** | | [optional]
+**type** | **str** | | [optional]
+**message** | **str** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ArrayOfArrayOfNumberOnly.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ArrayOfArrayOfNumberOnly.md
new file mode 100644
index 00000000000..6ab77963788
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ArrayOfArrayOfNumberOnly.md
@@ -0,0 +1,11 @@
+# ArrayOfArrayOfNumberOnly
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**array_array_number** | **[[float]]** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ArrayOfNumberOnly.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ArrayOfNumberOnly.md
new file mode 100644
index 00000000000..ebc65a54ba7
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ArrayOfNumberOnly.md
@@ -0,0 +1,11 @@
+# ArrayOfNumberOnly
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**array_number** | **[float]** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ArrayTest.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ArrayTest.md
new file mode 100644
index 00000000000..4e1bda8fc3a
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ArrayTest.md
@@ -0,0 +1,13 @@
+# ArrayTest
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**array_of_string** | **[str]** | | [optional]
+**array_array_of_integer** | **[[int]]** | | [optional]
+**array_array_of_model** | [**[[ReadOnlyFirst]]**](ReadOnlyFirst.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Capitalization.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Capitalization.md
new file mode 100644
index 00000000000..1ddeadeb3f4
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Capitalization.md
@@ -0,0 +1,16 @@
+# Capitalization
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**small_camel** | **str** | | [optional]
+**capital_camel** | **str** | | [optional]
+**small_snake** | **str** | | [optional]
+**capital_snake** | **str** | | [optional]
+**sca_eth_flow_points** | **str** | | [optional]
+**att_name** | **str** | Name of the pet | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Cat.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Cat.md
new file mode 100644
index 00000000000..e9ce235cd63
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Cat.md
@@ -0,0 +1,13 @@
+# Cat
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**class_name** | **str** | |
+**declawed** | **bool** | | [optional]
+**color** | **str** | | [optional] if omitted the server will use the default value of "red"
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/CatAllOf.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/CatAllOf.md
new file mode 100644
index 00000000000..0ff7809a99a
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/CatAllOf.md
@@ -0,0 +1,11 @@
+# CatAllOf
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**declawed** | **bool** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Category.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Category.md
new file mode 100644
index 00000000000..940f6a45e64
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Category.md
@@ -0,0 +1,12 @@
+# Category
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | | defaults to "default-name"
+**id** | **int** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Child.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Child.md
new file mode 100644
index 00000000000..eb439244571
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Child.md
@@ -0,0 +1,13 @@
+# Child
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**radio_waves** | **bool** | | [optional]
+**tele_vision** | **bool** | | [optional]
+**inter_net** | **bool** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ChildAllOf.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ChildAllOf.md
new file mode 100644
index 00000000000..f9ae99c7c15
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ChildAllOf.md
@@ -0,0 +1,11 @@
+# ChildAllOf
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**inter_net** | **bool** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ChildCat.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ChildCat.md
new file mode 100644
index 00000000000..9e3a0fb4b51
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ChildCat.md
@@ -0,0 +1,12 @@
+# ChildCat
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**pet_type** | **str** | |
+**name** | **str** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ChildCatAllOf.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ChildCatAllOf.md
new file mode 100644
index 00000000000..c5883b9a87c
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ChildCatAllOf.md
@@ -0,0 +1,11 @@
+# ChildCatAllOf
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ChildDog.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ChildDog.md
new file mode 100644
index 00000000000..9a6e5b37266
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ChildDog.md
@@ -0,0 +1,12 @@
+# ChildDog
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**pet_type** | **str** | |
+**bark** | **str** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ChildDogAllOf.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ChildDogAllOf.md
new file mode 100644
index 00000000000..673050667cb
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ChildDogAllOf.md
@@ -0,0 +1,11 @@
+# ChildDogAllOf
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**bark** | **str** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ChildLizard.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ChildLizard.md
new file mode 100644
index 00000000000..e881ee0a1d1
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ChildLizard.md
@@ -0,0 +1,12 @@
+# ChildLizard
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**pet_type** | **str** | |
+**loves_rocks** | **bool** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ChildLizardAllOf.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ChildLizardAllOf.md
new file mode 100644
index 00000000000..6e2b70c0150
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ChildLizardAllOf.md
@@ -0,0 +1,11 @@
+# ChildLizardAllOf
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**loves_rocks** | **bool** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ClassModel.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ClassModel.md
new file mode 100644
index 00000000000..48ed7cbf2ff
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ClassModel.md
@@ -0,0 +1,12 @@
+# ClassModel
+
+Model for testing model with \"_class\" property
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**_class** | **str** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Client.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Client.md
new file mode 100644
index 00000000000..c3986008d6c
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Client.md
@@ -0,0 +1,11 @@
+# Client
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**client** | **str** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Dog.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Dog.md
new file mode 100644
index 00000000000..7065c4c983d
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Dog.md
@@ -0,0 +1,13 @@
+# Dog
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**class_name** | **str** | |
+**breed** | **str** | | [optional]
+**color** | **str** | | [optional] if omitted the server will use the default value of "red"
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/DogAllOf.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/DogAllOf.md
new file mode 100644
index 00000000000..6382bbd8067
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/DogAllOf.md
@@ -0,0 +1,11 @@
+# DogAllOf
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**breed** | **str** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/EnumArrays.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/EnumArrays.md
new file mode 100644
index 00000000000..9be5c645a80
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/EnumArrays.md
@@ -0,0 +1,12 @@
+# EnumArrays
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**just_symbol** | **str** | | [optional]
+**array_enum** | **[str]** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/EnumClass.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/EnumClass.md
new file mode 100644
index 00000000000..a1f9aae5819
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/EnumClass.md
@@ -0,0 +1,11 @@
+# EnumClass
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**value** | **str** | | defaults to "-efg", must be one of ["_abc", "-efg", "(xyz)", ]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/EnumTest.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/EnumTest.md
new file mode 100644
index 00000000000..eb884224139
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/EnumTest.md
@@ -0,0 +1,15 @@
+# EnumTest
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**enum_string_required** | **str** | |
+**enum_string** | **str** | | [optional]
+**enum_integer** | **int** | | [optional]
+**enum_number** | **float** | | [optional]
+**string_enum** | [**StringEnum**](StringEnum.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/FakeApi.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/FakeApi.md
new file mode 100644
index 00000000000..bfd6467215b
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/FakeApi.md
@@ -0,0 +1,1205 @@
+# petstore_api.FakeApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**array_model**](FakeApi.md#array_model) | **POST** /fake/refs/arraymodel |
+[**boolean**](FakeApi.md#boolean) | **POST** /fake/refs/boolean |
+[**create_xml_item**](FakeApi.md#create_xml_item) | **POST** /fake/create_xml_item | creates an XmlItem
+[**number_with_validations**](FakeApi.md#number_with_validations) | **POST** /fake/refs/number |
+[**object_model_with_ref_props**](FakeApi.md#object_model_with_ref_props) | **POST** /fake/refs/object_model_with_ref_props |
+[**string**](FakeApi.md#string) | **POST** /fake/refs/string |
+[**string_enum**](FakeApi.md#string_enum) | **POST** /fake/refs/enum |
+[**test_body_with_file_schema**](FakeApi.md#test_body_with_file_schema) | **PUT** /fake/body-with-file-schema |
+[**test_body_with_query_params**](FakeApi.md#test_body_with_query_params) | **PUT** /fake/body-with-query-params |
+[**test_client_model**](FakeApi.md#test_client_model) | **PATCH** /fake | To test \"client\" model
+[**test_endpoint_enums_length_one**](FakeApi.md#test_endpoint_enums_length_one) | **PUT** /fake/enums-of-length-one/{path_string}/{path_integer} |
+[**test_endpoint_parameters**](FakeApi.md#test_endpoint_parameters) | **POST** /fake | Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+[**test_enum_parameters**](FakeApi.md#test_enum_parameters) | **GET** /fake | To test enum parameters
+[**test_group_parameters**](FakeApi.md#test_group_parameters) | **DELETE** /fake | Fake endpoint to test group parameters (optional)
+[**test_inline_additional_properties**](FakeApi.md#test_inline_additional_properties) | **POST** /fake/inline-additionalProperties | test inline additionalProperties
+[**test_json_form_data**](FakeApi.md#test_json_form_data) | **GET** /fake/jsonFormData | test json serialization of form data
+
+
+# **array_model**
+> AnimalFarm array_model()
+
+
+
+Test serialization of ArrayModel
+
+### Example
+
+```python
+import time
+import petstore_api
+from petstore_api.api import fake_api
+from petstore_api.model.animal_farm import AnimalFarm
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient() as api_client:
+ # Create an instance of the API class
+ api_instance = fake_api.FakeApi(api_client)
+ body = AnimalFarm([
+ Animal(),
+ ]) # AnimalFarm | Input model (optional)
+
+ # example passing only required values which don't have defaults set
+ # and optional values
+ try:
+ api_response = api_instance.array_model(body=body)
+ pprint(api_response)
+ except petstore_api.ApiException as e:
+ print("Exception when calling FakeApi->array_model: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**AnimalFarm**](AnimalFarm.md)| Input model | [optional]
+
+### Return type
+
+[**AnimalFarm**](AnimalFarm.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: */*
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Output model | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **boolean**
+> bool boolean()
+
+
+
+Test serialization of outer boolean types
+
+### Example
+
+```python
+import time
+import petstore_api
+from petstore_api.api import fake_api
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient() as api_client:
+ # Create an instance of the API class
+ api_instance = fake_api.FakeApi(api_client)
+ body = True # bool | Input boolean as post body (optional)
+
+ # example passing only required values which don't have defaults set
+ # and optional values
+ try:
+ api_response = api_instance.boolean(body=body)
+ pprint(api_response)
+ except petstore_api.ApiException as e:
+ print("Exception when calling FakeApi->boolean: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | **bool**| Input boolean as post body | [optional]
+
+### Return type
+
+**bool**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: */*
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Output boolean | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **create_xml_item**
+> create_xml_item(xml_item)
+
+creates an XmlItem
+
+this route creates an XmlItem
+
+### Example
+
+```python
+import time
+import petstore_api
+from petstore_api.api import fake_api
+from petstore_api.model.xml_item import XmlItem
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient() as api_client:
+ # Create an instance of the API class
+ api_instance = fake_api.FakeApi(api_client)
+ xml_item = XmlItem(
+ attribute_string="string",
+ attribute_number=1.234,
+ attribute_integer=-2,
+ attribute_boolean=True,
+ wrapped_array=[
+ 1,
+ ],
+ name_string="string",
+ name_number=1.234,
+ name_integer=-2,
+ name_boolean=True,
+ name_array=[
+ 1,
+ ],
+ name_wrapped_array=[
+ 1,
+ ],
+ prefix_string="string",
+ prefix_number=1.234,
+ prefix_integer=-2,
+ prefix_boolean=True,
+ prefix_array=[
+ 1,
+ ],
+ prefix_wrapped_array=[
+ 1,
+ ],
+ namespace_string="string",
+ namespace_number=1.234,
+ namespace_integer=-2,
+ namespace_boolean=True,
+ namespace_array=[
+ 1,
+ ],
+ namespace_wrapped_array=[
+ 1,
+ ],
+ prefix_ns_string="string",
+ prefix_ns_number=1.234,
+ prefix_ns_integer=-2,
+ prefix_ns_boolean=True,
+ prefix_ns_array=[
+ 1,
+ ],
+ prefix_ns_wrapped_array=[
+ 1,
+ ],
+ ) # XmlItem | XmlItem Body
+
+ # example passing only required values which don't have defaults set
+ try:
+ # creates an XmlItem
+ api_instance.create_xml_item(xml_item)
+ except petstore_api.ApiException as e:
+ print("Exception when calling FakeApi->create_xml_item: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **xml_item** | [**XmlItem**](XmlItem.md)| XmlItem Body |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/xml, application/xml; charset=utf-8, application/xml; charset=utf-16, text/xml, text/xml; charset=utf-8, text/xml; charset=utf-16
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | successful operation | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **number_with_validations**
+> NumberWithValidations number_with_validations()
+
+
+
+Test serialization of outer number types
+
+### Example
+
+```python
+import time
+import petstore_api
+from petstore_api.api import fake_api
+from petstore_api.model.number_with_validations import NumberWithValidations
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient() as api_client:
+ # Create an instance of the API class
+ api_instance = fake_api.FakeApi(api_client)
+ body = NumberWithValidations(1E+1) # NumberWithValidations | Input number as post body (optional)
+
+ # example passing only required values which don't have defaults set
+ # and optional values
+ try:
+ api_response = api_instance.number_with_validations(body=body)
+ pprint(api_response)
+ except petstore_api.ApiException as e:
+ print("Exception when calling FakeApi->number_with_validations: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**NumberWithValidations**](NumberWithValidations.md)| Input number as post body | [optional]
+
+### Return type
+
+[**NumberWithValidations**](NumberWithValidations.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: */*
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Output number | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **object_model_with_ref_props**
+> ObjectModelWithRefProps object_model_with_ref_props()
+
+
+
+Test serialization of object with $refed properties
+
+### Example
+
+```python
+import time
+import petstore_api
+from petstore_api.api import fake_api
+from petstore_api.model.object_model_with_ref_props import ObjectModelWithRefProps
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient() as api_client:
+ # Create an instance of the API class
+ api_instance = fake_api.FakeApi(api_client)
+ body = ObjectModelWithRefProps(
+ my_number=NumberWithValidations(1E+1),
+ my_string="my_string_example",
+ my_boolean=True,
+ ) # ObjectModelWithRefProps | Input model (optional)
+
+ # example passing only required values which don't have defaults set
+ # and optional values
+ try:
+ api_response = api_instance.object_model_with_ref_props(body=body)
+ pprint(api_response)
+ except petstore_api.ApiException as e:
+ print("Exception when calling FakeApi->object_model_with_ref_props: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**ObjectModelWithRefProps**](ObjectModelWithRefProps.md)| Input model | [optional]
+
+### Return type
+
+[**ObjectModelWithRefProps**](ObjectModelWithRefProps.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: */*
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Output model | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **string**
+> str string()
+
+
+
+Test serialization of outer string types
+
+### Example
+
+```python
+import time
+import petstore_api
+from petstore_api.api import fake_api
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient() as api_client:
+ # Create an instance of the API class
+ api_instance = fake_api.FakeApi(api_client)
+ body = "body_example" # str | Input string as post body (optional)
+
+ # example passing only required values which don't have defaults set
+ # and optional values
+ try:
+ api_response = api_instance.string(body=body)
+ pprint(api_response)
+ except petstore_api.ApiException as e:
+ print("Exception when calling FakeApi->string: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | **str**| Input string as post body | [optional]
+
+### Return type
+
+**str**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: */*
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Output string | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **string_enum**
+> StringEnum string_enum()
+
+
+
+Test serialization of outer enum
+
+### Example
+
+```python
+import time
+import petstore_api
+from petstore_api.api import fake_api
+from petstore_api.model.string_enum import StringEnum
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient() as api_client:
+ # Create an instance of the API class
+ api_instance = fake_api.FakeApi(api_client)
+ body = StringEnum("placed") # StringEnum | Input enum (optional)
+
+ # example passing only required values which don't have defaults set
+ # and optional values
+ try:
+ api_response = api_instance.string_enum(body=body)
+ pprint(api_response)
+ except petstore_api.ApiException as e:
+ print("Exception when calling FakeApi->string_enum: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**StringEnum**](StringEnum.md)| Input enum | [optional]
+
+### Return type
+
+[**StringEnum**](StringEnum.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: */*
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Output enum | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **test_body_with_file_schema**
+> test_body_with_file_schema(body)
+
+
+
+For this test, the body for this request much reference a schema named `File`.
+
+### Example
+
+```python
+import time
+import petstore_api
+from petstore_api.api import fake_api
+from petstore_api.model.file_schema_test_class import FileSchemaTestClass
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient() as api_client:
+ # Create an instance of the API class
+ api_instance = fake_api.FakeApi(api_client)
+ body = FileSchemaTestClass(
+ file=File(
+ source_uri="source_uri_example",
+ ),
+ files=[
+ File(
+ source_uri="source_uri_example",
+ ),
+ ],
+ ) # FileSchemaTestClass |
+
+ # example passing only required values which don't have defaults set
+ try:
+ api_instance.test_body_with_file_schema(body)
+ except petstore_api.ApiException as e:
+ print("Exception when calling FakeApi->test_body_with_file_schema: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**FileSchemaTestClass**](FileSchemaTestClass.md)| |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Success | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **test_body_with_query_params**
+> test_body_with_query_params(query, body)
+
+
+
+### Example
+
+```python
+import time
+import petstore_api
+from petstore_api.api import fake_api
+from petstore_api.model.user import User
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient() as api_client:
+ # Create an instance of the API class
+ api_instance = fake_api.FakeApi(api_client)
+ query = "query_example" # str |
+ body = User(
+ id=1,
+ username="username_example",
+ first_name="first_name_example",
+ last_name="last_name_example",
+ email="email_example",
+ password="password_example",
+ phone="phone_example",
+ user_status=1,
+ ) # User |
+
+ # example passing only required values which don't have defaults set
+ try:
+ api_instance.test_body_with_query_params(query, body)
+ except petstore_api.ApiException as e:
+ print("Exception when calling FakeApi->test_body_with_query_params: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **query** | **str**| |
+ **body** | [**User**](User.md)| |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Success | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **test_client_model**
+> Client test_client_model(body)
+
+To test \"client\" model
+
+To test \"client\" model
+
+### Example
+
+```python
+import time
+import petstore_api
+from petstore_api.api import fake_api
+from petstore_api.model.client import Client
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient() as api_client:
+ # Create an instance of the API class
+ api_instance = fake_api.FakeApi(api_client)
+ body = Client(
+ client="client_example",
+ ) # Client | client model
+
+ # example passing only required values which don't have defaults set
+ try:
+ # To test \"client\" model
+ api_response = api_instance.test_client_model(body)
+ pprint(api_response)
+ except petstore_api.ApiException as e:
+ print("Exception when calling FakeApi->test_client_model: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**Client**](Client.md)| client model |
+
+### Return type
+
+[**Client**](Client.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | successful operation | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **test_endpoint_enums_length_one**
+> test_endpoint_enums_length_one()
+
+
+
+This route has required values with enums of 1
+
+### Example
+
+```python
+import time
+import petstore_api
+from petstore_api.api import fake_api
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient() as api_client:
+ # Create an instance of the API class
+ api_instance = fake_api.FakeApi(api_client)
+
+ # example passing only required values which don't have defaults set
+ try:
+ api_instance.test_endpoint_enums_length_one()
+ except petstore_api.ApiException as e:
+ print("Exception when calling FakeApi->test_endpoint_enums_length_one: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **query_integer** | **int**| | defaults to 3
+ **query_string** | **str**| | defaults to "brillig"
+ **path_string** | **str**| | defaults to "hello"
+ **path_integer** | **int**| | defaults to 34
+ **header_number** | **float**| | defaults to 1.234
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | Success | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **test_endpoint_parameters**
+> test_endpoint_parameters(number, double, pattern_without_delimiter, byte)
+
+Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+
+Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+
+### Example
+
+* Basic Authentication (http_basic_test):
+```python
+import time
+import petstore_api
+from petstore_api.api import fake_api
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure HTTP basic authorization: http_basic_test
+configuration = petstore_api.Configuration(
+ username = 'YOUR_USERNAME',
+ password = 'YOUR_PASSWORD'
+)
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = fake_api.FakeApi(api_client)
+ number = 32.1 # float | None
+ double = 67.8 # float | None
+ pattern_without_delimiter = "Aj" # str | None
+ byte = 'YQ==' # str | None
+ integer = 10 # int | None (optional)
+ int32 = 20 # int | None (optional)
+ int64 = 1 # int | None (optional)
+ float = 3.14 # float | None (optional)
+ string = "A" # str | None (optional)
+ binary = open('/path/to/file', 'rb') # file_type | None (optional)
+ date = dateutil_parser('1970-01-01').date() # date | None (optional)
+ date_time = dateutil_parser('1970-01-01T00:00:00.00Z') # datetime | None (optional)
+ password = "password_example" # str | None (optional)
+ param_callback = "param_callback_example" # str | None (optional)
+
+ # example passing only required values which don't have defaults set
+ try:
+ # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte)
+ except petstore_api.ApiException as e:
+ print("Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e)
+
+ # example passing only required values which don't have defaults set
+ # and optional values
+ try:
+ # Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트
+ api_instance.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, integer=integer, int32=int32, int64=int64, float=float, string=string, binary=binary, date=date, date_time=date_time, password=password, param_callback=param_callback)
+ except petstore_api.ApiException as e:
+ print("Exception when calling FakeApi->test_endpoint_parameters: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **number** | **float**| None |
+ **double** | **float**| None |
+ **pattern_without_delimiter** | **str**| None |
+ **byte** | **str**| None |
+ **integer** | **int**| None | [optional]
+ **int32** | **int**| None | [optional]
+ **int64** | **int**| None | [optional]
+ **float** | **float**| None | [optional]
+ **string** | **str**| None | [optional]
+ **binary** | **file_type**| None | [optional]
+ **date** | **date**| None | [optional]
+ **date_time** | **datetime**| None | [optional]
+ **password** | **str**| None | [optional]
+ **param_callback** | **str**| None | [optional]
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[http_basic_test](../README.md#http_basic_test)
+
+### HTTP request headers
+
+ - **Content-Type**: application/x-www-form-urlencoded
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**400** | Invalid username supplied | - |
+**404** | User not found | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **test_enum_parameters**
+> test_enum_parameters()
+
+To test enum parameters
+
+To test enum parameters
+
+### Example
+
+```python
+import time
+import petstore_api
+from petstore_api.api import fake_api
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient() as api_client:
+ # Create an instance of the API class
+ api_instance = fake_api.FakeApi(api_client)
+ enum_header_string_array = [
+ "$",
+ ] # [str] | Header parameter enum test (string array) (optional)
+ enum_header_string = "-efg" # str | Header parameter enum test (string) (optional) if omitted the server will use the default value of "-efg"
+ enum_query_string_array = [
+ "$",
+ ] # [str] | Query parameter enum test (string array) (optional)
+ enum_query_string = "-efg" # str | Query parameter enum test (string) (optional) if omitted the server will use the default value of "-efg"
+ enum_query_integer = 1 # int | Query parameter enum test (double) (optional)
+ enum_query_double = 1.1 # float | Query parameter enum test (double) (optional)
+ enum_form_string_array = "$" # [str] | Form parameter enum test (string array) (optional) if omitted the server will use the default value of "$"
+ enum_form_string = "-efg" # str | Form parameter enum test (string) (optional) if omitted the server will use the default value of "-efg"
+
+ # example passing only required values which don't have defaults set
+ # and optional values
+ try:
+ # To test enum parameters
+ api_instance.test_enum_parameters(enum_header_string_array=enum_header_string_array, enum_header_string=enum_header_string, enum_query_string_array=enum_query_string_array, enum_query_string=enum_query_string, enum_query_integer=enum_query_integer, enum_query_double=enum_query_double, enum_form_string_array=enum_form_string_array, enum_form_string=enum_form_string)
+ except petstore_api.ApiException as e:
+ print("Exception when calling FakeApi->test_enum_parameters: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **enum_header_string_array** | **[str]**| Header parameter enum test (string array) | [optional]
+ **enum_header_string** | **str**| Header parameter enum test (string) | [optional] if omitted the server will use the default value of "-efg"
+ **enum_query_string_array** | **[str]**| Query parameter enum test (string array) | [optional]
+ **enum_query_string** | **str**| Query parameter enum test (string) | [optional] if omitted the server will use the default value of "-efg"
+ **enum_query_integer** | **int**| Query parameter enum test (double) | [optional]
+ **enum_query_double** | **float**| Query parameter enum test (double) | [optional]
+ **enum_form_string_array** | **[str]**| Form parameter enum test (string array) | [optional] if omitted the server will use the default value of "$"
+ **enum_form_string** | **str**| Form parameter enum test (string) | [optional] if omitted the server will use the default value of "-efg"
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/x-www-form-urlencoded
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**400** | Invalid request | - |
+**404** | Not found | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **test_group_parameters**
+> test_group_parameters(required_string_group, required_boolean_group, required_int64_group)
+
+Fake endpoint to test group parameters (optional)
+
+Fake endpoint to test group parameters (optional)
+
+### Example
+
+```python
+import time
+import petstore_api
+from petstore_api.api import fake_api
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient() as api_client:
+ # Create an instance of the API class
+ api_instance = fake_api.FakeApi(api_client)
+ required_string_group = 1 # int | Required String in group parameters
+ required_boolean_group = True # bool | Required Boolean in group parameters
+ required_int64_group = 1 # int | Required Integer in group parameters
+ string_group = 1 # int | String in group parameters (optional)
+ boolean_group = True # bool | Boolean in group parameters (optional)
+ int64_group = 1 # int | Integer in group parameters (optional)
+
+ # example passing only required values which don't have defaults set
+ try:
+ # Fake endpoint to test group parameters (optional)
+ api_instance.test_group_parameters(required_string_group, required_boolean_group, required_int64_group)
+ except petstore_api.ApiException as e:
+ print("Exception when calling FakeApi->test_group_parameters: %s\n" % e)
+
+ # example passing only required values which don't have defaults set
+ # and optional values
+ try:
+ # Fake endpoint to test group parameters (optional)
+ api_instance.test_group_parameters(required_string_group, required_boolean_group, required_int64_group, string_group=string_group, boolean_group=boolean_group, int64_group=int64_group)
+ except petstore_api.ApiException as e:
+ print("Exception when calling FakeApi->test_group_parameters: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **required_string_group** | **int**| Required String in group parameters |
+ **required_boolean_group** | **bool**| Required Boolean in group parameters |
+ **required_int64_group** | **int**| Required Integer in group parameters |
+ **string_group** | **int**| String in group parameters | [optional]
+ **boolean_group** | **bool**| Boolean in group parameters | [optional]
+ **int64_group** | **int**| Integer in group parameters | [optional]
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**400** | Someting wrong | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **test_inline_additional_properties**
+> test_inline_additional_properties(param)
+
+test inline additionalProperties
+
+### Example
+
+```python
+import time
+import petstore_api
+from petstore_api.api import fake_api
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient() as api_client:
+ # Create an instance of the API class
+ api_instance = fake_api.FakeApi(api_client)
+ param = {
+ "key": "key_example",
+ } # {str: (str,)} | request body
+
+ # example passing only required values which don't have defaults set
+ try:
+ # test inline additionalProperties
+ api_instance.test_inline_additional_properties(param)
+ except petstore_api.ApiException as e:
+ print("Exception when calling FakeApi->test_inline_additional_properties: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **param** | **{str: (str,)}**| request body |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | successful operation | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **test_json_form_data**
+> test_json_form_data(param, param2)
+
+test json serialization of form data
+
+### Example
+
+```python
+import time
+import petstore_api
+from petstore_api.api import fake_api
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient() as api_client:
+ # Create an instance of the API class
+ api_instance = fake_api.FakeApi(api_client)
+ param = "param_example" # str | field1
+ param2 = "param2_example" # str | field2
+
+ # example passing only required values which don't have defaults set
+ try:
+ # test json serialization of form data
+ api_instance.test_json_form_data(param, param2)
+ except petstore_api.ApiException as e:
+ print("Exception when calling FakeApi->test_json_form_data: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **param** | **str**| field1 |
+ **param2** | **str**| field2 |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: application/x-www-form-urlencoded
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | successful operation | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/FakeClassnameTags123Api.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/FakeClassnameTags123Api.md
new file mode 100644
index 00000000000..3452fd6ddff
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/FakeClassnameTags123Api.md
@@ -0,0 +1,87 @@
+# petstore_api.FakeClassnameTags123Api
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**test_classname**](FakeClassnameTags123Api.md#test_classname) | **PATCH** /fake_classname_test | To test class name in snake case
+
+
+# **test_classname**
+> Client test_classname(body)
+
+To test class name in snake case
+
+To test class name in snake case
+
+### Example
+
+* Api Key Authentication (api_key_query):
+```python
+import time
+import petstore_api
+from petstore_api.api import fake_classname_tags_123_api
+from petstore_api.model.client import Client
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: api_key_query
+configuration.api_key['api_key_query'] = 'YOUR_API_KEY'
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['api_key_query'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = fake_classname_tags_123_api.FakeClassnameTags123Api(api_client)
+ body = Client(
+ client="client_example",
+ ) # Client | client model
+
+ # example passing only required values which don't have defaults set
+ try:
+ # To test class name in snake case
+ api_response = api_instance.test_classname(body)
+ pprint(api_response)
+ except petstore_api.ApiException as e:
+ print("Exception when calling FakeClassnameTags123Api->test_classname: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**Client**](Client.md)| client model |
+
+### Return type
+
+[**Client**](Client.md)
+
+### Authorization
+
+[api_key_query](../README.md#api_key_query)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json
+ - **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | successful operation | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/File.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/File.md
new file mode 100644
index 00000000000..63b1d1a6518
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/File.md
@@ -0,0 +1,12 @@
+# File
+
+Must be named `File` for test.
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**source_uri** | **str** | Test capitalization | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/FileSchemaTestClass.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/FileSchemaTestClass.md
new file mode 100644
index 00000000000..caf2440821d
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/FileSchemaTestClass.md
@@ -0,0 +1,12 @@
+# FileSchemaTestClass
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**file** | [**File**](File.md) | | [optional]
+**files** | [**[File]**](File.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/FormatTest.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/FormatTest.md
new file mode 100644
index 00000000000..aef09bfcc83
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/FormatTest.md
@@ -0,0 +1,23 @@
+# FormatTest
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**number** | **float** | |
+**byte** | **str** | |
+**date** | **date** | |
+**password** | **str** | |
+**integer** | **int** | | [optional]
+**int32** | **int** | | [optional]
+**int64** | **int** | | [optional]
+**float** | **float** | | [optional]
+**double** | **float** | | [optional]
+**string** | **str** | | [optional]
+**binary** | **file_type** | | [optional]
+**date_time** | **datetime** | | [optional]
+**uuid** | **str** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Grandparent.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Grandparent.md
new file mode 100644
index 00000000000..b6d80a71945
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Grandparent.md
@@ -0,0 +1,11 @@
+# Grandparent
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**radio_waves** | **bool** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/GrandparentAnimal.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/GrandparentAnimal.md
new file mode 100644
index 00000000000..15db0708bb1
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/GrandparentAnimal.md
@@ -0,0 +1,11 @@
+# GrandparentAnimal
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**pet_type** | **str** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/HasOnlyReadOnly.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/HasOnlyReadOnly.md
new file mode 100644
index 00000000000..0e1334519a8
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/HasOnlyReadOnly.md
@@ -0,0 +1,12 @@
+# HasOnlyReadOnly
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**bar** | **str** | | [optional] [readonly]
+**foo** | **str** | | [optional] [readonly]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/List.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/List.md
new file mode 100644
index 00000000000..4b60956971a
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/List.md
@@ -0,0 +1,11 @@
+# List
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**_123_list** | **str** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/MapTest.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/MapTest.md
new file mode 100644
index 00000000000..15228ee1f28
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/MapTest.md
@@ -0,0 +1,14 @@
+# MapTest
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**map_map_of_string** | **{str: ({str: (str,)},)}** | | [optional]
+**map_of_enum_string** | **{str: (str,)}** | | [optional]
+**direct_map** | **{str: (bool,)}** | | [optional]
+**indirect_map** | [**StringBooleanMap**](StringBooleanMap.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/MixedPropertiesAndAdditionalPropertiesClass.md
new file mode 100644
index 00000000000..f489944a20a
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/MixedPropertiesAndAdditionalPropertiesClass.md
@@ -0,0 +1,13 @@
+# MixedPropertiesAndAdditionalPropertiesClass
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**uuid** | **str** | | [optional]
+**date_time** | **datetime** | | [optional]
+**map** | [**{str: (Animal,)}**](Animal.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Model200Response.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Model200Response.md
new file mode 100644
index 00000000000..c958bd4b33f
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Model200Response.md
@@ -0,0 +1,13 @@
+# Model200Response
+
+Model for testing model name starting with number
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **int** | | [optional]
+**_class** | **str** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ModelReturn.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ModelReturn.md
new file mode 100644
index 00000000000..043e9d466fa
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ModelReturn.md
@@ -0,0 +1,12 @@
+# ModelReturn
+
+Model for testing reserved words
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**_return** | **int** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Name.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Name.md
new file mode 100644
index 00000000000..3be719cdbfb
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Name.md
@@ -0,0 +1,15 @@
+# Name
+
+Model for testing model name same as property name
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **int** | |
+**snake_case** | **int** | | [optional] [readonly]
+**_property** | **str** | | [optional]
+**_123_number** | **int** | | [optional] [readonly]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/NumberOnly.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/NumberOnly.md
new file mode 100644
index 00000000000..37195c5d899
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/NumberOnly.md
@@ -0,0 +1,11 @@
+# NumberOnly
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**just_number** | **float** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/NumberWithValidations.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/NumberWithValidations.md
new file mode 100644
index 00000000000..119e0f67823
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/NumberWithValidations.md
@@ -0,0 +1,11 @@
+# NumberWithValidations
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**value** | **float** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ObjectModelWithRefProps.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ObjectModelWithRefProps.md
new file mode 100644
index 00000000000..5ff4e52033d
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ObjectModelWithRefProps.md
@@ -0,0 +1,14 @@
+# ObjectModelWithRefProps
+
+a model that includes properties which should stay primitive (String + Boolean) and one which is defined as a class, NumberWithValidations
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**my_number** | [**NumberWithValidations**](NumberWithValidations.md) | | [optional]
+**my_string** | **str** | | [optional]
+**my_boolean** | **bool** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Order.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Order.md
new file mode 100644
index 00000000000..d29e1a381de
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Order.md
@@ -0,0 +1,16 @@
+# Order
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **int** | | [optional]
+**pet_id** | **int** | | [optional]
+**quantity** | **int** | | [optional]
+**ship_date** | **datetime** | | [optional]
+**status** | **str** | Order Status | [optional]
+**complete** | **bool** | | [optional] if omitted the server will use the default value of False
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Parent.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Parent.md
new file mode 100644
index 00000000000..9d3f02d68b3
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Parent.md
@@ -0,0 +1,12 @@
+# Parent
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**radio_waves** | **bool** | | [optional]
+**tele_vision** | **bool** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ParentAllOf.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ParentAllOf.md
new file mode 100644
index 00000000000..569a5e4af14
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ParentAllOf.md
@@ -0,0 +1,11 @@
+# ParentAllOf
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**tele_vision** | **bool** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ParentPet.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ParentPet.md
new file mode 100644
index 00000000000..09e409c8fcf
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ParentPet.md
@@ -0,0 +1,11 @@
+# ParentPet
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**pet_type** | **str** | |
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Pet.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Pet.md
new file mode 100644
index 00000000000..6e78495272e
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Pet.md
@@ -0,0 +1,16 @@
+# Pet
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | |
+**photo_urls** | **[str]** | |
+**id** | **int** | | [optional]
+**category** | [**Category**](Category.md) | | [optional]
+**tags** | [**[Tag]**](Tag.md) | | [optional]
+**status** | **str** | pet status in the store | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/PetApi.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/PetApi.md
new file mode 100644
index 00000000000..dcff2fcd072
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/PetApi.md
@@ -0,0 +1,782 @@
+# petstore_api.PetApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**add_pet**](PetApi.md#add_pet) | **POST** /pet | Add a new pet to the store
+[**delete_pet**](PetApi.md#delete_pet) | **DELETE** /pet/{petId} | Deletes a pet
+[**find_pets_by_status**](PetApi.md#find_pets_by_status) | **GET** /pet/findByStatus | Finds Pets by status
+[**find_pets_by_tags**](PetApi.md#find_pets_by_tags) | **GET** /pet/findByTags | Finds Pets by tags
+[**get_pet_by_id**](PetApi.md#get_pet_by_id) | **GET** /pet/{petId} | Find pet by ID
+[**update_pet**](PetApi.md#update_pet) | **PUT** /pet | Update an existing pet
+[**update_pet_with_form**](PetApi.md#update_pet_with_form) | **POST** /pet/{petId} | Updates a pet in the store with form data
+[**upload_file**](PetApi.md#upload_file) | **POST** /pet/{petId}/uploadImage | uploads an image
+[**upload_file_with_required_file**](PetApi.md#upload_file_with_required_file) | **POST** /fake/{petId}/uploadImageWithRequiredFile | uploads an image (required)
+
+
+# **add_pet**
+> add_pet(body)
+
+Add a new pet to the store
+
+### Example
+
+* OAuth Authentication (petstore_auth):
+```python
+import time
+import petstore_api
+from petstore_api.api import pet_api
+from petstore_api.model.pet import Pet
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure OAuth2 access token for authorization: petstore_auth
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = pet_api.PetApi(api_client)
+ body = Pet(
+ id=1,
+ category=Category(
+ id=1,
+ name="default-name",
+ ),
+ name="doggie",
+ photo_urls=[
+ "photo_urls_example",
+ ],
+ tags=[
+ Tag(
+ id=1,
+ name="name_example",
+ full_name="full_name_example",
+ ),
+ ],
+ status="available",
+ ) # Pet | Pet object that needs to be added to the store
+
+ # example passing only required values which don't have defaults set
+ try:
+ # Add a new pet to the store
+ api_instance.add_pet(body)
+ except petstore_api.ApiException as e:
+ print("Exception when calling PetApi->add_pet: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json, application/xml
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | successful operation | - |
+**405** | Invalid input | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **delete_pet**
+> delete_pet(pet_id)
+
+Deletes a pet
+
+### Example
+
+* OAuth Authentication (petstore_auth):
+```python
+import time
+import petstore_api
+from petstore_api.api import pet_api
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure OAuth2 access token for authorization: petstore_auth
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = pet_api.PetApi(api_client)
+ pet_id = 1 # int | Pet id to delete
+ api_key = "api_key_example" # str | (optional)
+
+ # example passing only required values which don't have defaults set
+ try:
+ # Deletes a pet
+ api_instance.delete_pet(pet_id)
+ except petstore_api.ApiException as e:
+ print("Exception when calling PetApi->delete_pet: %s\n" % e)
+
+ # example passing only required values which don't have defaults set
+ # and optional values
+ try:
+ # Deletes a pet
+ api_instance.delete_pet(pet_id, api_key=api_key)
+ except petstore_api.ApiException as e:
+ print("Exception when calling PetApi->delete_pet: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **pet_id** | **int**| Pet id to delete |
+ **api_key** | **str**| | [optional]
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | successful operation | - |
+**400** | Invalid pet value | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **find_pets_by_status**
+> [Pet] find_pets_by_status(status)
+
+Finds Pets by status
+
+Multiple status values can be provided with comma separated strings
+
+### Example
+
+* OAuth Authentication (petstore_auth):
+```python
+import time
+import petstore_api
+from petstore_api.api import pet_api
+from petstore_api.model.pet import Pet
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure OAuth2 access token for authorization: petstore_auth
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = pet_api.PetApi(api_client)
+ status = [
+ "available",
+ ] # [str] | Status values that need to be considered for filter
+
+ # example passing only required values which don't have defaults set
+ try:
+ # Finds Pets by status
+ api_response = api_instance.find_pets_by_status(status)
+ pprint(api_response)
+ except petstore_api.ApiException as e:
+ print("Exception when calling PetApi->find_pets_by_status: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **status** | **[str]**| Status values that need to be considered for filter |
+
+### Return type
+
+[**[Pet]**](Pet.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/xml, application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | successful operation | - |
+**400** | Invalid status value | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **find_pets_by_tags**
+> [Pet] find_pets_by_tags(tags)
+
+Finds Pets by tags
+
+Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing.
+
+### Example
+
+* OAuth Authentication (petstore_auth):
+```python
+import time
+import petstore_api
+from petstore_api.api import pet_api
+from petstore_api.model.pet import Pet
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure OAuth2 access token for authorization: petstore_auth
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = pet_api.PetApi(api_client)
+ tags = [
+ "tags_example",
+ ] # [str] | Tags to filter by
+
+ # example passing only required values which don't have defaults set
+ try:
+ # Finds Pets by tags
+ api_response = api_instance.find_pets_by_tags(tags)
+ pprint(api_response)
+ except petstore_api.ApiException as e:
+ print("Exception when calling PetApi->find_pets_by_tags: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **tags** | **[str]**| Tags to filter by |
+
+### Return type
+
+[**[Pet]**](Pet.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/xml, application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | successful operation | - |
+**400** | Invalid tag value | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **get_pet_by_id**
+> Pet get_pet_by_id(pet_id)
+
+Find pet by ID
+
+Returns a single pet
+
+### Example
+
+* Api Key Authentication (api_key):
+```python
+import time
+import petstore_api
+from petstore_api.api import pet_api
+from petstore_api.model.pet import Pet
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: api_key
+configuration.api_key['api_key'] = 'YOUR_API_KEY'
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['api_key'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = pet_api.PetApi(api_client)
+ pet_id = 1 # int | ID of pet to return
+
+ # example passing only required values which don't have defaults set
+ try:
+ # Find pet by ID
+ api_response = api_instance.get_pet_by_id(pet_id)
+ pprint(api_response)
+ except petstore_api.ApiException as e:
+ print("Exception when calling PetApi->get_pet_by_id: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **pet_id** | **int**| ID of pet to return |
+
+### Return type
+
+[**Pet**](Pet.md)
+
+### Authorization
+
+[api_key](../README.md#api_key)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/xml, application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | successful operation | - |
+**400** | Invalid ID supplied | - |
+**404** | Pet not found | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **update_pet**
+> update_pet(body)
+
+Update an existing pet
+
+### Example
+
+* OAuth Authentication (petstore_auth):
+```python
+import time
+import petstore_api
+from petstore_api.api import pet_api
+from petstore_api.model.pet import Pet
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure OAuth2 access token for authorization: petstore_auth
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = pet_api.PetApi(api_client)
+ body = Pet(
+ id=1,
+ category=Category(
+ id=1,
+ name="default-name",
+ ),
+ name="doggie",
+ photo_urls=[
+ "photo_urls_example",
+ ],
+ tags=[
+ Tag(
+ id=1,
+ name="name_example",
+ full_name="full_name_example",
+ ),
+ ],
+ status="available",
+ ) # Pet | Pet object that needs to be added to the store
+
+ # example passing only required values which don't have defaults set
+ try:
+ # Update an existing pet
+ api_instance.update_pet(body)
+ except petstore_api.ApiException as e:
+ print("Exception when calling PetApi->update_pet: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**Pet**](Pet.md)| Pet object that needs to be added to the store |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: application/json, application/xml
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | successful operation | - |
+**400** | Invalid ID supplied | - |
+**404** | Pet not found | - |
+**405** | Validation exception | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **update_pet_with_form**
+> update_pet_with_form(pet_id)
+
+Updates a pet in the store with form data
+
+### Example
+
+* OAuth Authentication (petstore_auth):
+```python
+import time
+import petstore_api
+from petstore_api.api import pet_api
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure OAuth2 access token for authorization: petstore_auth
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = pet_api.PetApi(api_client)
+ pet_id = 1 # int | ID of pet that needs to be updated
+ name = "name_example" # str | Updated name of the pet (optional)
+ status = "status_example" # str | Updated status of the pet (optional)
+
+ # example passing only required values which don't have defaults set
+ try:
+ # Updates a pet in the store with form data
+ api_instance.update_pet_with_form(pet_id)
+ except petstore_api.ApiException as e:
+ print("Exception when calling PetApi->update_pet_with_form: %s\n" % e)
+
+ # example passing only required values which don't have defaults set
+ # and optional values
+ try:
+ # Updates a pet in the store with form data
+ api_instance.update_pet_with_form(pet_id, name=name, status=status)
+ except petstore_api.ApiException as e:
+ print("Exception when calling PetApi->update_pet_with_form: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **pet_id** | **int**| ID of pet that needs to be updated |
+ **name** | **str**| Updated name of the pet | [optional]
+ **status** | **str**| Updated status of the pet | [optional]
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: application/x-www-form-urlencoded
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**405** | Invalid input | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **upload_file**
+> ApiResponse upload_file(pet_id)
+
+uploads an image
+
+### Example
+
+* OAuth Authentication (petstore_auth):
+```python
+import time
+import petstore_api
+from petstore_api.api import pet_api
+from petstore_api.model.api_response import ApiResponse
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure OAuth2 access token for authorization: petstore_auth
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = pet_api.PetApi(api_client)
+ pet_id = 1 # int | ID of pet to update
+ additional_metadata = "additional_metadata_example" # str | Additional data to pass to server (optional)
+ file = open('/path/to/file', 'rb') # file_type | file to upload (optional)
+ files = # [file_type] | files to upload (optional)
+
+ # example passing only required values which don't have defaults set
+ try:
+ # uploads an image
+ api_response = api_instance.upload_file(pet_id)
+ pprint(api_response)
+ except petstore_api.ApiException as e:
+ print("Exception when calling PetApi->upload_file: %s\n" % e)
+
+ # example passing only required values which don't have defaults set
+ # and optional values
+ try:
+ # uploads an image
+ api_response = api_instance.upload_file(pet_id, additional_metadata=additional_metadata, file=file, files=files)
+ pprint(api_response)
+ except petstore_api.ApiException as e:
+ print("Exception when calling PetApi->upload_file: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **pet_id** | **int**| ID of pet to update |
+ **additional_metadata** | **str**| Additional data to pass to server | [optional]
+ **file** | **file_type**| file to upload | [optional]
+ **files** | **[file_type]**| files to upload | [optional]
+
+### Return type
+
+[**ApiResponse**](ApiResponse.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: multipart/form-data
+ - **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | successful operation | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **upload_file_with_required_file**
+> ApiResponse upload_file_with_required_file(pet_id, required_file)
+
+uploads an image (required)
+
+### Example
+
+* OAuth Authentication (petstore_auth):
+```python
+import time
+import petstore_api
+from petstore_api.api import pet_api
+from petstore_api.model.api_response import ApiResponse
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure OAuth2 access token for authorization: petstore_auth
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+configuration.access_token = 'YOUR_ACCESS_TOKEN'
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = pet_api.PetApi(api_client)
+ pet_id = 1 # int | ID of pet to update
+ required_file = open('/path/to/file', 'rb') # file_type | file to upload
+ additional_metadata = "additional_metadata_example" # str | Additional data to pass to server (optional)
+
+ # example passing only required values which don't have defaults set
+ try:
+ # uploads an image (required)
+ api_response = api_instance.upload_file_with_required_file(pet_id, required_file)
+ pprint(api_response)
+ except petstore_api.ApiException as e:
+ print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e)
+
+ # example passing only required values which don't have defaults set
+ # and optional values
+ try:
+ # uploads an image (required)
+ api_response = api_instance.upload_file_with_required_file(pet_id, required_file, additional_metadata=additional_metadata)
+ pprint(api_response)
+ except petstore_api.ApiException as e:
+ print("Exception when calling PetApi->upload_file_with_required_file: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **pet_id** | **int**| ID of pet to update |
+ **required_file** | **file_type**| file to upload |
+ **additional_metadata** | **str**| Additional data to pass to server | [optional]
+
+### Return type
+
+[**ApiResponse**](ApiResponse.md)
+
+### Authorization
+
+[petstore_auth](../README.md#petstore_auth)
+
+### HTTP request headers
+
+ - **Content-Type**: multipart/form-data
+ - **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | successful operation | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Player.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Player.md
new file mode 100644
index 00000000000..2014198aa1b
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Player.md
@@ -0,0 +1,12 @@
+# Player
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**name** | **str** | |
+**enemy_player** | [**Player**](Player.md) | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ReadOnlyFirst.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ReadOnlyFirst.md
new file mode 100644
index 00000000000..53b4c61d844
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/ReadOnlyFirst.md
@@ -0,0 +1,12 @@
+# ReadOnlyFirst
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**bar** | **str** | | [optional] [readonly]
+**baz** | **str** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/SpecialModelName.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/SpecialModelName.md
new file mode 100644
index 00000000000..268e1134192
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/SpecialModelName.md
@@ -0,0 +1,11 @@
+# SpecialModelName
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**special_property_name** | **int** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/StoreApi.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/StoreApi.md
new file mode 100644
index 00000000000..b5df4fc1fee
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/StoreApi.md
@@ -0,0 +1,285 @@
+# petstore_api.StoreApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**delete_order**](StoreApi.md#delete_order) | **DELETE** /store/order/{order_id} | Delete purchase order by ID
+[**get_inventory**](StoreApi.md#get_inventory) | **GET** /store/inventory | Returns pet inventories by status
+[**get_order_by_id**](StoreApi.md#get_order_by_id) | **GET** /store/order/{order_id} | Find purchase order by ID
+[**place_order**](StoreApi.md#place_order) | **POST** /store/order | Place an order for a pet
+
+
+# **delete_order**
+> delete_order(order_id)
+
+Delete purchase order by ID
+
+For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
+
+### Example
+
+```python
+import time
+import petstore_api
+from petstore_api.api import store_api
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient() as api_client:
+ # Create an instance of the API class
+ api_instance = store_api.StoreApi(api_client)
+ order_id = "order_id_example" # str | ID of the order that needs to be deleted
+
+ # example passing only required values which don't have defaults set
+ try:
+ # Delete purchase order by ID
+ api_instance.delete_order(order_id)
+ except petstore_api.ApiException as e:
+ print("Exception when calling StoreApi->delete_order: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **order_id** | **str**| ID of the order that needs to be deleted |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**400** | Invalid ID supplied | - |
+**404** | Order not found | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **get_inventory**
+> {str: (int,)} get_inventory()
+
+Returns pet inventories by status
+
+Returns a map of status codes to quantities
+
+### Example
+
+* Api Key Authentication (api_key):
+```python
+import time
+import petstore_api
+from petstore_api.api import store_api
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+# The client must configure the authentication and authorization parameters
+# in accordance with the API server security policy.
+# Examples for each auth method are provided below, use the example that
+# satisfies your auth use case.
+
+# Configure API key authorization: api_key
+configuration.api_key['api_key'] = 'YOUR_API_KEY'
+
+# Uncomment below to setup prefix (e.g. Bearer) for API key, if needed
+# configuration.api_key_prefix['api_key'] = 'Bearer'
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient(configuration) as api_client:
+ # Create an instance of the API class
+ api_instance = store_api.StoreApi(api_client)
+
+ # example, this endpoint has no required or optional parameters
+ try:
+ # Returns pet inventories by status
+ api_response = api_instance.get_inventory()
+ pprint(api_response)
+ except petstore_api.ApiException as e:
+ print("Exception when calling StoreApi->get_inventory: %s\n" % e)
+```
+
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+**{str: (int,)}**
+
+### Authorization
+
+[api_key](../README.md#api_key)
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | successful operation | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **get_order_by_id**
+> Order get_order_by_id(order_id)
+
+Find purchase order by ID
+
+For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions
+
+### Example
+
+```python
+import time
+import petstore_api
+from petstore_api.api import store_api
+from petstore_api.model.order import Order
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient() as api_client:
+ # Create an instance of the API class
+ api_instance = store_api.StoreApi(api_client)
+ order_id = 1 # int | ID of pet that needs to be fetched
+
+ # example passing only required values which don't have defaults set
+ try:
+ # Find purchase order by ID
+ api_response = api_instance.get_order_by_id(order_id)
+ pprint(api_response)
+ except petstore_api.ApiException as e:
+ print("Exception when calling StoreApi->get_order_by_id: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **order_id** | **int**| ID of pet that needs to be fetched |
+
+### Return type
+
+[**Order**](Order.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/xml, application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | successful operation | - |
+**400** | Invalid ID supplied | - |
+**404** | Order not found | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **place_order**
+> Order place_order(body)
+
+Place an order for a pet
+
+### Example
+
+```python
+import time
+import petstore_api
+from petstore_api.api import store_api
+from petstore_api.model.order import Order
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient() as api_client:
+ # Create an instance of the API class
+ api_instance = store_api.StoreApi(api_client)
+ body = Order(
+ id=1,
+ pet_id=1,
+ quantity=1,
+ ship_date=dateutil_parser('1970-01-01T00:00:00.00Z'),
+ status="placed",
+ complete=False,
+ ) # Order | order placed for purchasing the pet
+
+ # example passing only required values which don't have defaults set
+ try:
+ # Place an order for a pet
+ api_response = api_instance.place_order(body)
+ pprint(api_response)
+ except petstore_api.ApiException as e:
+ print("Exception when calling StoreApi->place_order: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**Order**](Order.md)| order placed for purchasing the pet |
+
+### Return type
+
+[**Order**](Order.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/xml, application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | successful operation | - |
+**400** | Invalid Order | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/StringBooleanMap.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/StringBooleanMap.md
new file mode 100644
index 00000000000..217c7970408
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/StringBooleanMap.md
@@ -0,0 +1,11 @@
+# StringBooleanMap
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**any string name** | **bool** | any string name can be used but the value must be the correct type | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/StringEnum.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/StringEnum.md
new file mode 100644
index 00000000000..bb195ec0e45
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/StringEnum.md
@@ -0,0 +1,11 @@
+# StringEnum
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**value** | **str** | | must be one of ["placed", "approved", "delivered", ]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Tag.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Tag.md
new file mode 100644
index 00000000000..b9fe1e0944c
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/Tag.md
@@ -0,0 +1,13 @@
+# Tag
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **int** | | [optional]
+**name** | **str** | | [optional]
+**full_name** | **str** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/TypeHolderDefault.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/TypeHolderDefault.md
new file mode 100644
index 00000000000..904915aec01
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/TypeHolderDefault.md
@@ -0,0 +1,18 @@
+# TypeHolderDefault
+
+a model to test optional properties with server defaults
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**array_item** | **[int]** | |
+**string_item** | **str** | | defaults to "what"
+**number_item** | **float** | | defaults to 1.234
+**integer_item** | **int** | | defaults to -2
+**bool_item** | **bool** | | defaults to True
+**date_item** | **date** | | [optional]
+**datetime_item** | **datetime** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/TypeHolderExample.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/TypeHolderExample.md
new file mode 100644
index 00000000000..d2954c64dce
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/TypeHolderExample.md
@@ -0,0 +1,16 @@
+# TypeHolderExample
+
+a model to test required properties with an example and length one enum
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**bool_item** | **bool** | |
+**array_item** | **[int]** | |
+**string_item** | **str** | | defaults to "what"
+**number_item** | **float** | | defaults to 1.234
+**integer_item** | **int** | | defaults to -2
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/User.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/User.md
new file mode 100644
index 00000000000..b0079f591b6
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/User.md
@@ -0,0 +1,18 @@
+# User
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**id** | **int** | | [optional]
+**username** | **str** | | [optional]
+**first_name** | **str** | | [optional]
+**last_name** | **str** | | [optional]
+**email** | **str** | | [optional]
+**password** | **str** | | [optional]
+**phone** | **str** | | [optional]
+**user_status** | **int** | User Status | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/UserApi.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/UserApi.md
new file mode 100644
index 00000000000..3c04b81d196
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/UserApi.md
@@ -0,0 +1,562 @@
+# petstore_api.UserApi
+
+All URIs are relative to *http://petstore.swagger.io:80/v2*
+
+Method | HTTP request | Description
+------------- | ------------- | -------------
+[**create_user**](UserApi.md#create_user) | **POST** /user | Create user
+[**create_users_with_array_input**](UserApi.md#create_users_with_array_input) | **POST** /user/createWithArray | Creates list of users with given input array
+[**create_users_with_list_input**](UserApi.md#create_users_with_list_input) | **POST** /user/createWithList | Creates list of users with given input array
+[**delete_user**](UserApi.md#delete_user) | **DELETE** /user/{username} | Delete user
+[**get_user_by_name**](UserApi.md#get_user_by_name) | **GET** /user/{username} | Get user by user name
+[**login_user**](UserApi.md#login_user) | **GET** /user/login | Logs user into the system
+[**logout_user**](UserApi.md#logout_user) | **GET** /user/logout | Logs out current logged in user session
+[**update_user**](UserApi.md#update_user) | **PUT** /user/{username} | Updated user
+
+
+# **create_user**
+> create_user(body)
+
+Create user
+
+This can only be done by the logged in user.
+
+### Example
+
+```python
+import time
+import petstore_api
+from petstore_api.api import user_api
+from petstore_api.model.user import User
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient() as api_client:
+ # Create an instance of the API class
+ api_instance = user_api.UserApi(api_client)
+ body = User(
+ id=1,
+ username="username_example",
+ first_name="first_name_example",
+ last_name="last_name_example",
+ email="email_example",
+ password="password_example",
+ phone="phone_example",
+ user_status=1,
+ ) # User | Created user object
+
+ # example passing only required values which don't have defaults set
+ try:
+ # Create user
+ api_instance.create_user(body)
+ except petstore_api.ApiException as e:
+ print("Exception when calling UserApi->create_user: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**User**](User.md)| Created user object |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**0** | successful operation | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **create_users_with_array_input**
+> create_users_with_array_input(body)
+
+Creates list of users with given input array
+
+### Example
+
+```python
+import time
+import petstore_api
+from petstore_api.api import user_api
+from petstore_api.model.user import User
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient() as api_client:
+ # Create an instance of the API class
+ api_instance = user_api.UserApi(api_client)
+ body = [
+ User(
+ id=1,
+ username="username_example",
+ first_name="first_name_example",
+ last_name="last_name_example",
+ email="email_example",
+ password="password_example",
+ phone="phone_example",
+ user_status=1,
+ ),
+ ] # [User] | List of user object
+
+ # example passing only required values which don't have defaults set
+ try:
+ # Creates list of users with given input array
+ api_instance.create_users_with_array_input(body)
+ except petstore_api.ApiException as e:
+ print("Exception when calling UserApi->create_users_with_array_input: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**[User]**](User.md)| List of user object |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**0** | successful operation | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **create_users_with_list_input**
+> create_users_with_list_input(body)
+
+Creates list of users with given input array
+
+### Example
+
+```python
+import time
+import petstore_api
+from petstore_api.api import user_api
+from petstore_api.model.user import User
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient() as api_client:
+ # Create an instance of the API class
+ api_instance = user_api.UserApi(api_client)
+ body = [
+ User(
+ id=1,
+ username="username_example",
+ first_name="first_name_example",
+ last_name="last_name_example",
+ email="email_example",
+ password="password_example",
+ phone="phone_example",
+ user_status=1,
+ ),
+ ] # [User] | List of user object
+
+ # example passing only required values which don't have defaults set
+ try:
+ # Creates list of users with given input array
+ api_instance.create_users_with_list_input(body)
+ except petstore_api.ApiException as e:
+ print("Exception when calling UserApi->create_users_with_list_input: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **body** | [**[User]**](User.md)| List of user object |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**0** | successful operation | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **delete_user**
+> delete_user(username)
+
+Delete user
+
+This can only be done by the logged in user.
+
+### Example
+
+```python
+import time
+import petstore_api
+from petstore_api.api import user_api
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient() as api_client:
+ # Create an instance of the API class
+ api_instance = user_api.UserApi(api_client)
+ username = "username_example" # str | The name that needs to be deleted
+
+ # example passing only required values which don't have defaults set
+ try:
+ # Delete user
+ api_instance.delete_user(username)
+ except petstore_api.ApiException as e:
+ print("Exception when calling UserApi->delete_user: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **username** | **str**| The name that needs to be deleted |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**400** | Invalid username supplied | - |
+**404** | User not found | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **get_user_by_name**
+> User get_user_by_name(username)
+
+Get user by user name
+
+### Example
+
+```python
+import time
+import petstore_api
+from petstore_api.api import user_api
+from petstore_api.model.user import User
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient() as api_client:
+ # Create an instance of the API class
+ api_instance = user_api.UserApi(api_client)
+ username = "username_example" # str | The name that needs to be fetched. Use user1 for testing.
+
+ # example passing only required values which don't have defaults set
+ try:
+ # Get user by user name
+ api_response = api_instance.get_user_by_name(username)
+ pprint(api_response)
+ except petstore_api.ApiException as e:
+ print("Exception when calling UserApi->get_user_by_name: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **username** | **str**| The name that needs to be fetched. Use user1 for testing. |
+
+### Return type
+
+[**User**](User.md)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/xml, application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | successful operation | - |
+**400** | Invalid username supplied | - |
+**404** | User not found | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **login_user**
+> str login_user(username, password)
+
+Logs user into the system
+
+### Example
+
+```python
+import time
+import petstore_api
+from petstore_api.api import user_api
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient() as api_client:
+ # Create an instance of the API class
+ api_instance = user_api.UserApi(api_client)
+ username = "username_example" # str | The user name for login
+ password = "password_example" # str | The password for login in clear text
+
+ # example passing only required values which don't have defaults set
+ try:
+ # Logs user into the system
+ api_response = api_instance.login_user(username, password)
+ pprint(api_response)
+ except petstore_api.ApiException as e:
+ print("Exception when calling UserApi->login_user: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **username** | **str**| The user name for login |
+ **password** | **str**| The password for login in clear text |
+
+### Return type
+
+**str**
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: application/xml, application/json
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**200** | successful operation | * X-Rate-Limit - calls per hour allowed by the user
* X-Expires-After - date in UTC when token expires
|
+**400** | Invalid username/password supplied | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **logout_user**
+> logout_user()
+
+Logs out current logged in user session
+
+### Example
+
+```python
+import time
+import petstore_api
+from petstore_api.api import user_api
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient() as api_client:
+ # Create an instance of the API class
+ api_instance = user_api.UserApi(api_client)
+
+ # example, this endpoint has no required or optional parameters
+ try:
+ # Logs out current logged in user session
+ api_instance.logout_user()
+ except petstore_api.ApiException as e:
+ print("Exception when calling UserApi->logout_user: %s\n" % e)
+```
+
+
+### Parameters
+This endpoint does not need any parameter.
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**0** | successful operation | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
+# **update_user**
+> update_user(username, body)
+
+Updated user
+
+This can only be done by the logged in user.
+
+### Example
+
+```python
+import time
+import petstore_api
+from petstore_api.api import user_api
+from petstore_api.model.user import User
+from pprint import pprint
+# Defining the host is optional and defaults to http://petstore.swagger.io:80/v2
+# See configuration.py for a list of all supported configuration parameters.
+configuration = petstore_api.Configuration(
+ host = "http://petstore.swagger.io:80/v2"
+)
+
+
+# Enter a context with an instance of the API client
+with petstore_api.ApiClient() as api_client:
+ # Create an instance of the API class
+ api_instance = user_api.UserApi(api_client)
+ username = "username_example" # str | name that need to be deleted
+ body = User(
+ id=1,
+ username="username_example",
+ first_name="first_name_example",
+ last_name="last_name_example",
+ email="email_example",
+ password="password_example",
+ phone="phone_example",
+ user_status=1,
+ ) # User | Updated user object
+
+ # example passing only required values which don't have defaults set
+ try:
+ # Updated user
+ api_instance.update_user(username, body)
+ except petstore_api.ApiException as e:
+ print("Exception when calling UserApi->update_user: %s\n" % e)
+```
+
+
+### Parameters
+
+Name | Type | Description | Notes
+------------- | ------------- | ------------- | -------------
+ **username** | **str**| name that need to be deleted |
+ **body** | [**User**](User.md)| Updated user object |
+
+### Return type
+
+void (empty response body)
+
+### Authorization
+
+No authorization required
+
+### HTTP request headers
+
+ - **Content-Type**: Not defined
+ - **Accept**: Not defined
+
+
+### HTTP response details
+| Status code | Description | Response headers |
+|-------------|-------------|------------------|
+**400** | Invalid user supplied | - |
+**404** | User not found | - |
+
+[[Back to top]](#) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to Model list]](../README.md#documentation-for-models) [[Back to README]](../README.md)
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/XmlItem.md b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/XmlItem.md
new file mode 100644
index 00000000000..ea3d7f92804
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/docs/XmlItem.md
@@ -0,0 +1,39 @@
+# XmlItem
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**attribute_string** | **str** | | [optional]
+**attribute_number** | **float** | | [optional]
+**attribute_integer** | **int** | | [optional]
+**attribute_boolean** | **bool** | | [optional]
+**wrapped_array** | **[int]** | | [optional]
+**name_string** | **str** | | [optional]
+**name_number** | **float** | | [optional]
+**name_integer** | **int** | | [optional]
+**name_boolean** | **bool** | | [optional]
+**name_array** | **[int]** | | [optional]
+**name_wrapped_array** | **[int]** | | [optional]
+**prefix_string** | **str** | | [optional]
+**prefix_number** | **float** | | [optional]
+**prefix_integer** | **int** | | [optional]
+**prefix_boolean** | **bool** | | [optional]
+**prefix_array** | **[int]** | | [optional]
+**prefix_wrapped_array** | **[int]** | | [optional]
+**namespace_string** | **str** | | [optional]
+**namespace_number** | **float** | | [optional]
+**namespace_integer** | **int** | | [optional]
+**namespace_boolean** | **bool** | | [optional]
+**namespace_array** | **[int]** | | [optional]
+**namespace_wrapped_array** | **[int]** | | [optional]
+**prefix_ns_string** | **str** | | [optional]
+**prefix_ns_number** | **float** | | [optional]
+**prefix_ns_integer** | **int** | | [optional]
+**prefix_ns_boolean** | **bool** | | [optional]
+**prefix_ns_array** | **[int]** | | [optional]
+**prefix_ns_wrapped_array** | **[int]** | | [optional]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/git_push.sh b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/git_push.sh
new file mode 100644
index 00000000000..ced3be2b0c7
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/git_push.sh
@@ -0,0 +1,58 @@
+#!/bin/sh
+# ref: https://help.github.com/articles/adding-an-existing-project-to-github-using-the-command-line/
+#
+# Usage example: /bin/sh ./git_push.sh wing328 openapi-pestore-perl "minor update" "gitlab.com"
+
+git_user_id=$1
+git_repo_id=$2
+release_note=$3
+git_host=$4
+
+if [ "$git_host" = "" ]; then
+ git_host="github.com"
+ echo "[INFO] No command line input provided. Set \$git_host to $git_host"
+fi
+
+if [ "$git_user_id" = "" ]; then
+ git_user_id="GIT_USER_ID"
+ echo "[INFO] No command line input provided. Set \$git_user_id to $git_user_id"
+fi
+
+if [ "$git_repo_id" = "" ]; then
+ git_repo_id="GIT_REPO_ID"
+ echo "[INFO] No command line input provided. Set \$git_repo_id to $git_repo_id"
+fi
+
+if [ "$release_note" = "" ]; then
+ release_note="Minor update"
+ echo "[INFO] No command line input provided. Set \$release_note to $release_note"
+fi
+
+# Initialize the local directory as a Git repository
+git init
+
+# Adds the files in the local repository and stages them for commit.
+git add .
+
+# Commits the tracked changes and prepares them to be pushed to a remote repository.
+git commit -m "$release_note"
+
+# Sets the new remote
+git_remote=`git remote`
+if [ "$git_remote" = "" ]; then # git remote not defined
+
+ if [ "$GIT_TOKEN" = "" ]; then
+ echo "[INFO] \$GIT_TOKEN (environment variable) is not set. Using the git credential in your environment."
+ git remote add origin https://${git_host}/${git_user_id}/${git_repo_id}.git
+ else
+ git remote add origin https://${git_user_id}:${GIT_TOKEN}@${git_host}/${git_user_id}/${git_repo_id}.git
+ fi
+
+fi
+
+git pull origin master
+
+# Pushes (Forces) the changes in the local repository up to the remote repository
+echo "Git pushing to https://${git_host}/${git_user_id}/${git_repo_id}.git"
+git push origin master 2>&1 | grep -v 'To https'
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/__init__.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/__init__.py
new file mode 100644
index 00000000000..26dd6f84e21
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/__init__.py
@@ -0,0 +1,27 @@
+# flake8: noqa
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+__version__ = "1.0.0"
+
+# import ApiClient
+from petstore_api.api_client import ApiClient
+
+# import Configuration
+from petstore_api.configuration import Configuration
+
+# import exceptions
+from petstore_api.exceptions import OpenApiException
+from petstore_api.exceptions import ApiAttributeError
+from petstore_api.exceptions import ApiTypeError
+from petstore_api.exceptions import ApiValueError
+from petstore_api.exceptions import ApiKeyError
+from petstore_api.exceptions import ApiException
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/__init__.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/__init__.py
new file mode 100644
index 00000000000..840e9f0cd90
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/__init__.py
@@ -0,0 +1,3 @@
+# do not import all apis into this module because that uses a lot of memory and stack frames
+# if you need the ability to import all apis from one package, import them with
+# from petstore_api.apis import AnotherFakeApi
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/another_fake_api.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/another_fake_api.py
new file mode 100644
index 00000000000..9c75f7d5a83
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/another_fake_api.py
@@ -0,0 +1,155 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.api_client import ApiClient, Endpoint as _Endpoint
+from petstore_api.model_utils import ( # noqa: F401
+ check_allowed_values,
+ check_validations,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_and_convert_types
+)
+from petstore_api.model.client import Client
+
+
+class AnotherFakeApi(object):
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient()
+ self.api_client = api_client
+
+ def __call_123_test_special_tags(
+ self,
+ body,
+ **kwargs
+ ):
+ """To test special tags # noqa: E501
+
+ To test special tags and operation ID starting with number # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.call_123_test_special_tags(body, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ body (Client): client model
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ Client
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['body'] = \
+ body
+ return self.call_with_http_info(**kwargs)
+
+ self.call_123_test_special_tags = _Endpoint(
+ settings={
+ 'response_type': (Client,),
+ 'auth': [],
+ 'endpoint_path': '/another-fake/dummy',
+ 'operation_id': 'call_123_test_special_tags',
+ 'http_method': 'PATCH',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'body',
+ ],
+ 'required': [
+ 'body',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'body':
+ (Client,),
+ },
+ 'attribute_map': {
+ },
+ 'location_map': {
+ 'body': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [
+ 'application/json'
+ ]
+ },
+ api_client=api_client,
+ callable=__call_123_test_special_tags
+ )
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/fake_api.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/fake_api.py
new file mode 100644
index 00000000000..aaf44e6f64c
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/fake_api.py
@@ -0,0 +1,2223 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.api_client import ApiClient, Endpoint as _Endpoint
+from petstore_api.model_utils import ( # noqa: F401
+ check_allowed_values,
+ check_validations,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_and_convert_types
+)
+from petstore_api.model.animal_farm import AnimalFarm
+from petstore_api.model.client import Client
+from petstore_api.model.file_schema_test_class import FileSchemaTestClass
+from petstore_api.model.number_with_validations import NumberWithValidations
+from petstore_api.model.object_model_with_ref_props import ObjectModelWithRefProps
+from petstore_api.model.string_enum import StringEnum
+from petstore_api.model.user import User
+from petstore_api.model.xml_item import XmlItem
+
+
+class FakeApi(object):
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient()
+ self.api_client = api_client
+
+ def __array_model(
+ self,
+ **kwargs
+ ):
+ """array_model # noqa: E501
+
+ Test serialization of ArrayModel # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.array_model(async_req=True)
+ >>> result = thread.get()
+
+
+ Keyword Args:
+ body (AnimalFarm): Input model. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ AnimalFarm
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ return self.call_with_http_info(**kwargs)
+
+ self.array_model = _Endpoint(
+ settings={
+ 'response_type': (AnimalFarm,),
+ 'auth': [],
+ 'endpoint_path': '/fake/refs/arraymodel',
+ 'operation_id': 'array_model',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'body',
+ ],
+ 'required': [],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'body':
+ (AnimalFarm,),
+ },
+ 'attribute_map': {
+ },
+ 'location_map': {
+ 'body': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ '*/*'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client,
+ callable=__array_model
+ )
+
+ def __boolean(
+ self,
+ **kwargs
+ ):
+ """boolean # noqa: E501
+
+ Test serialization of outer boolean types # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.boolean(async_req=True)
+ >>> result = thread.get()
+
+
+ Keyword Args:
+ body (bool): Input boolean as post body. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ bool
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ return self.call_with_http_info(**kwargs)
+
+ self.boolean = _Endpoint(
+ settings={
+ 'response_type': (bool,),
+ 'auth': [],
+ 'endpoint_path': '/fake/refs/boolean',
+ 'operation_id': 'boolean',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'body',
+ ],
+ 'required': [],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'body':
+ (bool,),
+ },
+ 'attribute_map': {
+ },
+ 'location_map': {
+ 'body': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ '*/*'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client,
+ callable=__boolean
+ )
+
+ def __create_xml_item(
+ self,
+ xml_item,
+ **kwargs
+ ):
+ """creates an XmlItem # noqa: E501
+
+ this route creates an XmlItem # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.create_xml_item(xml_item, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ xml_item (XmlItem): XmlItem Body
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ None
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['xml_item'] = \
+ xml_item
+ return self.call_with_http_info(**kwargs)
+
+ self.create_xml_item = _Endpoint(
+ settings={
+ 'response_type': None,
+ 'auth': [],
+ 'endpoint_path': '/fake/create_xml_item',
+ 'operation_id': 'create_xml_item',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'xml_item',
+ ],
+ 'required': [
+ 'xml_item',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'xml_item':
+ (XmlItem,),
+ },
+ 'attribute_map': {
+ },
+ 'location_map': {
+ 'xml_item': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [],
+ 'content_type': [
+ 'application/xml',
+ 'application/xml; charset=utf-8',
+ 'application/xml; charset=utf-16',
+ 'text/xml',
+ 'text/xml; charset=utf-8',
+ 'text/xml; charset=utf-16'
+ ]
+ },
+ api_client=api_client,
+ callable=__create_xml_item
+ )
+
+ def __number_with_validations(
+ self,
+ **kwargs
+ ):
+ """number_with_validations # noqa: E501
+
+ Test serialization of outer number types # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.number_with_validations(async_req=True)
+ >>> result = thread.get()
+
+
+ Keyword Args:
+ body (NumberWithValidations): Input number as post body. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ NumberWithValidations
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ return self.call_with_http_info(**kwargs)
+
+ self.number_with_validations = _Endpoint(
+ settings={
+ 'response_type': (NumberWithValidations,),
+ 'auth': [],
+ 'endpoint_path': '/fake/refs/number',
+ 'operation_id': 'number_with_validations',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'body',
+ ],
+ 'required': [],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'body':
+ (NumberWithValidations,),
+ },
+ 'attribute_map': {
+ },
+ 'location_map': {
+ 'body': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ '*/*'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client,
+ callable=__number_with_validations
+ )
+
+ def __object_model_with_ref_props(
+ self,
+ **kwargs
+ ):
+ """object_model_with_ref_props # noqa: E501
+
+ Test serialization of object with $refed properties # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.object_model_with_ref_props(async_req=True)
+ >>> result = thread.get()
+
+
+ Keyword Args:
+ body (ObjectModelWithRefProps): Input model. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ ObjectModelWithRefProps
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ return self.call_with_http_info(**kwargs)
+
+ self.object_model_with_ref_props = _Endpoint(
+ settings={
+ 'response_type': (ObjectModelWithRefProps,),
+ 'auth': [],
+ 'endpoint_path': '/fake/refs/object_model_with_ref_props',
+ 'operation_id': 'object_model_with_ref_props',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'body',
+ ],
+ 'required': [],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'body':
+ (ObjectModelWithRefProps,),
+ },
+ 'attribute_map': {
+ },
+ 'location_map': {
+ 'body': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ '*/*'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client,
+ callable=__object_model_with_ref_props
+ )
+
+ def __string(
+ self,
+ **kwargs
+ ):
+ """string # noqa: E501
+
+ Test serialization of outer string types # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.string(async_req=True)
+ >>> result = thread.get()
+
+
+ Keyword Args:
+ body (str): Input string as post body. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ str
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ return self.call_with_http_info(**kwargs)
+
+ self.string = _Endpoint(
+ settings={
+ 'response_type': (str,),
+ 'auth': [],
+ 'endpoint_path': '/fake/refs/string',
+ 'operation_id': 'string',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'body',
+ ],
+ 'required': [],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'body':
+ (str,),
+ },
+ 'attribute_map': {
+ },
+ 'location_map': {
+ 'body': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ '*/*'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client,
+ callable=__string
+ )
+
+ def __string_enum(
+ self,
+ **kwargs
+ ):
+ """string_enum # noqa: E501
+
+ Test serialization of outer enum # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.string_enum(async_req=True)
+ >>> result = thread.get()
+
+
+ Keyword Args:
+ body (StringEnum): Input enum. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ StringEnum
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ return self.call_with_http_info(**kwargs)
+
+ self.string_enum = _Endpoint(
+ settings={
+ 'response_type': (StringEnum,),
+ 'auth': [],
+ 'endpoint_path': '/fake/refs/enum',
+ 'operation_id': 'string_enum',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'body',
+ ],
+ 'required': [],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'body':
+ (StringEnum,),
+ },
+ 'attribute_map': {
+ },
+ 'location_map': {
+ 'body': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ '*/*'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client,
+ callable=__string_enum
+ )
+
+ def __test_body_with_file_schema(
+ self,
+ body,
+ **kwargs
+ ):
+ """test_body_with_file_schema # noqa: E501
+
+ For this test, the body for this request much reference a schema named `File`. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.test_body_with_file_schema(body, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ body (FileSchemaTestClass):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ None
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['body'] = \
+ body
+ return self.call_with_http_info(**kwargs)
+
+ self.test_body_with_file_schema = _Endpoint(
+ settings={
+ 'response_type': None,
+ 'auth': [],
+ 'endpoint_path': '/fake/body-with-file-schema',
+ 'operation_id': 'test_body_with_file_schema',
+ 'http_method': 'PUT',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'body',
+ ],
+ 'required': [
+ 'body',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'body':
+ (FileSchemaTestClass,),
+ },
+ 'attribute_map': {
+ },
+ 'location_map': {
+ 'body': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [],
+ 'content_type': [
+ 'application/json'
+ ]
+ },
+ api_client=api_client,
+ callable=__test_body_with_file_schema
+ )
+
+ def __test_body_with_query_params(
+ self,
+ query,
+ body,
+ **kwargs
+ ):
+ """test_body_with_query_params # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.test_body_with_query_params(query, body, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ query (str):
+ body (User):
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ None
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['query'] = \
+ query
+ kwargs['body'] = \
+ body
+ return self.call_with_http_info(**kwargs)
+
+ self.test_body_with_query_params = _Endpoint(
+ settings={
+ 'response_type': None,
+ 'auth': [],
+ 'endpoint_path': '/fake/body-with-query-params',
+ 'operation_id': 'test_body_with_query_params',
+ 'http_method': 'PUT',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'query',
+ 'body',
+ ],
+ 'required': [
+ 'query',
+ 'body',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'query':
+ (str,),
+ 'body':
+ (User,),
+ },
+ 'attribute_map': {
+ 'query': 'query',
+ },
+ 'location_map': {
+ 'query': 'query',
+ 'body': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [],
+ 'content_type': [
+ 'application/json'
+ ]
+ },
+ api_client=api_client,
+ callable=__test_body_with_query_params
+ )
+
+ def __test_client_model(
+ self,
+ body,
+ **kwargs
+ ):
+ """To test \"client\" model # noqa: E501
+
+ To test \"client\" model # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.test_client_model(body, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ body (Client): client model
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ Client
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['body'] = \
+ body
+ return self.call_with_http_info(**kwargs)
+
+ self.test_client_model = _Endpoint(
+ settings={
+ 'response_type': (Client,),
+ 'auth': [],
+ 'endpoint_path': '/fake',
+ 'operation_id': 'test_client_model',
+ 'http_method': 'PATCH',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'body',
+ ],
+ 'required': [
+ 'body',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'body':
+ (Client,),
+ },
+ 'attribute_map': {
+ },
+ 'location_map': {
+ 'body': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [
+ 'application/json'
+ ]
+ },
+ api_client=api_client,
+ callable=__test_client_model
+ )
+
+ def __test_endpoint_enums_length_one(
+ self,
+ query_integer=3,
+ query_string="brillig",
+ path_string="hello",
+ path_integer=34,
+ header_number=1.234,
+ **kwargs
+ ):
+ """test_endpoint_enums_length_one # noqa: E501
+
+ This route has required values with enums of 1 # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.test_endpoint_enums_length_one(query_integer=3, query_string="brillig", path_string="hello", path_integer=34, header_number=1.234, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ query_integer (int): defaults to 3, must be one of [3]
+ query_string (str): defaults to "brillig", must be one of ["brillig"]
+ path_string (str): defaults to "hello", must be one of ["hello"]
+ path_integer (int): defaults to 34, must be one of [34]
+ header_number (float): defaults to 1.234, must be one of [1.234]
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ None
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['query_integer'] = \
+ query_integer
+ kwargs['query_string'] = \
+ query_string
+ kwargs['path_string'] = \
+ path_string
+ kwargs['path_integer'] = \
+ path_integer
+ kwargs['header_number'] = \
+ header_number
+ return self.call_with_http_info(**kwargs)
+
+ self.test_endpoint_enums_length_one = _Endpoint(
+ settings={
+ 'response_type': None,
+ 'auth': [],
+ 'endpoint_path': '/fake/enums-of-length-one/{path_string}/{path_integer}',
+ 'operation_id': 'test_endpoint_enums_length_one',
+ 'http_method': 'PUT',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'query_integer',
+ 'query_string',
+ 'path_string',
+ 'path_integer',
+ 'header_number',
+ ],
+ 'required': [
+ 'query_integer',
+ 'query_string',
+ 'path_string',
+ 'path_integer',
+ 'header_number',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ 'query_integer',
+ 'query_string',
+ 'path_string',
+ 'path_integer',
+ 'header_number',
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ ('query_integer',): {
+
+ "3": 3
+ },
+ ('query_string',): {
+
+ "BRILLIG": "brillig"
+ },
+ ('path_string',): {
+
+ "HELLO": "hello"
+ },
+ ('path_integer',): {
+
+ "34": 34
+ },
+ ('header_number',): {
+
+ "1.234": 1.234
+ },
+ },
+ 'openapi_types': {
+ 'query_integer':
+ (int,),
+ 'query_string':
+ (str,),
+ 'path_string':
+ (str,),
+ 'path_integer':
+ (int,),
+ 'header_number':
+ (float,),
+ },
+ 'attribute_map': {
+ 'query_integer': 'query_integer',
+ 'query_string': 'query_string',
+ 'path_string': 'path_string',
+ 'path_integer': 'path_integer',
+ 'header_number': 'header_number',
+ },
+ 'location_map': {
+ 'query_integer': 'query',
+ 'query_string': 'query',
+ 'path_string': 'path',
+ 'path_integer': 'path',
+ 'header_number': 'header',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [],
+ 'content_type': [],
+ },
+ api_client=api_client,
+ callable=__test_endpoint_enums_length_one
+ )
+
+ def __test_endpoint_parameters(
+ self,
+ number,
+ double,
+ pattern_without_delimiter,
+ byte,
+ **kwargs
+ ):
+ """Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
+
+ Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.test_endpoint_parameters(number, double, pattern_without_delimiter, byte, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ number (float): None
+ double (float): None
+ pattern_without_delimiter (str): None
+ byte (str): None
+
+ Keyword Args:
+ integer (int): None. [optional]
+ int32 (int): None. [optional]
+ int64 (int): None. [optional]
+ float (float): None. [optional]
+ string (str): None. [optional]
+ binary (file_type): None. [optional]
+ date (date): None. [optional]
+ date_time (datetime): None. [optional]
+ password (str): None. [optional]
+ param_callback (str): None. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ None
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['number'] = \
+ number
+ kwargs['double'] = \
+ double
+ kwargs['pattern_without_delimiter'] = \
+ pattern_without_delimiter
+ kwargs['byte'] = \
+ byte
+ return self.call_with_http_info(**kwargs)
+
+ self.test_endpoint_parameters = _Endpoint(
+ settings={
+ 'response_type': None,
+ 'auth': [
+ 'http_basic_test'
+ ],
+ 'endpoint_path': '/fake',
+ 'operation_id': 'test_endpoint_parameters',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'number',
+ 'double',
+ 'pattern_without_delimiter',
+ 'byte',
+ 'integer',
+ 'int32',
+ 'int64',
+ 'float',
+ 'string',
+ 'binary',
+ 'date',
+ 'date_time',
+ 'password',
+ 'param_callback',
+ ],
+ 'required': [
+ 'number',
+ 'double',
+ 'pattern_without_delimiter',
+ 'byte',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ 'number',
+ 'double',
+ 'pattern_without_delimiter',
+ 'integer',
+ 'int32',
+ 'float',
+ 'string',
+ 'password',
+ ]
+ },
+ root_map={
+ 'validations': {
+ ('number',): {
+
+ 'inclusive_maximum': 543.2,
+ 'inclusive_minimum': 32.1,
+ },
+ ('double',): {
+
+ 'inclusive_maximum': 123.4,
+ 'inclusive_minimum': 67.8,
+ },
+ ('pattern_without_delimiter',): {
+
+ 'regex': {
+ 'pattern': r'^[A-Z].*', # noqa: E501
+ },
+ },
+ ('integer',): {
+
+ 'inclusive_maximum': 100,
+ 'inclusive_minimum': 10,
+ },
+ ('int32',): {
+
+ 'inclusive_maximum': 200,
+ 'inclusive_minimum': 20,
+ },
+ ('float',): {
+
+ 'inclusive_maximum': 987.6,
+ },
+ ('string',): {
+
+ 'regex': {
+ 'pattern': r'[a-z]', # noqa: E501
+ 'flags': (re.IGNORECASE)
+ },
+ },
+ ('password',): {
+ 'max_length': 64,
+ 'min_length': 10,
+ },
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'number':
+ (float,),
+ 'double':
+ (float,),
+ 'pattern_without_delimiter':
+ (str,),
+ 'byte':
+ (str,),
+ 'integer':
+ (int,),
+ 'int32':
+ (int,),
+ 'int64':
+ (int,),
+ 'float':
+ (float,),
+ 'string':
+ (str,),
+ 'binary':
+ (file_type,),
+ 'date':
+ (date,),
+ 'date_time':
+ (datetime,),
+ 'password':
+ (str,),
+ 'param_callback':
+ (str,),
+ },
+ 'attribute_map': {
+ 'number': 'number',
+ 'double': 'double',
+ 'pattern_without_delimiter': 'pattern_without_delimiter',
+ 'byte': 'byte',
+ 'integer': 'integer',
+ 'int32': 'int32',
+ 'int64': 'int64',
+ 'float': 'float',
+ 'string': 'string',
+ 'binary': 'binary',
+ 'date': 'date',
+ 'date_time': 'dateTime',
+ 'password': 'password',
+ 'param_callback': 'callback',
+ },
+ 'location_map': {
+ 'number': 'form',
+ 'double': 'form',
+ 'pattern_without_delimiter': 'form',
+ 'byte': 'form',
+ 'integer': 'form',
+ 'int32': 'form',
+ 'int64': 'form',
+ 'float': 'form',
+ 'string': 'form',
+ 'binary': 'form',
+ 'date': 'form',
+ 'date_time': 'form',
+ 'password': 'form',
+ 'param_callback': 'form',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [],
+ 'content_type': [
+ 'application/x-www-form-urlencoded'
+ ]
+ },
+ api_client=api_client,
+ callable=__test_endpoint_parameters
+ )
+
+ def __test_enum_parameters(
+ self,
+ **kwargs
+ ):
+ """To test enum parameters # noqa: E501
+
+ To test enum parameters # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.test_enum_parameters(async_req=True)
+ >>> result = thread.get()
+
+
+ Keyword Args:
+ enum_header_string_array ([str]): Header parameter enum test (string array). [optional]
+ enum_header_string (str): Header parameter enum test (string). [optional] if omitted the server will use the default value of "-efg"
+ enum_query_string_array ([str]): Query parameter enum test (string array). [optional]
+ enum_query_string (str): Query parameter enum test (string). [optional] if omitted the server will use the default value of "-efg"
+ enum_query_integer (int): Query parameter enum test (double). [optional]
+ enum_query_double (float): Query parameter enum test (double). [optional]
+ enum_form_string_array ([str]): Form parameter enum test (string array). [optional] if omitted the server will use the default value of "$"
+ enum_form_string (str): Form parameter enum test (string). [optional] if omitted the server will use the default value of "-efg"
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ None
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ return self.call_with_http_info(**kwargs)
+
+ self.test_enum_parameters = _Endpoint(
+ settings={
+ 'response_type': None,
+ 'auth': [],
+ 'endpoint_path': '/fake',
+ 'operation_id': 'test_enum_parameters',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'enum_header_string_array',
+ 'enum_header_string',
+ 'enum_query_string_array',
+ 'enum_query_string',
+ 'enum_query_integer',
+ 'enum_query_double',
+ 'enum_form_string_array',
+ 'enum_form_string',
+ ],
+ 'required': [],
+ 'nullable': [
+ ],
+ 'enum': [
+ 'enum_header_string_array',
+ 'enum_header_string',
+ 'enum_query_string_array',
+ 'enum_query_string',
+ 'enum_query_integer',
+ 'enum_query_double',
+ 'enum_form_string_array',
+ 'enum_form_string',
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ ('enum_header_string_array',): {
+
+ ">": ">",
+ "$": "$"
+ },
+ ('enum_header_string',): {
+
+ "_ABC": "_abc",
+ "-EFG": "-efg",
+ "(XYZ)": "(xyz)"
+ },
+ ('enum_query_string_array',): {
+
+ ">": ">",
+ "$": "$"
+ },
+ ('enum_query_string',): {
+
+ "_ABC": "_abc",
+ "-EFG": "-efg",
+ "(XYZ)": "(xyz)"
+ },
+ ('enum_query_integer',): {
+
+ "1": 1,
+ "-2": -2
+ },
+ ('enum_query_double',): {
+
+ "1.1": 1.1,
+ "-1.2": -1.2
+ },
+ ('enum_form_string_array',): {
+
+ ">": ">",
+ "$": "$"
+ },
+ ('enum_form_string',): {
+
+ "_ABC": "_abc",
+ "-EFG": "-efg",
+ "(XYZ)": "(xyz)"
+ },
+ },
+ 'openapi_types': {
+ 'enum_header_string_array':
+ ([str],),
+ 'enum_header_string':
+ (str,),
+ 'enum_query_string_array':
+ ([str],),
+ 'enum_query_string':
+ (str,),
+ 'enum_query_integer':
+ (int,),
+ 'enum_query_double':
+ (float,),
+ 'enum_form_string_array':
+ ([str],),
+ 'enum_form_string':
+ (str,),
+ },
+ 'attribute_map': {
+ 'enum_header_string_array': 'enum_header_string_array',
+ 'enum_header_string': 'enum_header_string',
+ 'enum_query_string_array': 'enum_query_string_array',
+ 'enum_query_string': 'enum_query_string',
+ 'enum_query_integer': 'enum_query_integer',
+ 'enum_query_double': 'enum_query_double',
+ 'enum_form_string_array': 'enum_form_string_array',
+ 'enum_form_string': 'enum_form_string',
+ },
+ 'location_map': {
+ 'enum_header_string_array': 'header',
+ 'enum_header_string': 'header',
+ 'enum_query_string_array': 'query',
+ 'enum_query_string': 'query',
+ 'enum_query_integer': 'query',
+ 'enum_query_double': 'query',
+ 'enum_form_string_array': 'form',
+ 'enum_form_string': 'form',
+ },
+ 'collection_format_map': {
+ 'enum_header_string_array': 'csv',
+ 'enum_query_string_array': 'csv',
+ 'enum_form_string_array': 'csv',
+ }
+ },
+ headers_map={
+ 'accept': [],
+ 'content_type': [
+ 'application/x-www-form-urlencoded'
+ ]
+ },
+ api_client=api_client,
+ callable=__test_enum_parameters
+ )
+
+ def __test_group_parameters(
+ self,
+ required_string_group,
+ required_boolean_group,
+ required_int64_group,
+ **kwargs
+ ):
+ """Fake endpoint to test group parameters (optional) # noqa: E501
+
+ Fake endpoint to test group parameters (optional) # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.test_group_parameters(required_string_group, required_boolean_group, required_int64_group, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ required_string_group (int): Required String in group parameters
+ required_boolean_group (bool): Required Boolean in group parameters
+ required_int64_group (int): Required Integer in group parameters
+
+ Keyword Args:
+ string_group (int): String in group parameters. [optional]
+ boolean_group (bool): Boolean in group parameters. [optional]
+ int64_group (int): Integer in group parameters. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ None
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['required_string_group'] = \
+ required_string_group
+ kwargs['required_boolean_group'] = \
+ required_boolean_group
+ kwargs['required_int64_group'] = \
+ required_int64_group
+ return self.call_with_http_info(**kwargs)
+
+ self.test_group_parameters = _Endpoint(
+ settings={
+ 'response_type': None,
+ 'auth': [],
+ 'endpoint_path': '/fake',
+ 'operation_id': 'test_group_parameters',
+ 'http_method': 'DELETE',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'required_string_group',
+ 'required_boolean_group',
+ 'required_int64_group',
+ 'string_group',
+ 'boolean_group',
+ 'int64_group',
+ ],
+ 'required': [
+ 'required_string_group',
+ 'required_boolean_group',
+ 'required_int64_group',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'required_string_group':
+ (int,),
+ 'required_boolean_group':
+ (bool,),
+ 'required_int64_group':
+ (int,),
+ 'string_group':
+ (int,),
+ 'boolean_group':
+ (bool,),
+ 'int64_group':
+ (int,),
+ },
+ 'attribute_map': {
+ 'required_string_group': 'required_string_group',
+ 'required_boolean_group': 'required_boolean_group',
+ 'required_int64_group': 'required_int64_group',
+ 'string_group': 'string_group',
+ 'boolean_group': 'boolean_group',
+ 'int64_group': 'int64_group',
+ },
+ 'location_map': {
+ 'required_string_group': 'query',
+ 'required_boolean_group': 'header',
+ 'required_int64_group': 'query',
+ 'string_group': 'query',
+ 'boolean_group': 'header',
+ 'int64_group': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [],
+ 'content_type': [],
+ },
+ api_client=api_client,
+ callable=__test_group_parameters
+ )
+
+ def __test_inline_additional_properties(
+ self,
+ param,
+ **kwargs
+ ):
+ """test inline additionalProperties # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.test_inline_additional_properties(param, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ param ({str: (str,)}): request body
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ None
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['param'] = \
+ param
+ return self.call_with_http_info(**kwargs)
+
+ self.test_inline_additional_properties = _Endpoint(
+ settings={
+ 'response_type': None,
+ 'auth': [],
+ 'endpoint_path': '/fake/inline-additionalProperties',
+ 'operation_id': 'test_inline_additional_properties',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'param',
+ ],
+ 'required': [
+ 'param',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'param':
+ ({str: (str,)},),
+ },
+ 'attribute_map': {
+ },
+ 'location_map': {
+ 'param': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [],
+ 'content_type': [
+ 'application/json'
+ ]
+ },
+ api_client=api_client,
+ callable=__test_inline_additional_properties
+ )
+
+ def __test_json_form_data(
+ self,
+ param,
+ param2,
+ **kwargs
+ ):
+ """test json serialization of form data # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.test_json_form_data(param, param2, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ param (str): field1
+ param2 (str): field2
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ None
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['param'] = \
+ param
+ kwargs['param2'] = \
+ param2
+ return self.call_with_http_info(**kwargs)
+
+ self.test_json_form_data = _Endpoint(
+ settings={
+ 'response_type': None,
+ 'auth': [],
+ 'endpoint_path': '/fake/jsonFormData',
+ 'operation_id': 'test_json_form_data',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'param',
+ 'param2',
+ ],
+ 'required': [
+ 'param',
+ 'param2',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'param':
+ (str,),
+ 'param2':
+ (str,),
+ },
+ 'attribute_map': {
+ 'param': 'param',
+ 'param2': 'param2',
+ },
+ 'location_map': {
+ 'param': 'form',
+ 'param2': 'form',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [],
+ 'content_type': [
+ 'application/x-www-form-urlencoded'
+ ]
+ },
+ api_client=api_client,
+ callable=__test_json_form_data
+ )
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/fake_classname_tags_123_api.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/fake_classname_tags_123_api.py
new file mode 100644
index 00000000000..1d1afc214c1
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/fake_classname_tags_123_api.py
@@ -0,0 +1,157 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.api_client import ApiClient, Endpoint as _Endpoint
+from petstore_api.model_utils import ( # noqa: F401
+ check_allowed_values,
+ check_validations,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_and_convert_types
+)
+from petstore_api.model.client import Client
+
+
+class FakeClassnameTags123Api(object):
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient()
+ self.api_client = api_client
+
+ def __test_classname(
+ self,
+ body,
+ **kwargs
+ ):
+ """To test class name in snake case # noqa: E501
+
+ To test class name in snake case # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.test_classname(body, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ body (Client): client model
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ Client
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['body'] = \
+ body
+ return self.call_with_http_info(**kwargs)
+
+ self.test_classname = _Endpoint(
+ settings={
+ 'response_type': (Client,),
+ 'auth': [
+ 'api_key_query'
+ ],
+ 'endpoint_path': '/fake_classname_test',
+ 'operation_id': 'test_classname',
+ 'http_method': 'PATCH',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'body',
+ ],
+ 'required': [
+ 'body',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'body':
+ (Client,),
+ },
+ 'attribute_map': {
+ },
+ 'location_map': {
+ 'body': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [
+ 'application/json'
+ ]
+ },
+ api_client=api_client,
+ callable=__test_classname
+ )
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/pet_api.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/pet_api.py
new file mode 100644
index 00000000000..2989ca8d4ab
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/pet_api.py
@@ -0,0 +1,1170 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.api_client import ApiClient, Endpoint as _Endpoint
+from petstore_api.model_utils import ( # noqa: F401
+ check_allowed_values,
+ check_validations,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_and_convert_types
+)
+from petstore_api.model.api_response import ApiResponse
+from petstore_api.model.pet import Pet
+
+
+class PetApi(object):
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient()
+ self.api_client = api_client
+
+ def __add_pet(
+ self,
+ body,
+ **kwargs
+ ):
+ """Add a new pet to the store # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.add_pet(body, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ body (Pet): Pet object that needs to be added to the store
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ None
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['body'] = \
+ body
+ return self.call_with_http_info(**kwargs)
+
+ self.add_pet = _Endpoint(
+ settings={
+ 'response_type': None,
+ 'auth': [
+ 'petstore_auth'
+ ],
+ 'endpoint_path': '/pet',
+ 'operation_id': 'add_pet',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'body',
+ ],
+ 'required': [
+ 'body',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'body':
+ (Pet,),
+ },
+ 'attribute_map': {
+ },
+ 'location_map': {
+ 'body': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [],
+ 'content_type': [
+ 'application/json',
+ 'application/xml'
+ ]
+ },
+ api_client=api_client,
+ callable=__add_pet
+ )
+
+ def __delete_pet(
+ self,
+ pet_id,
+ **kwargs
+ ):
+ """Deletes a pet # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.delete_pet(pet_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ pet_id (int): Pet id to delete
+
+ Keyword Args:
+ api_key (str): [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ None
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['pet_id'] = \
+ pet_id
+ return self.call_with_http_info(**kwargs)
+
+ self.delete_pet = _Endpoint(
+ settings={
+ 'response_type': None,
+ 'auth': [
+ 'petstore_auth'
+ ],
+ 'endpoint_path': '/pet/{petId}',
+ 'operation_id': 'delete_pet',
+ 'http_method': 'DELETE',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'pet_id',
+ 'api_key',
+ ],
+ 'required': [
+ 'pet_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'pet_id':
+ (int,),
+ 'api_key':
+ (str,),
+ },
+ 'attribute_map': {
+ 'pet_id': 'petId',
+ 'api_key': 'api_key',
+ },
+ 'location_map': {
+ 'pet_id': 'path',
+ 'api_key': 'header',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [],
+ 'content_type': [],
+ },
+ api_client=api_client,
+ callable=__delete_pet
+ )
+
+ def __find_pets_by_status(
+ self,
+ status,
+ **kwargs
+ ):
+ """Finds Pets by status # noqa: E501
+
+ Multiple status values can be provided with comma separated strings # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.find_pets_by_status(status, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ status ([str]): Status values that need to be considered for filter
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ [Pet]
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['status'] = \
+ status
+ return self.call_with_http_info(**kwargs)
+
+ self.find_pets_by_status = _Endpoint(
+ settings={
+ 'response_type': ([Pet],),
+ 'auth': [
+ 'petstore_auth'
+ ],
+ 'endpoint_path': '/pet/findByStatus',
+ 'operation_id': 'find_pets_by_status',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'status',
+ ],
+ 'required': [
+ 'status',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ 'status',
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ ('status',): {
+
+ "AVAILABLE": "available",
+ "PENDING": "pending",
+ "SOLD": "sold"
+ },
+ },
+ 'openapi_types': {
+ 'status':
+ ([str],),
+ },
+ 'attribute_map': {
+ 'status': 'status',
+ },
+ 'location_map': {
+ 'status': 'query',
+ },
+ 'collection_format_map': {
+ 'status': 'csv',
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/xml',
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client,
+ callable=__find_pets_by_status
+ )
+
+ def __find_pets_by_tags(
+ self,
+ tags,
+ **kwargs
+ ):
+ """Finds Pets by tags # noqa: E501
+
+ Multiple tags can be provided with comma separated strings. Use tag1, tag2, tag3 for testing. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.find_pets_by_tags(tags, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ tags ([str]): Tags to filter by
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ [Pet]
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['tags'] = \
+ tags
+ return self.call_with_http_info(**kwargs)
+
+ self.find_pets_by_tags = _Endpoint(
+ settings={
+ 'response_type': ([Pet],),
+ 'auth': [
+ 'petstore_auth'
+ ],
+ 'endpoint_path': '/pet/findByTags',
+ 'operation_id': 'find_pets_by_tags',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'tags',
+ ],
+ 'required': [
+ 'tags',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'tags':
+ ([str],),
+ },
+ 'attribute_map': {
+ 'tags': 'tags',
+ },
+ 'location_map': {
+ 'tags': 'query',
+ },
+ 'collection_format_map': {
+ 'tags': 'csv',
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/xml',
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client,
+ callable=__find_pets_by_tags
+ )
+
+ def __get_pet_by_id(
+ self,
+ pet_id,
+ **kwargs
+ ):
+ """Find pet by ID # noqa: E501
+
+ Returns a single pet # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_pet_by_id(pet_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ pet_id (int): ID of pet to return
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ Pet
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['pet_id'] = \
+ pet_id
+ return self.call_with_http_info(**kwargs)
+
+ self.get_pet_by_id = _Endpoint(
+ settings={
+ 'response_type': (Pet,),
+ 'auth': [
+ 'api_key'
+ ],
+ 'endpoint_path': '/pet/{petId}',
+ 'operation_id': 'get_pet_by_id',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'pet_id',
+ ],
+ 'required': [
+ 'pet_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'pet_id':
+ (int,),
+ },
+ 'attribute_map': {
+ 'pet_id': 'petId',
+ },
+ 'location_map': {
+ 'pet_id': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/xml',
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client,
+ callable=__get_pet_by_id
+ )
+
+ def __update_pet(
+ self,
+ body,
+ **kwargs
+ ):
+ """Update an existing pet # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.update_pet(body, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ body (Pet): Pet object that needs to be added to the store
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ None
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['body'] = \
+ body
+ return self.call_with_http_info(**kwargs)
+
+ self.update_pet = _Endpoint(
+ settings={
+ 'response_type': None,
+ 'auth': [
+ 'petstore_auth'
+ ],
+ 'endpoint_path': '/pet',
+ 'operation_id': 'update_pet',
+ 'http_method': 'PUT',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'body',
+ ],
+ 'required': [
+ 'body',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'body':
+ (Pet,),
+ },
+ 'attribute_map': {
+ },
+ 'location_map': {
+ 'body': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [],
+ 'content_type': [
+ 'application/json',
+ 'application/xml'
+ ]
+ },
+ api_client=api_client,
+ callable=__update_pet
+ )
+
+ def __update_pet_with_form(
+ self,
+ pet_id,
+ **kwargs
+ ):
+ """Updates a pet in the store with form data # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.update_pet_with_form(pet_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ pet_id (int): ID of pet that needs to be updated
+
+ Keyword Args:
+ name (str): Updated name of the pet. [optional]
+ status (str): Updated status of the pet. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ None
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['pet_id'] = \
+ pet_id
+ return self.call_with_http_info(**kwargs)
+
+ self.update_pet_with_form = _Endpoint(
+ settings={
+ 'response_type': None,
+ 'auth': [
+ 'petstore_auth'
+ ],
+ 'endpoint_path': '/pet/{petId}',
+ 'operation_id': 'update_pet_with_form',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'pet_id',
+ 'name',
+ 'status',
+ ],
+ 'required': [
+ 'pet_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'pet_id':
+ (int,),
+ 'name':
+ (str,),
+ 'status':
+ (str,),
+ },
+ 'attribute_map': {
+ 'pet_id': 'petId',
+ 'name': 'name',
+ 'status': 'status',
+ },
+ 'location_map': {
+ 'pet_id': 'path',
+ 'name': 'form',
+ 'status': 'form',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [],
+ 'content_type': [
+ 'application/x-www-form-urlencoded'
+ ]
+ },
+ api_client=api_client,
+ callable=__update_pet_with_form
+ )
+
+ def __upload_file(
+ self,
+ pet_id,
+ **kwargs
+ ):
+ """uploads an image # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.upload_file(pet_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ pet_id (int): ID of pet to update
+
+ Keyword Args:
+ additional_metadata (str): Additional data to pass to server. [optional]
+ file (file_type): file to upload. [optional]
+ files ([file_type]): files to upload. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ ApiResponse
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['pet_id'] = \
+ pet_id
+ return self.call_with_http_info(**kwargs)
+
+ self.upload_file = _Endpoint(
+ settings={
+ 'response_type': (ApiResponse,),
+ 'auth': [
+ 'petstore_auth'
+ ],
+ 'endpoint_path': '/pet/{petId}/uploadImage',
+ 'operation_id': 'upload_file',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'pet_id',
+ 'additional_metadata',
+ 'file',
+ 'files',
+ ],
+ 'required': [
+ 'pet_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'pet_id':
+ (int,),
+ 'additional_metadata':
+ (str,),
+ 'file':
+ (file_type,),
+ 'files':
+ ([file_type],),
+ },
+ 'attribute_map': {
+ 'pet_id': 'petId',
+ 'additional_metadata': 'additionalMetadata',
+ 'file': 'file',
+ 'files': 'files',
+ },
+ 'location_map': {
+ 'pet_id': 'path',
+ 'additional_metadata': 'form',
+ 'file': 'form',
+ 'files': 'form',
+ },
+ 'collection_format_map': {
+ 'files': 'csv',
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [
+ 'multipart/form-data'
+ ]
+ },
+ api_client=api_client,
+ callable=__upload_file
+ )
+
+ def __upload_file_with_required_file(
+ self,
+ pet_id,
+ required_file,
+ **kwargs
+ ):
+ """uploads an image (required) # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.upload_file_with_required_file(pet_id, required_file, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ pet_id (int): ID of pet to update
+ required_file (file_type): file to upload
+
+ Keyword Args:
+ additional_metadata (str): Additional data to pass to server. [optional]
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ ApiResponse
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['pet_id'] = \
+ pet_id
+ kwargs['required_file'] = \
+ required_file
+ return self.call_with_http_info(**kwargs)
+
+ self.upload_file_with_required_file = _Endpoint(
+ settings={
+ 'response_type': (ApiResponse,),
+ 'auth': [
+ 'petstore_auth'
+ ],
+ 'endpoint_path': '/fake/{petId}/uploadImageWithRequiredFile',
+ 'operation_id': 'upload_file_with_required_file',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'pet_id',
+ 'required_file',
+ 'additional_metadata',
+ ],
+ 'required': [
+ 'pet_id',
+ 'required_file',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'pet_id':
+ (int,),
+ 'required_file':
+ (file_type,),
+ 'additional_metadata':
+ (str,),
+ },
+ 'attribute_map': {
+ 'pet_id': 'petId',
+ 'required_file': 'requiredFile',
+ 'additional_metadata': 'additionalMetadata',
+ },
+ 'location_map': {
+ 'pet_id': 'path',
+ 'required_file': 'form',
+ 'additional_metadata': 'form',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [
+ 'multipart/form-data'
+ ]
+ },
+ api_client=api_client,
+ callable=__upload_file_with_required_file
+ )
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/store_api.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/store_api.py
new file mode 100644
index 00000000000..c30ca943b2d
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/store_api.py
@@ -0,0 +1,499 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.api_client import ApiClient, Endpoint as _Endpoint
+from petstore_api.model_utils import ( # noqa: F401
+ check_allowed_values,
+ check_validations,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_and_convert_types
+)
+from petstore_api.model.order import Order
+
+
+class StoreApi(object):
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient()
+ self.api_client = api_client
+
+ def __delete_order(
+ self,
+ order_id,
+ **kwargs
+ ):
+ """Delete purchase order by ID # noqa: E501
+
+ For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.delete_order(order_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ order_id (str): ID of the order that needs to be deleted
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ None
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['order_id'] = \
+ order_id
+ return self.call_with_http_info(**kwargs)
+
+ self.delete_order = _Endpoint(
+ settings={
+ 'response_type': None,
+ 'auth': [],
+ 'endpoint_path': '/store/order/{order_id}',
+ 'operation_id': 'delete_order',
+ 'http_method': 'DELETE',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'order_id',
+ ],
+ 'required': [
+ 'order_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'order_id':
+ (str,),
+ },
+ 'attribute_map': {
+ 'order_id': 'order_id',
+ },
+ 'location_map': {
+ 'order_id': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [],
+ 'content_type': [],
+ },
+ api_client=api_client,
+ callable=__delete_order
+ )
+
+ def __get_inventory(
+ self,
+ **kwargs
+ ):
+ """Returns pet inventories by status # noqa: E501
+
+ Returns a map of status codes to quantities # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_inventory(async_req=True)
+ >>> result = thread.get()
+
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ {str: (int,)}
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ return self.call_with_http_info(**kwargs)
+
+ self.get_inventory = _Endpoint(
+ settings={
+ 'response_type': ({str: (int,)},),
+ 'auth': [
+ 'api_key'
+ ],
+ 'endpoint_path': '/store/inventory',
+ 'operation_id': 'get_inventory',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ ],
+ 'required': [],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ },
+ 'attribute_map': {
+ },
+ 'location_map': {
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client,
+ callable=__get_inventory
+ )
+
+ def __get_order_by_id(
+ self,
+ order_id,
+ **kwargs
+ ):
+ """Find purchase order by ID # noqa: E501
+
+ For valid response try integer IDs with value <= 5 or > 10. Other values will generated exceptions # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_order_by_id(order_id, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ order_id (int): ID of pet that needs to be fetched
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ Order
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['order_id'] = \
+ order_id
+ return self.call_with_http_info(**kwargs)
+
+ self.get_order_by_id = _Endpoint(
+ settings={
+ 'response_type': (Order,),
+ 'auth': [],
+ 'endpoint_path': '/store/order/{order_id}',
+ 'operation_id': 'get_order_by_id',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'order_id',
+ ],
+ 'required': [
+ 'order_id',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ 'order_id',
+ ]
+ },
+ root_map={
+ 'validations': {
+ ('order_id',): {
+
+ 'inclusive_maximum': 5,
+ 'inclusive_minimum': 1,
+ },
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'order_id':
+ (int,),
+ },
+ 'attribute_map': {
+ 'order_id': 'order_id',
+ },
+ 'location_map': {
+ 'order_id': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/xml',
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client,
+ callable=__get_order_by_id
+ )
+
+ def __place_order(
+ self,
+ body,
+ **kwargs
+ ):
+ """Place an order for a pet # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.place_order(body, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ body (Order): order placed for purchasing the pet
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ Order
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['body'] = \
+ body
+ return self.call_with_http_info(**kwargs)
+
+ self.place_order = _Endpoint(
+ settings={
+ 'response_type': (Order,),
+ 'auth': [],
+ 'endpoint_path': '/store/order',
+ 'operation_id': 'place_order',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'body',
+ ],
+ 'required': [
+ 'body',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'body':
+ (Order,),
+ },
+ 'attribute_map': {
+ },
+ 'location_map': {
+ 'body': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/xml',
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client,
+ callable=__place_order
+ )
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/user_api.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/user_api.py
new file mode 100644
index 00000000000..a5ef0d5c309
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api/user_api.py
@@ -0,0 +1,962 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.api_client import ApiClient, Endpoint as _Endpoint
+from petstore_api.model_utils import ( # noqa: F401
+ check_allowed_values,
+ check_validations,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_and_convert_types
+)
+from petstore_api.model.user import User
+
+
+class UserApi(object):
+ """NOTE: This class is auto generated by OpenAPI Generator
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ def __init__(self, api_client=None):
+ if api_client is None:
+ api_client = ApiClient()
+ self.api_client = api_client
+
+ def __create_user(
+ self,
+ body,
+ **kwargs
+ ):
+ """Create user # noqa: E501
+
+ This can only be done by the logged in user. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.create_user(body, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ body (User): Created user object
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ None
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['body'] = \
+ body
+ return self.call_with_http_info(**kwargs)
+
+ self.create_user = _Endpoint(
+ settings={
+ 'response_type': None,
+ 'auth': [],
+ 'endpoint_path': '/user',
+ 'operation_id': 'create_user',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'body',
+ ],
+ 'required': [
+ 'body',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'body':
+ (User,),
+ },
+ 'attribute_map': {
+ },
+ 'location_map': {
+ 'body': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [],
+ 'content_type': [],
+ },
+ api_client=api_client,
+ callable=__create_user
+ )
+
+ def __create_users_with_array_input(
+ self,
+ body,
+ **kwargs
+ ):
+ """Creates list of users with given input array # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.create_users_with_array_input(body, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ body ([User]): List of user object
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ None
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['body'] = \
+ body
+ return self.call_with_http_info(**kwargs)
+
+ self.create_users_with_array_input = _Endpoint(
+ settings={
+ 'response_type': None,
+ 'auth': [],
+ 'endpoint_path': '/user/createWithArray',
+ 'operation_id': 'create_users_with_array_input',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'body',
+ ],
+ 'required': [
+ 'body',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'body':
+ ([User],),
+ },
+ 'attribute_map': {
+ },
+ 'location_map': {
+ 'body': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [],
+ 'content_type': [],
+ },
+ api_client=api_client,
+ callable=__create_users_with_array_input
+ )
+
+ def __create_users_with_list_input(
+ self,
+ body,
+ **kwargs
+ ):
+ """Creates list of users with given input array # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.create_users_with_list_input(body, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ body ([User]): List of user object
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ None
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['body'] = \
+ body
+ return self.call_with_http_info(**kwargs)
+
+ self.create_users_with_list_input = _Endpoint(
+ settings={
+ 'response_type': None,
+ 'auth': [],
+ 'endpoint_path': '/user/createWithList',
+ 'operation_id': 'create_users_with_list_input',
+ 'http_method': 'POST',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'body',
+ ],
+ 'required': [
+ 'body',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'body':
+ ([User],),
+ },
+ 'attribute_map': {
+ },
+ 'location_map': {
+ 'body': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [],
+ 'content_type': [],
+ },
+ api_client=api_client,
+ callable=__create_users_with_list_input
+ )
+
+ def __delete_user(
+ self,
+ username,
+ **kwargs
+ ):
+ """Delete user # noqa: E501
+
+ This can only be done by the logged in user. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.delete_user(username, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ username (str): The name that needs to be deleted
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ None
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['username'] = \
+ username
+ return self.call_with_http_info(**kwargs)
+
+ self.delete_user = _Endpoint(
+ settings={
+ 'response_type': None,
+ 'auth': [],
+ 'endpoint_path': '/user/{username}',
+ 'operation_id': 'delete_user',
+ 'http_method': 'DELETE',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'username',
+ ],
+ 'required': [
+ 'username',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'username':
+ (str,),
+ },
+ 'attribute_map': {
+ 'username': 'username',
+ },
+ 'location_map': {
+ 'username': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [],
+ 'content_type': [],
+ },
+ api_client=api_client,
+ callable=__delete_user
+ )
+
+ def __get_user_by_name(
+ self,
+ username,
+ **kwargs
+ ):
+ """Get user by user name # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.get_user_by_name(username, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ username (str): The name that needs to be fetched. Use user1 for testing.
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ User
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['username'] = \
+ username
+ return self.call_with_http_info(**kwargs)
+
+ self.get_user_by_name = _Endpoint(
+ settings={
+ 'response_type': (User,),
+ 'auth': [],
+ 'endpoint_path': '/user/{username}',
+ 'operation_id': 'get_user_by_name',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'username',
+ ],
+ 'required': [
+ 'username',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'username':
+ (str,),
+ },
+ 'attribute_map': {
+ 'username': 'username',
+ },
+ 'location_map': {
+ 'username': 'path',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/xml',
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client,
+ callable=__get_user_by_name
+ )
+
+ def __login_user(
+ self,
+ username,
+ password,
+ **kwargs
+ ):
+ """Logs user into the system # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.login_user(username, password, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ username (str): The user name for login
+ password (str): The password for login in clear text
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ str
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['username'] = \
+ username
+ kwargs['password'] = \
+ password
+ return self.call_with_http_info(**kwargs)
+
+ self.login_user = _Endpoint(
+ settings={
+ 'response_type': (str,),
+ 'auth': [],
+ 'endpoint_path': '/user/login',
+ 'operation_id': 'login_user',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'username',
+ 'password',
+ ],
+ 'required': [
+ 'username',
+ 'password',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'username':
+ (str,),
+ 'password':
+ (str,),
+ },
+ 'attribute_map': {
+ 'username': 'username',
+ 'password': 'password',
+ },
+ 'location_map': {
+ 'username': 'query',
+ 'password': 'query',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [
+ 'application/xml',
+ 'application/json'
+ ],
+ 'content_type': [],
+ },
+ api_client=api_client,
+ callable=__login_user
+ )
+
+ def __logout_user(
+ self,
+ **kwargs
+ ):
+ """Logs out current logged in user session # noqa: E501
+
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.logout_user(async_req=True)
+ >>> result = thread.get()
+
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ None
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ return self.call_with_http_info(**kwargs)
+
+ self.logout_user = _Endpoint(
+ settings={
+ 'response_type': None,
+ 'auth': [],
+ 'endpoint_path': '/user/logout',
+ 'operation_id': 'logout_user',
+ 'http_method': 'GET',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ ],
+ 'required': [],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ },
+ 'attribute_map': {
+ },
+ 'location_map': {
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [],
+ 'content_type': [],
+ },
+ api_client=api_client,
+ callable=__logout_user
+ )
+
+ def __update_user(
+ self,
+ username,
+ body,
+ **kwargs
+ ):
+ """Updated user # noqa: E501
+
+ This can only be done by the logged in user. # noqa: E501
+ This method makes a synchronous HTTP request by default. To make an
+ asynchronous HTTP request, please pass async_req=True
+
+ >>> thread = api.update_user(username, body, async_req=True)
+ >>> result = thread.get()
+
+ Args:
+ username (str): name that need to be deleted
+ body (User): Updated user object
+
+ Keyword Args:
+ _return_http_data_only (bool): response data without head status
+ code and headers. Default is True.
+ _preload_content (bool): if False, the urllib3.HTTPResponse object
+ will be returned without reading/decoding response data.
+ Default is True.
+ _request_timeout (float/tuple): timeout setting for this request. If one
+ number provided, it will be total request timeout. It can also
+ be a pair (tuple) of (connection, read) timeouts.
+ Default is None.
+ _check_input_type (bool): specifies if type checking
+ should be done one the data sent to the server.
+ Default is True.
+ _check_return_type (bool): specifies if type checking
+ should be done one the data received from the server.
+ Default is True.
+ _host_index (int/None): specifies the index of the server
+ that we want to use.
+ Default is read from the configuration.
+ async_req (bool): execute request asynchronously
+
+ Returns:
+ None
+ If the method is called asynchronously, returns the request
+ thread.
+ """
+ kwargs['async_req'] = kwargs.get(
+ 'async_req', False
+ )
+ kwargs['_return_http_data_only'] = kwargs.get(
+ '_return_http_data_only', True
+ )
+ kwargs['_preload_content'] = kwargs.get(
+ '_preload_content', True
+ )
+ kwargs['_request_timeout'] = kwargs.get(
+ '_request_timeout', None
+ )
+ kwargs['_check_input_type'] = kwargs.get(
+ '_check_input_type', True
+ )
+ kwargs['_check_return_type'] = kwargs.get(
+ '_check_return_type', True
+ )
+ kwargs['_host_index'] = kwargs.get('_host_index')
+ kwargs['username'] = \
+ username
+ kwargs['body'] = \
+ body
+ return self.call_with_http_info(**kwargs)
+
+ self.update_user = _Endpoint(
+ settings={
+ 'response_type': None,
+ 'auth': [],
+ 'endpoint_path': '/user/{username}',
+ 'operation_id': 'update_user',
+ 'http_method': 'PUT',
+ 'servers': None,
+ },
+ params_map={
+ 'all': [
+ 'username',
+ 'body',
+ ],
+ 'required': [
+ 'username',
+ 'body',
+ ],
+ 'nullable': [
+ ],
+ 'enum': [
+ ],
+ 'validation': [
+ ]
+ },
+ root_map={
+ 'validations': {
+ },
+ 'allowed_values': {
+ },
+ 'openapi_types': {
+ 'username':
+ (str,),
+ 'body':
+ (User,),
+ },
+ 'attribute_map': {
+ 'username': 'username',
+ },
+ 'location_map': {
+ 'username': 'path',
+ 'body': 'body',
+ },
+ 'collection_format_map': {
+ }
+ },
+ headers_map={
+ 'accept': [],
+ 'content_type': [],
+ },
+ api_client=api_client,
+ callable=__update_user
+ )
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api_client.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api_client.py
new file mode 100644
index 00000000000..a43e4ace242
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/api_client.py
@@ -0,0 +1,849 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import json
+import atexit
+import mimetypes
+from multiprocessing.pool import ThreadPool
+import io
+import os
+import re
+import typing
+from urllib.parse import quote
+from urllib3.fields import RequestField
+
+
+from petstore_api import rest
+from petstore_api.configuration import Configuration
+from petstore_api.exceptions import ApiTypeError, ApiValueError, ApiException
+from petstore_api.model_utils import (
+ ModelNormal,
+ ModelSimple,
+ ModelComposed,
+ check_allowed_values,
+ check_validations,
+ date,
+ datetime,
+ deserialize_file,
+ file_type,
+ model_to_dict,
+ none_type,
+ validate_and_convert_types
+)
+
+
+class ApiClient(object):
+ """Generic API client for OpenAPI client library builds.
+
+ OpenAPI generic API client. This client handles the client-
+ server communication, and is invariant across implementations. Specifics of
+ the methods and models for each application are generated from the OpenAPI
+ templates.
+
+ NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+ Do not edit the class manually.
+
+ :param configuration: .Configuration object for this client
+ :param header_name: a header to pass when making calls to the API.
+ :param header_value: a header value to pass when making calls to
+ the API.
+ :param cookie: a cookie to include in the header when making calls
+ to the API
+ :param pool_threads: The number of threads to use for async requests
+ to the API. More threads means more concurrent API requests.
+ """
+
+ _pool = None
+
+ def __init__(self, configuration=None, header_name=None, header_value=None,
+ cookie=None, pool_threads=1):
+ if configuration is None:
+ configuration = Configuration.get_default_copy()
+ self.configuration = configuration
+ self.pool_threads = pool_threads
+
+ self.rest_client = rest.RESTClientObject(configuration)
+ self.default_headers = {}
+ if header_name is not None:
+ self.default_headers[header_name] = header_value
+ self.cookie = cookie
+ # Set default User-Agent.
+ self.user_agent = 'OpenAPI-Generator/1.0.0/python'
+
+ def __enter__(self):
+ return self
+
+ def __exit__(self, exc_type, exc_value, traceback):
+ self.close()
+
+ def close(self):
+ if self._pool:
+ self._pool.close()
+ self._pool.join()
+ self._pool = None
+ if hasattr(atexit, 'unregister'):
+ atexit.unregister(self.close)
+
+ @property
+ def pool(self):
+ """Create thread pool on first request
+ avoids instantiating unused threadpool for blocking clients.
+ """
+ if self._pool is None:
+ atexit.register(self.close)
+ self._pool = ThreadPool(self.pool_threads)
+ return self._pool
+
+ @property
+ def user_agent(self):
+ """User agent for this API client"""
+ return self.default_headers['User-Agent']
+
+ @user_agent.setter
+ def user_agent(self, value):
+ self.default_headers['User-Agent'] = value
+
+ def set_default_header(self, header_name, header_value):
+ self.default_headers[header_name] = header_value
+
+ def __call_api(
+ self,
+ resource_path: str,
+ method: str,
+ path_params: typing.Optional[typing.Dict[str, typing.Any]] = None,
+ query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None,
+ header_params: typing.Optional[typing.Dict[str, typing.Any]] = None,
+ body: typing.Optional[typing.Any] = None,
+ post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None,
+ files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None,
+ response_type: typing.Optional[typing.Tuple[typing.Any]] = None,
+ auth_settings: typing.Optional[typing.List[str]] = None,
+ _return_http_data_only: typing.Optional[bool] = None,
+ collection_formats: typing.Optional[typing.Dict[str, str]] = None,
+ _preload_content: bool = True,
+ _request_timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ _host: typing.Optional[str] = None,
+ _check_type: typing.Optional[bool] = None
+ ):
+
+ config = self.configuration
+
+ # header parameters
+ header_params = header_params or {}
+ header_params.update(self.default_headers)
+ if self.cookie:
+ header_params['Cookie'] = self.cookie
+ if header_params:
+ header_params = self.sanitize_for_serialization(header_params)
+ header_params = dict(self.parameters_to_tuples(header_params,
+ collection_formats))
+
+ # path parameters
+ if path_params:
+ path_params = self.sanitize_for_serialization(path_params)
+ path_params = self.parameters_to_tuples(path_params,
+ collection_formats)
+ for k, v in path_params:
+ # specified safe chars, encode everything
+ resource_path = resource_path.replace(
+ '{%s}' % k,
+ quote(str(v), safe=config.safe_chars_for_path_param)
+ )
+
+ # query parameters
+ if query_params:
+ query_params = self.sanitize_for_serialization(query_params)
+ query_params = self.parameters_to_tuples(query_params,
+ collection_formats)
+
+ # post parameters
+ if post_params or files:
+ post_params = post_params if post_params else []
+ post_params = self.sanitize_for_serialization(post_params)
+ post_params = self.parameters_to_tuples(post_params,
+ collection_formats)
+ post_params.extend(self.files_parameters(files))
+ if header_params['Content-Type'].startswith("multipart"):
+ post_params = self.parameters_to_multipart(post_params,
+ (dict) )
+
+ # body
+ if body:
+ body = self.sanitize_for_serialization(body)
+
+ # auth setting
+ self.update_params_for_auth(header_params, query_params,
+ auth_settings, resource_path, method, body)
+
+ # request url
+ if _host is None:
+ url = self.configuration.host + resource_path
+ else:
+ # use server/host defined in path or operation instead
+ url = _host + resource_path
+
+ try:
+ # perform request and return response
+ response_data = self.request(
+ method, url, query_params=query_params, headers=header_params,
+ post_params=post_params, body=body,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout)
+ except ApiException as e:
+ e.body = e.body.decode('utf-8')
+ raise e
+
+ self.last_response = response_data
+
+ return_data = response_data
+
+ if not _preload_content:
+ return (return_data)
+ return return_data
+
+ # deserialize response data
+ if response_type:
+ if response_type != (file_type,):
+ encoding = "utf-8"
+ content_type = response_data.getheader('content-type')
+ if content_type is not None:
+ match = re.search(r"charset=([a-zA-Z\-\d]+)[\s\;]?", content_type)
+ if match:
+ encoding = match.group(1)
+ response_data.data = response_data.data.decode(encoding)
+
+ return_data = self.deserialize(
+ response_data,
+ response_type,
+ _check_type
+ )
+ else:
+ return_data = None
+
+ if _return_http_data_only:
+ return (return_data)
+ else:
+ return (return_data, response_data.status,
+ response_data.getheaders())
+
+ def parameters_to_multipart(self, params, collection_types):
+ """Get parameters as list of tuples, formatting as json if value is collection_types
+
+ :param params: Parameters as list of two-tuples
+ :param dict collection_types: Parameter collection types
+ :return: Parameters as list of tuple or urllib3.fields.RequestField
+ """
+ new_params = []
+ if collection_types is None:
+ collection_types = (dict)
+ for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501
+ if isinstance(v, collection_types): # v is instance of collection_type, formatting as application/json
+ v = json.dumps(v, ensure_ascii=False).encode("utf-8")
+ field = RequestField(k, v)
+ field.make_multipart(content_type="application/json; charset=utf-8")
+ new_params.append(field)
+ else:
+ new_params.append((k, v))
+ return new_params
+
+ @classmethod
+ def sanitize_for_serialization(cls, obj):
+ """Prepares data for transmission before it is sent with the rest client
+ If obj is None, return None.
+ If obj is str, int, long, float, bool, return directly.
+ If obj is datetime.datetime, datetime.date
+ convert to string in iso8601 format.
+ If obj is list, sanitize each element in the list.
+ If obj is dict, return the dict.
+ If obj is OpenAPI model, return the properties dict.
+ If obj is io.IOBase, return the bytes
+ :param obj: The data to serialize.
+ :return: The serialized form of data.
+ """
+ if isinstance(obj, (ModelNormal, ModelComposed)):
+ return {
+ key: cls.sanitize_for_serialization(val) for key, val in model_to_dict(obj, serialize=True).items()
+ }
+ elif isinstance(obj, io.IOBase):
+ return cls.get_file_data_and_close_file(obj)
+ elif isinstance(obj, (str, int, float, none_type, bool)):
+ return obj
+ elif isinstance(obj, (datetime, date)):
+ return obj.isoformat()
+ elif isinstance(obj, ModelSimple):
+ return cls.sanitize_for_serialization(obj.value)
+ elif isinstance(obj, (list, tuple)):
+ return [cls.sanitize_for_serialization(item) for item in obj]
+ if isinstance(obj, dict):
+ return {key: cls.sanitize_for_serialization(val) for key, val in obj.items()}
+ raise ApiValueError('Unable to prepare type {} for serialization'.format(obj.__class__.__name__))
+
+ def deserialize(self, response, response_type, _check_type):
+ """Deserializes response into an object.
+
+ :param response: RESTResponse object to be deserialized.
+ :param response_type: For the response, a tuple containing:
+ valid classes
+ a list containing valid classes (for list schemas)
+ a dict containing a tuple of valid classes as the value
+ Example values:
+ (str,)
+ (Pet,)
+ (float, none_type)
+ ([int, none_type],)
+ ({str: (bool, str, int, float, date, datetime, str, none_type)},)
+ :param _check_type: boolean, whether to check the types of the data
+ received from the server
+ :type _check_type: bool
+
+ :return: deserialized object.
+ """
+ # handle file downloading
+ # save response body into a tmp file and return the instance
+ if response_type == (file_type,):
+ content_disposition = response.getheader("Content-Disposition")
+ return deserialize_file(response.data, self.configuration,
+ content_disposition=content_disposition)
+
+ # fetch data from response object
+ try:
+ received_data = json.loads(response.data)
+ except ValueError:
+ received_data = response.data
+
+ # store our data under the key of 'received_data' so users have some
+ # context if they are deserializing a string and the data type is wrong
+ deserialized_data = validate_and_convert_types(
+ received_data,
+ response_type,
+ ['received_data'],
+ True,
+ _check_type,
+ configuration=self.configuration
+ )
+ return deserialized_data
+
+ def call_api(
+ self,
+ resource_path: str,
+ method: str,
+ path_params: typing.Optional[typing.Dict[str, typing.Any]] = None,
+ query_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None,
+ header_params: typing.Optional[typing.Dict[str, typing.Any]] = None,
+ body: typing.Optional[typing.Any] = None,
+ post_params: typing.Optional[typing.List[typing.Tuple[str, typing.Any]]] = None,
+ files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None,
+ response_type: typing.Optional[typing.Tuple[typing.Any]] = None,
+ auth_settings: typing.Optional[typing.List[str]] = None,
+ async_req: typing.Optional[bool] = None,
+ _return_http_data_only: typing.Optional[bool] = None,
+ collection_formats: typing.Optional[typing.Dict[str, str]] = None,
+ _preload_content: bool = True,
+ _request_timeout: typing.Optional[typing.Union[int, typing.Tuple]] = None,
+ _host: typing.Optional[str] = None,
+ _check_type: typing.Optional[bool] = None
+ ):
+ """Makes the HTTP request (synchronous) and returns deserialized data.
+
+ To make an async_req request, set the async_req parameter.
+
+ :param resource_path: Path to method endpoint.
+ :param method: Method to call.
+ :param path_params: Path parameters in the url.
+ :param query_params: Query parameters in the url.
+ :param header_params: Header parameters to be
+ placed in the request header.
+ :param body: Request body.
+ :param post_params dict: Request post form parameters,
+ for `application/x-www-form-urlencoded`, `multipart/form-data`.
+ :param auth_settings list: Auth Settings names for the request.
+ :param response_type: For the response, a tuple containing:
+ valid classes
+ a list containing valid classes (for list schemas)
+ a dict containing a tuple of valid classes as the value
+ Example values:
+ (str,)
+ (Pet,)
+ (float, none_type)
+ ([int, none_type],)
+ ({str: (bool, str, int, float, date, datetime, str, none_type)},)
+ :param files: key -> field name, value -> a list of open file
+ objects for `multipart/form-data`.
+ :type files: dict
+ :param async_req bool: execute request asynchronously
+ :type async_req: bool, optional
+ :param _return_http_data_only: response data without head status code
+ and headers
+ :type _return_http_data_only: bool, optional
+ :param collection_formats: dict of collection formats for path, query,
+ header, and post parameters.
+ :type collection_formats: dict, optional
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :type _preload_content: bool, optional
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ :param _check_type: boolean describing if the data back from the server
+ should have its type checked.
+ :type _check_type: bool, optional
+ :return:
+ If async_req parameter is True,
+ the request will be called asynchronously.
+ The method will return the request thread.
+ If parameter async_req is False or missing,
+ then the method will return the response directly.
+ """
+ if not async_req:
+ return self.__call_api(resource_path, method,
+ path_params, query_params, header_params,
+ body, post_params, files,
+ response_type, auth_settings,
+ _return_http_data_only, collection_formats,
+ _preload_content, _request_timeout, _host,
+ _check_type)
+
+ return self.pool.apply_async(self.__call_api, (resource_path,
+ method, path_params,
+ query_params,
+ header_params, body,
+ post_params, files,
+ response_type,
+ auth_settings,
+ _return_http_data_only,
+ collection_formats,
+ _preload_content,
+ _request_timeout,
+ _host, _check_type))
+
+ def request(self, method, url, query_params=None, headers=None,
+ post_params=None, body=None, _preload_content=True,
+ _request_timeout=None):
+ """Makes the HTTP request using RESTClient."""
+ if method == "GET":
+ return self.rest_client.GET(url,
+ query_params=query_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ headers=headers)
+ elif method == "HEAD":
+ return self.rest_client.HEAD(url,
+ query_params=query_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ headers=headers)
+ elif method == "OPTIONS":
+ return self.rest_client.OPTIONS(url,
+ query_params=query_params,
+ headers=headers,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+ elif method == "POST":
+ return self.rest_client.POST(url,
+ query_params=query_params,
+ headers=headers,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+ elif method == "PUT":
+ return self.rest_client.PUT(url,
+ query_params=query_params,
+ headers=headers,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+ elif method == "PATCH":
+ return self.rest_client.PATCH(url,
+ query_params=query_params,
+ headers=headers,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+ elif method == "DELETE":
+ return self.rest_client.DELETE(url,
+ query_params=query_params,
+ headers=headers,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+ else:
+ raise ApiValueError(
+ "http method must be `GET`, `HEAD`, `OPTIONS`,"
+ " `POST`, `PATCH`, `PUT` or `DELETE`."
+ )
+
+ def parameters_to_tuples(self, params, collection_formats):
+ """Get parameters as list of tuples, formatting collections.
+
+ :param params: Parameters as dict or list of two-tuples
+ :param dict collection_formats: Parameter collection formats
+ :return: Parameters as list of tuples, collections formatted
+ """
+ new_params = []
+ if collection_formats is None:
+ collection_formats = {}
+ for k, v in params.items() if isinstance(params, dict) else params: # noqa: E501
+ if k in collection_formats:
+ collection_format = collection_formats[k]
+ if collection_format == 'multi':
+ new_params.extend((k, value) for value in v)
+ else:
+ if collection_format == 'ssv':
+ delimiter = ' '
+ elif collection_format == 'tsv':
+ delimiter = '\t'
+ elif collection_format == 'pipes':
+ delimiter = '|'
+ else: # csv is the default
+ delimiter = ','
+ new_params.append(
+ (k, delimiter.join(str(value) for value in v)))
+ else:
+ new_params.append((k, v))
+ return new_params
+
+ @staticmethod
+ def get_file_data_and_close_file(file_instance: io.IOBase) -> bytes:
+ file_data = file_instance.read()
+ file_instance.close()
+ return file_data
+
+ def files_parameters(self, files: typing.Optional[typing.Dict[str, typing.List[io.IOBase]]] = None):
+ """Builds form parameters.
+
+ :param files: None or a dict with key=param_name and
+ value is a list of open file objects
+ :return: List of tuples of form parameters with file data
+ """
+ if files is None:
+ return []
+
+ params = []
+ for param_name, file_instances in files.items():
+ if file_instances is None:
+ # if the file field is nullable, skip None values
+ continue
+ for file_instance in file_instances:
+ if file_instance is None:
+ # if the file field is nullable, skip None values
+ continue
+ if file_instance.closed is True:
+ raise ApiValueError(
+ "Cannot read a closed file. The passed in file_type "
+ "for %s must be open." % param_name
+ )
+ filename = os.path.basename(file_instance.name)
+ filedata = self.get_file_data_and_close_file(file_instance)
+ mimetype = (mimetypes.guess_type(filename)[0] or
+ 'application/octet-stream')
+ params.append(
+ tuple([param_name, tuple([filename, filedata, mimetype])]))
+
+ return params
+
+ def select_header_accept(self, accepts):
+ """Returns `Accept` based on an array of accepts provided.
+
+ :param accepts: List of headers.
+ :return: Accept (e.g. application/json).
+ """
+ if not accepts:
+ return
+
+ accepts = [x.lower() for x in accepts]
+
+ if 'application/json' in accepts:
+ return 'application/json'
+ else:
+ return ', '.join(accepts)
+
+ def select_header_content_type(self, content_types):
+ """Returns `Content-Type` based on an array of content_types provided.
+
+ :param content_types: List of content-types.
+ :return: Content-Type (e.g. application/json).
+ """
+ if not content_types:
+ return 'application/json'
+
+ content_types = [x.lower() for x in content_types]
+
+ if 'application/json' in content_types or '*/*' in content_types:
+ return 'application/json'
+ else:
+ return content_types[0]
+
+ def update_params_for_auth(self, headers, querys, auth_settings,
+ resource_path, method, body):
+ """Updates header and query params based on authentication setting.
+
+ :param headers: Header parameters dict to be updated.
+ :param querys: Query parameters tuple list to be updated.
+ :param auth_settings: Authentication setting identifiers list.
+ :param resource_path: A string representation of the HTTP request resource path.
+ :param method: A string representation of the HTTP request method.
+ :param body: A object representing the body of the HTTP request.
+ The object type is the return value of _encoder.default().
+ """
+ if not auth_settings:
+ return
+
+ for auth in auth_settings:
+ auth_setting = self.configuration.auth_settings().get(auth)
+ if auth_setting:
+ if auth_setting['in'] == 'cookie':
+ headers['Cookie'] = auth_setting['value']
+ elif auth_setting['in'] == 'header':
+ if auth_setting['type'] != 'http-signature':
+ headers[auth_setting['key']] = auth_setting['value']
+ elif auth_setting['in'] == 'query':
+ querys.append((auth_setting['key'], auth_setting['value']))
+ else:
+ raise ApiValueError(
+ 'Authentication token must be in `query` or `header`'
+ )
+
+
+class Endpoint(object):
+ def __init__(self, settings=None, params_map=None, root_map=None,
+ headers_map=None, api_client=None, callable=None):
+ """Creates an endpoint
+
+ Args:
+ settings (dict): see below key value pairs
+ 'response_type' (tuple/None): response type
+ 'auth' (list): a list of auth type keys
+ 'endpoint_path' (str): the endpoint path
+ 'operation_id' (str): endpoint string identifier
+ 'http_method' (str): POST/PUT/PATCH/GET etc
+ 'servers' (list): list of str servers that this endpoint is at
+ params_map (dict): see below key value pairs
+ 'all' (list): list of str endpoint parameter names
+ 'required' (list): list of required parameter names
+ 'nullable' (list): list of nullable parameter names
+ 'enum' (list): list of parameters with enum values
+ 'validation' (list): list of parameters with validations
+ root_map
+ 'validations' (dict): the dict mapping endpoint parameter tuple
+ paths to their validation dictionaries
+ 'allowed_values' (dict): the dict mapping endpoint parameter
+ tuple paths to their allowed_values (enum) dictionaries
+ 'openapi_types' (dict): param_name to openapi type
+ 'attribute_map' (dict): param_name to camelCase name
+ 'location_map' (dict): param_name to 'body', 'file', 'form',
+ 'header', 'path', 'query'
+ collection_format_map (dict): param_name to `csv` etc.
+ headers_map (dict): see below key value pairs
+ 'accept' (list): list of Accept header strings
+ 'content_type' (list): list of Content-Type header strings
+ api_client (ApiClient) api client instance
+ callable (function): the function which is invoked when the
+ Endpoint is called
+ """
+ self.settings = settings
+ self.params_map = params_map
+ self.params_map['all'].extend([
+ 'async_req',
+ '_host_index',
+ '_preload_content',
+ '_request_timeout',
+ '_return_http_data_only',
+ '_check_input_type',
+ '_check_return_type'
+ ])
+ self.params_map['nullable'].extend(['_request_timeout'])
+ self.validations = root_map['validations']
+ self.allowed_values = root_map['allowed_values']
+ self.openapi_types = root_map['openapi_types']
+ extra_types = {
+ 'async_req': (bool,),
+ '_host_index': (none_type, int),
+ '_preload_content': (bool,),
+ '_request_timeout': (none_type, int, (int,), [int]),
+ '_return_http_data_only': (bool,),
+ '_check_input_type': (bool,),
+ '_check_return_type': (bool,)
+ }
+ self.openapi_types.update(extra_types)
+ self.attribute_map = root_map['attribute_map']
+ self.location_map = root_map['location_map']
+ self.collection_format_map = root_map['collection_format_map']
+ self.headers_map = headers_map
+ self.api_client = api_client
+ self.callable = callable
+
+ def __validate_inputs(self, kwargs):
+ for param in self.params_map['enum']:
+ if param in kwargs:
+ check_allowed_values(
+ self.allowed_values,
+ (param,),
+ kwargs[param]
+ )
+
+ for param in self.params_map['validation']:
+ if param in kwargs:
+ check_validations(
+ self.validations,
+ (param,),
+ kwargs[param],
+ configuration=self.api_client.configuration
+ )
+
+ if kwargs['_check_input_type'] is False:
+ return
+
+ for key, value in kwargs.items():
+ fixed_val = validate_and_convert_types(
+ value,
+ self.openapi_types[key],
+ [key],
+ False,
+ kwargs['_check_input_type'],
+ configuration=self.api_client.configuration
+ )
+ kwargs[key] = fixed_val
+
+ def __gather_params(self, kwargs):
+ params = {
+ 'body': None,
+ 'collection_format': {},
+ 'file': {},
+ 'form': [],
+ 'header': {},
+ 'path': {},
+ 'query': []
+ }
+
+ for param_name, param_value in kwargs.items():
+ param_location = self.location_map.get(param_name)
+ if param_location is None:
+ continue
+ if param_location:
+ if param_location == 'body':
+ params['body'] = param_value
+ continue
+ base_name = self.attribute_map[param_name]
+ if (param_location == 'form' and
+ self.openapi_types[param_name] == (file_type,)):
+ params['file'][param_name] = [param_value]
+ elif (param_location == 'form' and
+ self.openapi_types[param_name] == ([file_type],)):
+ # param_value is already a list
+ params['file'][param_name] = param_value
+ elif param_location in {'form', 'query'}:
+ param_value_full = (base_name, param_value)
+ params[param_location].append(param_value_full)
+ if param_location not in {'form', 'query'}:
+ params[param_location][base_name] = param_value
+ collection_format = self.collection_format_map.get(param_name)
+ if collection_format:
+ params['collection_format'][base_name] = collection_format
+
+ return params
+
+ def __call__(self, *args, **kwargs):
+ """ This method is invoked when endpoints are called
+ Example:
+
+ api_instance = AnotherFakeApi()
+ api_instance.call_123_test_special_tags # this is an instance of the class Endpoint
+ api_instance.call_123_test_special_tags() # this invokes api_instance.call_123_test_special_tags.__call__()
+ which then invokes the callable functions stored in that endpoint at
+ api_instance.call_123_test_special_tags.callable or self.callable in this class
+
+ """
+ return self.callable(self, *args, **kwargs)
+
+ def call_with_http_info(self, **kwargs):
+
+ try:
+ index = self.api_client.configuration.server_operation_index.get(
+ self.settings['operation_id'], self.api_client.configuration.server_index
+ ) if kwargs['_host_index'] is None else kwargs['_host_index']
+ server_variables = self.api_client.configuration.server_operation_variables.get(
+ self.settings['operation_id'], self.api_client.configuration.server_variables
+ )
+ _host = self.api_client.configuration.get_host_from_settings(
+ index, variables=server_variables, servers=self.settings['servers']
+ )
+ except IndexError:
+ if self.settings['servers']:
+ raise ApiValueError(
+ "Invalid host index. Must be 0 <= index < %s" %
+ len(self.settings['servers'])
+ )
+ _host = None
+
+ for key, value in kwargs.items():
+ if key not in self.params_map['all']:
+ raise ApiTypeError(
+ "Got an unexpected parameter '%s'"
+ " to method `%s`" %
+ (key, self.settings['operation_id'])
+ )
+ # only throw this nullable ApiValueError if _check_input_type
+ # is False, if _check_input_type==True we catch this case
+ # in self.__validate_inputs
+ if (key not in self.params_map['nullable'] and value is None
+ and kwargs['_check_input_type'] is False):
+ raise ApiValueError(
+ "Value may not be None for non-nullable parameter `%s`"
+ " when calling `%s`" %
+ (key, self.settings['operation_id'])
+ )
+
+ for key in self.params_map['required']:
+ if key not in kwargs.keys():
+ raise ApiValueError(
+ "Missing the required parameter `%s` when calling "
+ "`%s`" % (key, self.settings['operation_id'])
+ )
+
+ self.__validate_inputs(kwargs)
+
+ params = self.__gather_params(kwargs)
+
+ accept_headers_list = self.headers_map['accept']
+ if accept_headers_list:
+ params['header']['Accept'] = self.api_client.select_header_accept(
+ accept_headers_list)
+
+ content_type_headers_list = self.headers_map['content_type']
+ if content_type_headers_list:
+ header_list = self.api_client.select_header_content_type(
+ content_type_headers_list)
+ params['header']['Content-Type'] = header_list
+
+ return self.api_client.call_api(
+ self.settings['endpoint_path'], self.settings['http_method'],
+ params['path'],
+ params['query'],
+ params['header'],
+ body=params['body'],
+ post_params=params['form'],
+ files=params['file'],
+ response_type=self.settings['response_type'],
+ auth_settings=self.settings['auth'],
+ async_req=kwargs['async_req'],
+ _check_type=kwargs['_check_return_type'],
+ _return_http_data_only=kwargs['_return_http_data_only'],
+ _preload_content=kwargs['_preload_content'],
+ _request_timeout=kwargs['_request_timeout'],
+ _host=_host,
+ collection_formats=params['collection_format'])
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/apis/__init__.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/apis/__init__.py
new file mode 100644
index 00000000000..e4c52458a0c
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/apis/__init__.py
@@ -0,0 +1,22 @@
+
+# flake8: noqa
+
+# Import all APIs into this package.
+# If you have many APIs here with many many models used in each API this may
+# raise a `RecursionError`.
+# In order to avoid this, import only the API that you directly need like:
+#
+# from .api.another_fake_api import AnotherFakeApi
+#
+# or import this package, but before doing it, use:
+#
+# import sys
+# sys.setrecursionlimit(n)
+
+# Import APIs into API package:
+from petstore_api.api.another_fake_api import AnotherFakeApi
+from petstore_api.api.fake_api import FakeApi
+from petstore_api.api.fake_classname_tags_123_api import FakeClassnameTags123Api
+from petstore_api.api.pet_api import PetApi
+from petstore_api.api.store_api import StoreApi
+from petstore_api.api.user_api import UserApi
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/configuration.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/configuration.py
new file mode 100644
index 00000000000..ccd984b7f5f
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/configuration.py
@@ -0,0 +1,511 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import copy
+import logging
+import multiprocessing
+import sys
+import urllib3
+
+from http import client as http_client
+from petstore_api.exceptions import ApiValueError
+
+
+JSON_SCHEMA_VALIDATION_KEYWORDS = {
+ 'multipleOf', 'maximum', 'exclusiveMaximum',
+ 'minimum', 'exclusiveMinimum', 'maxLength',
+ 'minLength', 'pattern', 'maxItems', 'minItems'
+}
+
+class Configuration(object):
+ """NOTE: This class is auto generated by OpenAPI Generator
+
+ Ref: https://openapi-generator.tech
+ Do not edit the class manually.
+
+ :param host: Base url
+ :param api_key: Dict to store API key(s).
+ Each entry in the dict specifies an API key.
+ The dict key is the name of the security scheme in the OAS specification.
+ The dict value is the API key secret.
+ :param api_key_prefix: Dict to store API prefix (e.g. Bearer)
+ The dict key is the name of the security scheme in the OAS specification.
+ The dict value is an API key prefix when generating the auth data.
+ :param username: Username for HTTP basic authentication
+ :param password: Password for HTTP basic authentication
+ :param discard_unknown_keys: Boolean value indicating whether to discard
+ unknown properties. A server may send a response that includes additional
+ properties that are not known by the client in the following scenarios:
+ 1. The OpenAPI document is incomplete, i.e. it does not match the server
+ implementation.
+ 2. The client was generated using an older version of the OpenAPI document
+ and the server has been upgraded since then.
+ If a schema in the OpenAPI document defines the additionalProperties attribute,
+ then all undeclared properties received by the server are injected into the
+ additional properties map. In that case, there are undeclared properties, and
+ nothing to discard.
+ :param disabled_client_side_validations (string): Comma-separated list of
+ JSON schema validation keywords to disable JSON schema structural validation
+ rules. The following keywords may be specified: multipleOf, maximum,
+ exclusiveMaximum, minimum, exclusiveMinimum, maxLength, minLength, pattern,
+ maxItems, minItems.
+ By default, the validation is performed for data generated locally by the client
+ and data received from the server, independent of any validation performed by
+ the server side. If the input data does not satisfy the JSON schema validation
+ rules specified in the OpenAPI document, an exception is raised.
+ If disabled_client_side_validations is set, structural validation is
+ disabled. This can be useful to troubleshoot data validation problem, such as
+ when the OpenAPI document validation rules do not match the actual API data
+ received by the server.
+ :param server_index: Index to servers configuration.
+ :param server_variables: Mapping with string values to replace variables in
+ templated server configuration. The validation of enums is performed for
+ variables with defined enum values before.
+ :param server_operation_index: Mapping from operation ID to an index to server
+ configuration.
+ :param server_operation_variables: Mapping from operation ID to a mapping with
+ string values to replace variables in templated server configuration.
+ The validation of enums is performed for variables with defined enum values before.
+ :param ssl_ca_cert: str - the path to a file of concatenated CA certificates
+ in PEM format
+
+ :Example:
+
+ API Key Authentication Example.
+ Given the following security scheme in the OpenAPI specification:
+ components:
+ securitySchemes:
+ cookieAuth: # name for the security scheme
+ type: apiKey
+ in: cookie
+ name: JSESSIONID # cookie name
+
+ You can programmatically set the cookie:
+
+conf = petstore_api.Configuration(
+ api_key={'cookieAuth': 'abc123'}
+ api_key_prefix={'cookieAuth': 'JSESSIONID'}
+)
+
+ The following cookie will be added to the HTTP request:
+ Cookie: JSESSIONID abc123
+
+ HTTP Basic Authentication Example.
+ Given the following security scheme in the OpenAPI specification:
+ components:
+ securitySchemes:
+ http_basic_auth:
+ type: http
+ scheme: basic
+
+ Configure API client with HTTP basic authentication:
+
+conf = petstore_api.Configuration(
+ username='the-user',
+ password='the-password',
+)
+
+ """
+
+ _default = None
+
+ def __init__(self, host=None,
+ api_key=None, api_key_prefix=None,
+ access_token=None,
+ username=None, password=None,
+ discard_unknown_keys=False,
+ disabled_client_side_validations="",
+ server_index=None, server_variables=None,
+ server_operation_index=None, server_operation_variables=None,
+ ssl_ca_cert=None,
+ ):
+ """Constructor
+ """
+ self._base_path = "http://petstore.swagger.io:80/v2" if host is None else host
+ """Default Base url
+ """
+ self.server_index = 0 if server_index is None and host is None else server_index
+ self.server_operation_index = server_operation_index or {}
+ """Default server index
+ """
+ self.server_variables = server_variables or {}
+ self.server_operation_variables = server_operation_variables or {}
+ """Default server variables
+ """
+ self.temp_folder_path = None
+ """Temp file folder for downloading files
+ """
+ # Authentication Settings
+ self.access_token = access_token
+ self.api_key = {}
+ if api_key:
+ self.api_key = api_key
+ """dict to store API key(s)
+ """
+ self.api_key_prefix = {}
+ if api_key_prefix:
+ self.api_key_prefix = api_key_prefix
+ """dict to store API prefix (e.g. Bearer)
+ """
+ self.refresh_api_key_hook = None
+ """function hook to refresh API key if expired
+ """
+ self.username = username
+ """Username for HTTP basic authentication
+ """
+ self.password = password
+ """Password for HTTP basic authentication
+ """
+ self.discard_unknown_keys = discard_unknown_keys
+ self.disabled_client_side_validations = disabled_client_side_validations
+ self.logger = {}
+ """Logging Settings
+ """
+ self.logger["package_logger"] = logging.getLogger("petstore_api")
+ self.logger["urllib3_logger"] = logging.getLogger("urllib3")
+ self.logger_format = '%(asctime)s %(levelname)s %(message)s'
+ """Log format
+ """
+ self.logger_stream_handler = None
+ """Log stream handler
+ """
+ self.logger_file_handler = None
+ """Log file handler
+ """
+ self.logger_file = None
+ """Debug file location
+ """
+ self.debug = False
+ """Debug switch
+ """
+
+ self.verify_ssl = True
+ """SSL/TLS verification
+ Set this to false to skip verifying SSL certificate when calling API
+ from https server.
+ """
+ self.ssl_ca_cert = ssl_ca_cert
+ """Set this to customize the certificate file to verify the peer.
+ """
+ self.cert_file = None
+ """client certificate file
+ """
+ self.key_file = None
+ """client key file
+ """
+ self.assert_hostname = None
+ """Set this to True/False to enable/disable SSL hostname verification.
+ """
+
+ self.connection_pool_maxsize = multiprocessing.cpu_count() * 5
+ """urllib3 connection pool's maximum number of connections saved
+ per pool. urllib3 uses 1 connection as default value, but this is
+ not the best value when you are making a lot of possibly parallel
+ requests to the same host, which is often the case here.
+ cpu_count * 5 is used as default value to increase performance.
+ """
+
+ self.proxy = None
+ """Proxy URL
+ """
+ self.proxy_headers = None
+ """Proxy headers
+ """
+ self.safe_chars_for_path_param = ''
+ """Safe chars for path_param
+ """
+ self.retries = None
+ """Adding retries to override urllib3 default value 3
+ """
+ # Enable client side validation
+ self.client_side_validation = True
+
+ # Options to pass down to the underlying urllib3 socket
+ self.socket_options = None
+
+ def __deepcopy__(self, memo):
+ cls = self.__class__
+ result = cls.__new__(cls)
+ memo[id(self)] = result
+ for k, v in self.__dict__.items():
+ if k not in ('logger', 'logger_file_handler'):
+ setattr(result, k, copy.deepcopy(v, memo))
+ # shallow copy of loggers
+ result.logger = copy.copy(self.logger)
+ # use setters to configure loggers
+ result.logger_file = self.logger_file
+ result.debug = self.debug
+ return result
+
+ def __setattr__(self, name, value):
+ object.__setattr__(self, name, value)
+ if name == 'disabled_client_side_validations':
+ s = set(filter(None, value.split(',')))
+ for v in s:
+ if v not in JSON_SCHEMA_VALIDATION_KEYWORDS:
+ raise ApiValueError(
+ "Invalid keyword: '{0}''".format(v))
+ self._disabled_client_side_validations = s
+
+ @classmethod
+ def set_default(cls, default):
+ """Set default instance of configuration.
+
+ It stores default configuration, which can be
+ returned by get_default_copy method.
+
+ :param default: object of Configuration
+ """
+ cls._default = copy.deepcopy(default)
+
+ @classmethod
+ def get_default_copy(cls):
+ """Return new instance of configuration.
+
+ This method returns newly created, based on default constructor,
+ object of Configuration class or returns a copy of default
+ configuration passed by the set_default method.
+
+ :return: The configuration object.
+ """
+ if cls._default is not None:
+ return copy.deepcopy(cls._default)
+ return Configuration()
+
+ @property
+ def logger_file(self):
+ """The logger file.
+
+ If the logger_file is None, then add stream handler and remove file
+ handler. Otherwise, add file handler and remove stream handler.
+
+ :param value: The logger_file path.
+ :type: str
+ """
+ return self.__logger_file
+
+ @logger_file.setter
+ def logger_file(self, value):
+ """The logger file.
+
+ If the logger_file is None, then add stream handler and remove file
+ handler. Otherwise, add file handler and remove stream handler.
+
+ :param value: The logger_file path.
+ :type: str
+ """
+ self.__logger_file = value
+ if self.__logger_file:
+ # If set logging file,
+ # then add file handler and remove stream handler.
+ self.logger_file_handler = logging.FileHandler(self.__logger_file)
+ self.logger_file_handler.setFormatter(self.logger_formatter)
+ for _, logger in self.logger.items():
+ logger.addHandler(self.logger_file_handler)
+
+ @property
+ def debug(self):
+ """Debug status
+
+ :param value: The debug status, True or False.
+ :type: bool
+ """
+ return self.__debug
+
+ @debug.setter
+ def debug(self, value):
+ """Debug status
+
+ :param value: The debug status, True or False.
+ :type: bool
+ """
+ self.__debug = value
+ if self.__debug:
+ # if debug status is True, turn on debug logging
+ for _, logger in self.logger.items():
+ logger.setLevel(logging.DEBUG)
+ # turn on http_client debug
+ http_client.HTTPConnection.debuglevel = 1
+ else:
+ # if debug status is False, turn off debug logging,
+ # setting log level to default `logging.WARNING`
+ for _, logger in self.logger.items():
+ logger.setLevel(logging.WARNING)
+ # turn off http_client debug
+ http_client.HTTPConnection.debuglevel = 0
+
+ @property
+ def logger_format(self):
+ """The logger format.
+
+ The logger_formatter will be updated when sets logger_format.
+
+ :param value: The format string.
+ :type: str
+ """
+ return self.__logger_format
+
+ @logger_format.setter
+ def logger_format(self, value):
+ """The logger format.
+
+ The logger_formatter will be updated when sets logger_format.
+
+ :param value: The format string.
+ :type: str
+ """
+ self.__logger_format = value
+ self.logger_formatter = logging.Formatter(self.__logger_format)
+
+ def get_api_key_with_prefix(self, identifier, alias=None):
+ """Gets API key (with prefix if set).
+
+ :param identifier: The identifier of apiKey.
+ :param alias: The alternative identifier of apiKey.
+ :return: The token for api key authentication.
+ """
+ if self.refresh_api_key_hook is not None:
+ self.refresh_api_key_hook(self)
+ key = self.api_key.get(identifier, self.api_key.get(alias) if alias is not None else None)
+ if key:
+ prefix = self.api_key_prefix.get(identifier)
+ if prefix:
+ return "%s %s" % (prefix, key)
+ else:
+ return key
+
+ def get_basic_auth_token(self):
+ """Gets HTTP basic authentication header (string).
+
+ :return: The token for basic HTTP authentication.
+ """
+ username = ""
+ if self.username is not None:
+ username = self.username
+ password = ""
+ if self.password is not None:
+ password = self.password
+ return urllib3.util.make_headers(
+ basic_auth=username + ':' + password
+ ).get('authorization')
+
+ def auth_settings(self):
+ """Gets Auth Settings dict for api client.
+
+ :return: The Auth Settings information dict.
+ """
+ auth = {}
+ if 'api_key' in self.api_key:
+ auth['api_key'] = {
+ 'type': 'api_key',
+ 'in': 'header',
+ 'key': 'api_key',
+ 'value': self.get_api_key_with_prefix(
+ 'api_key',
+ ),
+ }
+ if 'api_key_query' in self.api_key:
+ auth['api_key_query'] = {
+ 'type': 'api_key',
+ 'in': 'query',
+ 'key': 'api_key_query',
+ 'value': self.get_api_key_with_prefix(
+ 'api_key_query',
+ ),
+ }
+ if self.username is not None and self.password is not None:
+ auth['http_basic_test'] = {
+ 'type': 'basic',
+ 'in': 'header',
+ 'key': 'Authorization',
+ 'value': self.get_basic_auth_token()
+ }
+ if self.access_token is not None:
+ auth['petstore_auth'] = {
+ 'type': 'oauth2',
+ 'in': 'header',
+ 'key': 'Authorization',
+ 'value': 'Bearer ' + self.access_token
+ }
+ return auth
+
+ def to_debug_report(self):
+ """Gets the essential information for debugging.
+
+ :return: The report for debugging.
+ """
+ return "Python SDK Debug Report:\n"\
+ "OS: {env}\n"\
+ "Python Version: {pyversion}\n"\
+ "Version of the API: 1.0.0\n"\
+ "SDK Package Version: 1.0.0".\
+ format(env=sys.platform, pyversion=sys.version)
+
+ def get_host_settings(self):
+ """Gets an array of host settings
+
+ :return: An array of host settings
+ """
+ return [
+ {
+ 'url': "http://petstore.swagger.io:80/v2",
+ 'description': "No description provided",
+ }
+ ]
+
+ def get_host_from_settings(self, index, variables=None, servers=None):
+ """Gets host URL based on the index and variables
+ :param index: array index of the host settings
+ :param variables: hash of variable and the corresponding value
+ :param servers: an array of host settings or None
+ :return: URL based on host settings
+ """
+ if index is None:
+ return self._base_path
+
+ variables = {} if variables is None else variables
+ servers = self.get_host_settings() if servers is None else servers
+
+ try:
+ server = servers[index]
+ except IndexError:
+ raise ValueError(
+ "Invalid index {0} when selecting the host settings. "
+ "Must be less than {1}".format(index, len(servers)))
+
+ url = server['url']
+
+ # go through variables and replace placeholders
+ for variable_name, variable in server.get('variables', {}).items():
+ used_value = variables.get(
+ variable_name, variable['default_value'])
+
+ if 'enum_values' in variable \
+ and used_value not in variable['enum_values']:
+ raise ValueError(
+ "The variable `{0}` in the host URL has invalid value "
+ "{1}. Must be {2}.".format(
+ variable_name, variables[variable_name],
+ variable['enum_values']))
+
+ url = url.replace("{" + variable_name + "}", used_value)
+
+ return url
+
+ @property
+ def host(self):
+ """Return generated host."""
+ return self.get_host_from_settings(self.server_index, variables=self.server_variables)
+
+ @host.setter
+ def host(self, value):
+ """Fix base path."""
+ self._base_path = value
+ self.server_index = None
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/exceptions.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/exceptions.py
new file mode 100644
index 00000000000..51527f60611
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/exceptions.py
@@ -0,0 +1,159 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+
+class OpenApiException(Exception):
+ """The base exception class for all OpenAPIExceptions"""
+
+
+class ApiTypeError(OpenApiException, TypeError):
+ def __init__(self, msg, path_to_item=None, valid_classes=None,
+ key_type=None):
+ """ Raises an exception for TypeErrors
+
+ Args:
+ msg (str): the exception message
+
+ Keyword Args:
+ path_to_item (list): a list of keys an indices to get to the
+ current_item
+ None if unset
+ valid_classes (tuple): the primitive classes that current item
+ should be an instance of
+ None if unset
+ key_type (bool): False if our value is a value in a dict
+ True if it is a key in a dict
+ False if our item is an item in a list
+ None if unset
+ """
+ self.path_to_item = path_to_item
+ self.valid_classes = valid_classes
+ self.key_type = key_type
+ full_msg = msg
+ if path_to_item:
+ full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
+ super(ApiTypeError, self).__init__(full_msg)
+
+
+class ApiValueError(OpenApiException, ValueError):
+ def __init__(self, msg, path_to_item=None):
+ """
+ Args:
+ msg (str): the exception message
+
+ Keyword Args:
+ path_to_item (list) the path to the exception in the
+ received_data dict. None if unset
+ """
+
+ self.path_to_item = path_to_item
+ full_msg = msg
+ if path_to_item:
+ full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
+ super(ApiValueError, self).__init__(full_msg)
+
+
+class ApiAttributeError(OpenApiException, AttributeError):
+ def __init__(self, msg, path_to_item=None):
+ """
+ Raised when an attribute reference or assignment fails.
+
+ Args:
+ msg (str): the exception message
+
+ Keyword Args:
+ path_to_item (None/list) the path to the exception in the
+ received_data dict
+ """
+ self.path_to_item = path_to_item
+ full_msg = msg
+ if path_to_item:
+ full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
+ super(ApiAttributeError, self).__init__(full_msg)
+
+
+class ApiKeyError(OpenApiException, KeyError):
+ def __init__(self, msg, path_to_item=None):
+ """
+ Args:
+ msg (str): the exception message
+
+ Keyword Args:
+ path_to_item (None/list) the path to the exception in the
+ received_data dict
+ """
+ self.path_to_item = path_to_item
+ full_msg = msg
+ if path_to_item:
+ full_msg = "{0} at {1}".format(msg, render_path(path_to_item))
+ super(ApiKeyError, self).__init__(full_msg)
+
+
+class ApiException(OpenApiException):
+
+ def __init__(self, status=None, reason=None, http_resp=None):
+ if http_resp:
+ self.status = http_resp.status
+ self.reason = http_resp.reason
+ self.body = http_resp.data
+ self.headers = http_resp.getheaders()
+ else:
+ self.status = status
+ self.reason = reason
+ self.body = None
+ self.headers = None
+
+ def __str__(self):
+ """Custom error messages for exception"""
+ error_message = "({0})\n"\
+ "Reason: {1}\n".format(self.status, self.reason)
+ if self.headers:
+ error_message += "HTTP response headers: {0}\n".format(
+ self.headers)
+
+ if self.body:
+ error_message += "HTTP response body: {0}\n".format(self.body)
+
+ return error_message
+
+
+class NotFoundException(ApiException):
+
+ def __init__(self, status=None, reason=None, http_resp=None):
+ super(NotFoundException, self).__init__(status, reason, http_resp)
+
+
+class UnauthorizedException(ApiException):
+
+ def __init__(self, status=None, reason=None, http_resp=None):
+ super(UnauthorizedException, self).__init__(status, reason, http_resp)
+
+
+class ForbiddenException(ApiException):
+
+ def __init__(self, status=None, reason=None, http_resp=None):
+ super(ForbiddenException, self).__init__(status, reason, http_resp)
+
+
+class ServiceException(ApiException):
+
+ def __init__(self, status=None, reason=None, http_resp=None):
+ super(ServiceException, self).__init__(status, reason, http_resp)
+
+
+def render_path(path_to_item):
+ """Returns a string representation of a path"""
+ result = ""
+ for pth in path_to_item:
+ if isinstance(pth, int):
+ result += "[{0}]".format(pth)
+ else:
+ result += "['{0}']".format(pth)
+ return result
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/__init__.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/__init__.py
new file mode 100644
index 00000000000..cfe32b78492
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/__init__.py
@@ -0,0 +1,5 @@
+# we can not import model classes here because that would create a circular
+# reference which would not work in python2
+# do not import all models into this module because that uses a lot of memory and stack frames
+# if you need the ability to import all models from one package, import them with
+# from {{packageName}.models import ModelA, ModelB
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_any_type.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_any_type.py
new file mode 100644
index 00000000000..7239795cf4a
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_any_type.py
@@ -0,0 +1,172 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class AdditionalPropertiesAnyType(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'name': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'name': 'name', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """AdditionalPropertiesAnyType - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_array.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_array.py
new file mode 100644
index 00000000000..7d9403758a0
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_array.py
@@ -0,0 +1,172 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class AdditionalPropertiesArray(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return ([bool, date, datetime, dict, float, int, list, str, none_type],) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'name': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'name': 'name', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """AdditionalPropertiesArray - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_boolean.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_boolean.py
new file mode 100644
index 00000000000..ca129b766ec
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_boolean.py
@@ -0,0 +1,172 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class AdditionalPropertiesBoolean(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'name': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'name': 'name', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """AdditionalPropertiesBoolean - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_class.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_class.py
new file mode 100644
index 00000000000..292f467aaa8
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_class.py
@@ -0,0 +1,196 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class AdditionalPropertiesClass(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'map_string': ({str: (str,)},), # noqa: E501
+ 'map_number': ({str: (float,)},), # noqa: E501
+ 'map_integer': ({str: (int,)},), # noqa: E501
+ 'map_boolean': ({str: (bool,)},), # noqa: E501
+ 'map_array_integer': ({str: ([int],)},), # noqa: E501
+ 'map_array_anytype': ({str: ([bool, date, datetime, dict, float, int, list, str, none_type],)},), # noqa: E501
+ 'map_map_string': ({str: ({str: (str,)},)},), # noqa: E501
+ 'map_map_anytype': ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)},)},), # noqa: E501
+ 'anytype_1': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
+ 'anytype_2': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
+ 'anytype_3': (bool, date, datetime, dict, float, int, list, str, none_type,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'map_string': 'map_string', # noqa: E501
+ 'map_number': 'map_number', # noqa: E501
+ 'map_integer': 'map_integer', # noqa: E501
+ 'map_boolean': 'map_boolean', # noqa: E501
+ 'map_array_integer': 'map_array_integer', # noqa: E501
+ 'map_array_anytype': 'map_array_anytype', # noqa: E501
+ 'map_map_string': 'map_map_string', # noqa: E501
+ 'map_map_anytype': 'map_map_anytype', # noqa: E501
+ 'anytype_1': 'anytype_1', # noqa: E501
+ 'anytype_2': 'anytype_2', # noqa: E501
+ 'anytype_3': 'anytype_3', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """AdditionalPropertiesClass - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ map_string ({str: (str,)}): [optional] # noqa: E501
+ map_number ({str: (float,)}): [optional] # noqa: E501
+ map_integer ({str: (int,)}): [optional] # noqa: E501
+ map_boolean ({str: (bool,)}): [optional] # noqa: E501
+ map_array_integer ({str: ([int],)}): [optional] # noqa: E501
+ map_array_anytype ({str: ([bool, date, datetime, dict, float, int, list, str, none_type],)}): [optional] # noqa: E501
+ map_map_string ({str: ({str: (str,)},)}): [optional] # noqa: E501
+ map_map_anytype ({str: ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)},)}): [optional] # noqa: E501
+ anytype_1 (bool, date, datetime, dict, float, int, list, str, none_type): [optional] # noqa: E501
+ anytype_2 (bool, date, datetime, dict, float, int, list, str, none_type): no type is set for this. [optional] # noqa: E501
+ anytype_3 (bool, date, datetime, dict, float, int, list, str, none_type): because of a bug in swagger-parser, this should have values {str: (str, int, float...)} but instead we get any type. See https://github.com/swagger-api/swagger-parser/issues/1378. [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_integer.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_integer.py
new file mode 100644
index 00000000000..87d78bf3600
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_integer.py
@@ -0,0 +1,172 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class AdditionalPropertiesInteger(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (int,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'name': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'name': 'name', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """AdditionalPropertiesInteger - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_number.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_number.py
new file mode 100644
index 00000000000..b10bd036ff3
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_number.py
@@ -0,0 +1,172 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class AdditionalPropertiesNumber(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (float,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'name': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'name': 'name', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """AdditionalPropertiesNumber - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_object.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_object.py
new file mode 100644
index 00000000000..000653f13a7
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_object.py
@@ -0,0 +1,172 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class AdditionalPropertiesObject(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return ({str: (bool, date, datetime, dict, float, int, list, str, none_type,)},) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'name': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'name': 'name', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """AdditionalPropertiesObject - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_string.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_string.py
new file mode 100644
index 00000000000..7f1f94aa6b6
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/additional_properties_string.py
@@ -0,0 +1,172 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class AdditionalPropertiesString(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (str,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'name': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'name': 'name', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """AdditionalPropertiesString - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/animal.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/animal.py
new file mode 100644
index 00000000000..a3d48b6ea97
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/animal.py
@@ -0,0 +1,185 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+def lazy_import():
+ from petstore_api.model.cat import Cat
+ from petstore_api.model.dog import Dog
+ globals()['Cat'] = Cat
+ globals()['Dog'] = Dog
+
+
+class Animal(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'class_name': (str,), # noqa: E501
+ 'color': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ lazy_import()
+ val = {
+ 'Cat': Cat,
+ 'Dog': Dog,
+ }
+ if not val:
+ return None
+ return {'class_name': val}
+
+ attribute_map = {
+ 'class_name': 'className', # noqa: E501
+ 'color': 'color', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, class_name, *args, **kwargs): # noqa: E501
+ """Animal - a model defined in OpenAPI
+
+ Args:
+ class_name (str):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.class_name = class_name
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/animal_farm.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/animal_farm.py
new file mode 100644
index 00000000000..838b18a1297
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/animal_farm.py
@@ -0,0 +1,184 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+def lazy_import():
+ from petstore_api.model.animal import Animal
+ globals()['Animal'] = Animal
+
+
+class AnimalFarm(ModelSimple):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'value': ([Animal],),
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {}
+
+ _composed_schemas = None
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs):
+ """AnimalFarm - a model defined in OpenAPI
+
+ Note that value can be passed either in args or in kwargs, but not in both.
+
+ Args:
+ args[0] ([Animal]): # noqa: E501
+
+ Keyword Args:
+ value ([Animal]): # noqa: E501
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+ # required up here when default value is not given
+ _path_to_item = kwargs.pop('_path_to_item', ())
+
+ if 'value' in kwargs:
+ value = kwargs.pop('value')
+ elif args:
+ args = list(args)
+ value = args.pop(0)
+ else:
+ raise ApiTypeError(
+ "value is required, but not passed in args or kwargs and doesn't have default",
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+ self.value = value
+ if kwargs:
+ raise ApiTypeError(
+ "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % (
+ kwargs,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/api_response.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/api_response.py
new file mode 100644
index 00000000000..01e2175b800
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/api_response.py
@@ -0,0 +1,172 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class ApiResponse(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'code': (int,), # noqa: E501
+ 'type': (str,), # noqa: E501
+ 'message': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'code': 'code', # noqa: E501
+ 'type': 'type', # noqa: E501
+ 'message': 'message', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """ApiResponse - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ code (int): [optional] # noqa: E501
+ type (str): [optional] # noqa: E501
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/array_of_array_of_number_only.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/array_of_array_of_number_only.py
new file mode 100644
index 00000000000..008b74dd42a
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/array_of_array_of_number_only.py
@@ -0,0 +1,166 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class ArrayOfArrayOfNumberOnly(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'array_array_number': ([[float]],), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'array_array_number': 'ArrayArrayNumber', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """ArrayOfArrayOfNumberOnly - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/array_of_number_only.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/array_of_number_only.py
new file mode 100644
index 00000000000..f2e080bc258
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/array_of_number_only.py
@@ -0,0 +1,166 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class ArrayOfNumberOnly(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'array_number': ([float],), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'array_number': 'ArrayNumber', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """ArrayOfNumberOnly - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/array_test.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/array_test.py
new file mode 100644
index 00000000000..ac42b07b93c
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/array_test.py
@@ -0,0 +1,177 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+def lazy_import():
+ from petstore_api.model.read_only_first import ReadOnlyFirst
+ globals()['ReadOnlyFirst'] = ReadOnlyFirst
+
+
+class ArrayTest(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'array_of_string': ([str],), # noqa: E501
+ 'array_array_of_integer': ([[int]],), # noqa: E501
+ 'array_array_of_model': ([[ReadOnlyFirst]],), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'array_of_string': 'array_of_string', # noqa: E501
+ 'array_array_of_integer': 'array_array_of_integer', # noqa: E501
+ 'array_array_of_model': 'array_array_of_model', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """ArrayTest - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ array_of_string ([str]): [optional] # noqa: E501
+ array_array_of_integer ([[int]]): [optional] # noqa: E501
+ array_array_of_model ([[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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/capitalization.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/capitalization.py
new file mode 100644
index 00000000000..710c17e51a5
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/capitalization.py
@@ -0,0 +1,181 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class Capitalization(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'small_camel': (str,), # noqa: E501
+ 'capital_camel': (str,), # noqa: E501
+ 'small_snake': (str,), # noqa: E501
+ 'capital_snake': (str,), # noqa: E501
+ 'sca_eth_flow_points': (str,), # noqa: E501
+ 'att_name': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'small_camel': 'smallCamel', # noqa: E501
+ 'capital_camel': 'CapitalCamel', # noqa: E501
+ 'small_snake': 'small_Snake', # noqa: E501
+ 'capital_snake': 'Capital_Snake', # noqa: E501
+ 'sca_eth_flow_points': 'SCA_ETH_Flow_Points', # noqa: E501
+ 'att_name': 'ATT_NAME', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """Capitalization - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ small_camel (str): [optional] # noqa: E501
+ capital_camel (str): [optional] # noqa: E501
+ small_snake (str): [optional] # noqa: E501
+ capital_snake (str): [optional] # noqa: E501
+ sca_eth_flow_points (str): [optional] # noqa: E501
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/cat.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/cat.py
new file mode 100644
index 00000000000..fd8d4bc7179
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/cat.py
@@ -0,0 +1,218 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+def lazy_import():
+ from petstore_api.model.animal import Animal
+ from petstore_api.model.cat_all_of import CatAllOf
+ globals()['Animal'] = Animal
+ globals()['CatAllOf'] = CatAllOf
+
+
+class Cat(ModelComposed):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'class_name': (str,), # noqa: E501
+ 'declawed': (bool,), # noqa: E501
+ 'color': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ val = {
+ }
+ if not val:
+ return None
+ return {'class_name': val}
+
+ attribute_map = {
+ 'class_name': 'className', # noqa: E501
+ 'declawed': 'declawed', # noqa: E501
+ 'color': 'color', # noqa: E501
+ }
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ '_composed_instances',
+ '_var_name_to_model_instances',
+ '_additional_properties_model_instances',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """Cat - a model defined in OpenAPI
+
+ Keyword Args:
+ class_name (str):
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ declawed (bool): [optional] # noqa: E501
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ constant_args = {
+ '_check_type': _check_type,
+ '_path_to_item': _path_to_item,
+ '_spec_property_naming': _spec_property_naming,
+ '_configuration': _configuration,
+ '_visited_composed_classes': self._visited_composed_classes,
+ }
+ composed_info = validate_get_composed_info(
+ constant_args, kwargs, self)
+ self._composed_instances = composed_info[0]
+ self._var_name_to_model_instances = composed_info[1]
+ self._additional_properties_model_instances = composed_info[2]
+ discarded_args = composed_info[3]
+
+ for var_name, var_value in kwargs.items():
+ if var_name in discarded_args and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self._additional_properties_model_instances:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+
+ @cached_property
+ def _composed_schemas():
+ # we need this here to make our import statements work
+ # we must store _composed_schemas in here so the code is only run
+ # when we invoke this method. If we kept this at the class
+ # level we would get an error beause the class level
+ # code would be run when this module is imported, and these composed
+ # classes don't exist yet because their module has not finished
+ # loading
+ lazy_import()
+ return {
+ 'anyOf': [
+ ],
+ 'allOf': [
+ Animal,
+ CatAllOf,
+ ],
+ 'oneOf': [
+ ],
+ }
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/cat_all_of.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/cat_all_of.py
new file mode 100644
index 00000000000..50b046510df
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/cat_all_of.py
@@ -0,0 +1,166 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class CatAllOf(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'declawed': (bool,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'declawed': 'declawed', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """CatAllOf - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/category.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/category.py
new file mode 100644
index 00000000000..ed167471d35
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/category.py
@@ -0,0 +1,173 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class Category(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'name': (str,), # noqa: E501
+ 'id': (int,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'name': 'name', # noqa: E501
+ 'id': 'id', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """Category - a model defined in OpenAPI
+
+ Args:
+
+ Keyword Args:
+ name (str): defaults to "default-name" # noqa: E501
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.name = name
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child.py
new file mode 100644
index 00000000000..d36723dd625
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child.py
@@ -0,0 +1,215 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+def lazy_import():
+ from petstore_api.model.child_all_of import ChildAllOf
+ from petstore_api.model.parent import Parent
+ globals()['ChildAllOf'] = ChildAllOf
+ globals()['Parent'] = Parent
+
+
+class Child(ModelComposed):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'radio_waves': (bool,), # noqa: E501
+ 'tele_vision': (bool,), # noqa: E501
+ 'inter_net': (bool,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'radio_waves': 'radioWaves', # noqa: E501
+ 'tele_vision': 'teleVision', # noqa: E501
+ 'inter_net': 'interNet', # noqa: E501
+ }
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ '_composed_instances',
+ '_var_name_to_model_instances',
+ '_additional_properties_model_instances',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """Child - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ radio_waves (bool): [optional] # noqa: E501
+ tele_vision (bool): [optional] # noqa: E501
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ constant_args = {
+ '_check_type': _check_type,
+ '_path_to_item': _path_to_item,
+ '_spec_property_naming': _spec_property_naming,
+ '_configuration': _configuration,
+ '_visited_composed_classes': self._visited_composed_classes,
+ }
+ composed_info = validate_get_composed_info(
+ constant_args, kwargs, self)
+ self._composed_instances = composed_info[0]
+ self._var_name_to_model_instances = composed_info[1]
+ self._additional_properties_model_instances = composed_info[2]
+ discarded_args = composed_info[3]
+
+ for var_name, var_value in kwargs.items():
+ if var_name in discarded_args and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self._additional_properties_model_instances:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+
+ @cached_property
+ def _composed_schemas():
+ # we need this here to make our import statements work
+ # we must store _composed_schemas in here so the code is only run
+ # when we invoke this method. If we kept this at the class
+ # level we would get an error beause the class level
+ # code would be run when this module is imported, and these composed
+ # classes don't exist yet because their module has not finished
+ # loading
+ lazy_import()
+ return {
+ 'anyOf': [
+ ],
+ 'allOf': [
+ ChildAllOf,
+ Parent,
+ ],
+ 'oneOf': [
+ ],
+ }
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_all_of.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_all_of.py
new file mode 100644
index 00000000000..2339e520bd6
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_all_of.py
@@ -0,0 +1,166 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class ChildAllOf(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'inter_net': (bool,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'inter_net': 'interNet', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """ChildAllOf - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_cat.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_cat.py
new file mode 100644
index 00000000000..70438f3441f
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_cat.py
@@ -0,0 +1,215 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+def lazy_import():
+ from petstore_api.model.child_cat_all_of import ChildCatAllOf
+ from petstore_api.model.parent_pet import ParentPet
+ globals()['ChildCatAllOf'] = ChildCatAllOf
+ globals()['ParentPet'] = ParentPet
+
+
+class ChildCat(ModelComposed):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'pet_type': (str,), # noqa: E501
+ 'name': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ val = {
+ }
+ if not val:
+ return None
+ return {'pet_type': val}
+
+ attribute_map = {
+ 'pet_type': 'pet_type', # noqa: E501
+ 'name': 'name', # noqa: E501
+ }
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ '_composed_instances',
+ '_var_name_to_model_instances',
+ '_additional_properties_model_instances',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """ChildCat - a model defined in OpenAPI
+
+ Keyword Args:
+ pet_type (str):
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ constant_args = {
+ '_check_type': _check_type,
+ '_path_to_item': _path_to_item,
+ '_spec_property_naming': _spec_property_naming,
+ '_configuration': _configuration,
+ '_visited_composed_classes': self._visited_composed_classes,
+ }
+ composed_info = validate_get_composed_info(
+ constant_args, kwargs, self)
+ self._composed_instances = composed_info[0]
+ self._var_name_to_model_instances = composed_info[1]
+ self._additional_properties_model_instances = composed_info[2]
+ discarded_args = composed_info[3]
+
+ for var_name, var_value in kwargs.items():
+ if var_name in discarded_args and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self._additional_properties_model_instances:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+
+ @cached_property
+ def _composed_schemas():
+ # we need this here to make our import statements work
+ # we must store _composed_schemas in here so the code is only run
+ # when we invoke this method. If we kept this at the class
+ # level we would get an error beause the class level
+ # code would be run when this module is imported, and these composed
+ # classes don't exist yet because their module has not finished
+ # loading
+ lazy_import()
+ return {
+ 'anyOf': [
+ ],
+ 'allOf': [
+ ChildCatAllOf,
+ ParentPet,
+ ],
+ 'oneOf': [
+ ],
+ }
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_cat_all_of.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_cat_all_of.py
new file mode 100644
index 00000000000..f0f1a1ae6bd
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_cat_all_of.py
@@ -0,0 +1,166 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class ChildCatAllOf(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'name': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'name': 'name', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """ChildCatAllOf - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_dog.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_dog.py
new file mode 100644
index 00000000000..df4956266ae
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_dog.py
@@ -0,0 +1,215 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+def lazy_import():
+ from petstore_api.model.child_dog_all_of import ChildDogAllOf
+ from petstore_api.model.parent_pet import ParentPet
+ globals()['ChildDogAllOf'] = ChildDogAllOf
+ globals()['ParentPet'] = ParentPet
+
+
+class ChildDog(ModelComposed):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'pet_type': (str,), # noqa: E501
+ 'bark': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ val = {
+ }
+ if not val:
+ return None
+ return {'pet_type': val}
+
+ attribute_map = {
+ 'pet_type': 'pet_type', # noqa: E501
+ 'bark': 'bark', # noqa: E501
+ }
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ '_composed_instances',
+ '_var_name_to_model_instances',
+ '_additional_properties_model_instances',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """ChildDog - a model defined in OpenAPI
+
+ Keyword Args:
+ pet_type (str):
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ constant_args = {
+ '_check_type': _check_type,
+ '_path_to_item': _path_to_item,
+ '_spec_property_naming': _spec_property_naming,
+ '_configuration': _configuration,
+ '_visited_composed_classes': self._visited_composed_classes,
+ }
+ composed_info = validate_get_composed_info(
+ constant_args, kwargs, self)
+ self._composed_instances = composed_info[0]
+ self._var_name_to_model_instances = composed_info[1]
+ self._additional_properties_model_instances = composed_info[2]
+ discarded_args = composed_info[3]
+
+ for var_name, var_value in kwargs.items():
+ if var_name in discarded_args and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self._additional_properties_model_instances:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+
+ @cached_property
+ def _composed_schemas():
+ # we need this here to make our import statements work
+ # we must store _composed_schemas in here so the code is only run
+ # when we invoke this method. If we kept this at the class
+ # level we would get an error beause the class level
+ # code would be run when this module is imported, and these composed
+ # classes don't exist yet because their module has not finished
+ # loading
+ lazy_import()
+ return {
+ 'anyOf': [
+ ],
+ 'allOf': [
+ ChildDogAllOf,
+ ParentPet,
+ ],
+ 'oneOf': [
+ ],
+ }
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_dog_all_of.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_dog_all_of.py
new file mode 100644
index 00000000000..d460b68b3d3
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_dog_all_of.py
@@ -0,0 +1,166 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class ChildDogAllOf(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'bark': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'bark': 'bark', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """ChildDogAllOf - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_lizard.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_lizard.py
new file mode 100644
index 00000000000..1f50ba403ed
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_lizard.py
@@ -0,0 +1,215 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+def lazy_import():
+ from petstore_api.model.child_lizard_all_of import ChildLizardAllOf
+ from petstore_api.model.parent_pet import ParentPet
+ globals()['ChildLizardAllOf'] = ChildLizardAllOf
+ globals()['ParentPet'] = ParentPet
+
+
+class ChildLizard(ModelComposed):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'pet_type': (str,), # noqa: E501
+ 'loves_rocks': (bool,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ val = {
+ }
+ if not val:
+ return None
+ return {'pet_type': val}
+
+ attribute_map = {
+ 'pet_type': 'pet_type', # noqa: E501
+ 'loves_rocks': 'lovesRocks', # noqa: E501
+ }
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ '_composed_instances',
+ '_var_name_to_model_instances',
+ '_additional_properties_model_instances',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """ChildLizard - a model defined in OpenAPI
+
+ Keyword Args:
+ pet_type (str):
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ constant_args = {
+ '_check_type': _check_type,
+ '_path_to_item': _path_to_item,
+ '_spec_property_naming': _spec_property_naming,
+ '_configuration': _configuration,
+ '_visited_composed_classes': self._visited_composed_classes,
+ }
+ composed_info = validate_get_composed_info(
+ constant_args, kwargs, self)
+ self._composed_instances = composed_info[0]
+ self._var_name_to_model_instances = composed_info[1]
+ self._additional_properties_model_instances = composed_info[2]
+ discarded_args = composed_info[3]
+
+ for var_name, var_value in kwargs.items():
+ if var_name in discarded_args and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self._additional_properties_model_instances:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+
+ @cached_property
+ def _composed_schemas():
+ # we need this here to make our import statements work
+ # we must store _composed_schemas in here so the code is only run
+ # when we invoke this method. If we kept this at the class
+ # level we would get an error beause the class level
+ # code would be run when this module is imported, and these composed
+ # classes don't exist yet because their module has not finished
+ # loading
+ lazy_import()
+ return {
+ 'anyOf': [
+ ],
+ 'allOf': [
+ ChildLizardAllOf,
+ ParentPet,
+ ],
+ 'oneOf': [
+ ],
+ }
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_lizard_all_of.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_lizard_all_of.py
new file mode 100644
index 00000000000..669b9338d79
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/child_lizard_all_of.py
@@ -0,0 +1,166 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class ChildLizardAllOf(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'loves_rocks': (bool,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'loves_rocks': 'lovesRocks', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """ChildLizardAllOf - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/class_model.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/class_model.py
new file mode 100644
index 00000000000..18c16f89f90
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/class_model.py
@@ -0,0 +1,166 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class ClassModel(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ '_class': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ '_class': '_class', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """ClassModel - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ _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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/client.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/client.py
new file mode 100644
index 00000000000..da615c54773
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/client.py
@@ -0,0 +1,166 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class Client(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'client': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'client': 'client', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """Client - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/dog.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/dog.py
new file mode 100644
index 00000000000..e29ffa33602
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/dog.py
@@ -0,0 +1,218 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+def lazy_import():
+ from petstore_api.model.animal import Animal
+ from petstore_api.model.dog_all_of import DogAllOf
+ globals()['Animal'] = Animal
+ globals()['DogAllOf'] = DogAllOf
+
+
+class Dog(ModelComposed):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'class_name': (str,), # noqa: E501
+ 'breed': (str,), # noqa: E501
+ 'color': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ val = {
+ }
+ if not val:
+ return None
+ return {'class_name': val}
+
+ attribute_map = {
+ 'class_name': 'className', # noqa: E501
+ 'breed': 'breed', # noqa: E501
+ 'color': 'color', # noqa: E501
+ }
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ '_composed_instances',
+ '_var_name_to_model_instances',
+ '_additional_properties_model_instances',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """Dog - a model defined in OpenAPI
+
+ Keyword Args:
+ class_name (str):
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ breed (str): [optional] # noqa: E501
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ constant_args = {
+ '_check_type': _check_type,
+ '_path_to_item': _path_to_item,
+ '_spec_property_naming': _spec_property_naming,
+ '_configuration': _configuration,
+ '_visited_composed_classes': self._visited_composed_classes,
+ }
+ composed_info = validate_get_composed_info(
+ constant_args, kwargs, self)
+ self._composed_instances = composed_info[0]
+ self._var_name_to_model_instances = composed_info[1]
+ self._additional_properties_model_instances = composed_info[2]
+ discarded_args = composed_info[3]
+
+ for var_name, var_value in kwargs.items():
+ if var_name in discarded_args and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self._additional_properties_model_instances:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+
+ @cached_property
+ def _composed_schemas():
+ # we need this here to make our import statements work
+ # we must store _composed_schemas in here so the code is only run
+ # when we invoke this method. If we kept this at the class
+ # level we would get an error beause the class level
+ # code would be run when this module is imported, and these composed
+ # classes don't exist yet because their module has not finished
+ # loading
+ lazy_import()
+ return {
+ 'anyOf': [
+ ],
+ 'allOf': [
+ Animal,
+ DogAllOf,
+ ],
+ 'oneOf': [
+ ],
+ }
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/dog_all_of.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/dog_all_of.py
new file mode 100644
index 00000000000..b7b2e7db66d
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/dog_all_of.py
@@ -0,0 +1,166 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class DogAllOf(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'breed': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'breed': 'breed', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """DogAllOf - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/enum_arrays.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/enum_arrays.py
new file mode 100644
index 00000000000..43ebac57de3
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/enum_arrays.py
@@ -0,0 +1,177 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class EnumArrays(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ ('just_symbol',): {
+ '>=': ">=",
+ '$': "$",
+ },
+ ('array_enum',): {
+ 'FISH': "fish",
+ 'CRAB': "crab",
+ },
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'just_symbol': (str,), # noqa: E501
+ 'array_enum': ([str],), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'just_symbol': 'just_symbol', # noqa: E501
+ 'array_enum': 'array_enum', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """EnumArrays - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ just_symbol (str): [optional] # noqa: E501
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/enum_class.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/enum_class.py
new file mode 100644
index 00000000000..14188ca31d2
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/enum_class.py
@@ -0,0 +1,180 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class EnumClass(ModelSimple):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ ('value',): {
+ '_ABC': "_abc",
+ '-EFG': "-efg",
+ '(XYZ)': "(xyz)",
+ },
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'value': (str,),
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {}
+
+ _composed_schemas = None
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs):
+ """EnumClass - a model defined in OpenAPI
+
+ Note that value can be passed either in args or in kwargs, but not in both.
+
+ Args:
+ args[0] (str): if omitted defaults to "-efg", must be one of ["_abc", "-efg", "(xyz)", ] # noqa: E501
+
+ Keyword Args:
+ value (str): if omitted defaults to "-efg", must be one of ["_abc", "-efg", "(xyz)", ] # noqa: E501
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+ # required up here when default value is not given
+ _path_to_item = kwargs.pop('_path_to_item', ())
+
+ if 'value' in kwargs:
+ value = kwargs.pop('value')
+ elif args:
+ args = list(args)
+ value = args.pop(0)
+ else:
+ value = "-efg"
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+ self.value = value
+ if kwargs:
+ raise ApiTypeError(
+ "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % (
+ kwargs,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/enum_test.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/enum_test.py
new file mode 100644
index 00000000000..79ba0f6a747
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/enum_test.py
@@ -0,0 +1,204 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+def lazy_import():
+ from petstore_api.model.string_enum import StringEnum
+ globals()['StringEnum'] = StringEnum
+
+
+class EnumTest(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ ('enum_string_required',): {
+ 'UPPER': "UPPER",
+ 'LOWER': "lower",
+ 'EMPTY': "",
+ },
+ ('enum_string',): {
+ 'UPPER': "UPPER",
+ 'LOWER': "lower",
+ 'EMPTY': "",
+ },
+ ('enum_integer',): {
+ '1': 1,
+ '-1': -1,
+ },
+ ('enum_number',): {
+ '1.1': 1.1,
+ '-1.2': -1.2,
+ },
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'enum_string_required': (str,), # noqa: E501
+ 'enum_string': (str,), # noqa: E501
+ 'enum_integer': (int,), # noqa: E501
+ 'enum_number': (float,), # noqa: E501
+ 'string_enum': (StringEnum,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'enum_string_required': 'enum_string_required', # noqa: E501
+ 'enum_string': 'enum_string', # noqa: E501
+ 'enum_integer': 'enum_integer', # noqa: E501
+ 'enum_number': 'enum_number', # noqa: E501
+ 'string_enum': 'stringEnum', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, enum_string_required, *args, **kwargs): # noqa: E501
+ """EnumTest - a model defined in OpenAPI
+
+ Args:
+ enum_string_required (str):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ enum_string (str): [optional] # noqa: E501
+ enum_integer (int): [optional] # noqa: E501
+ enum_number (float): [optional] # noqa: E501
+ string_enum (StringEnum): [optional] # noqa: E501
+ """
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _path_to_item = kwargs.pop('_path_to_item', ())
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.enum_string_required = enum_string_required
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/file.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/file.py
new file mode 100644
index 00000000000..a38cccacc6a
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/file.py
@@ -0,0 +1,166 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class File(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'source_uri': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'source_uri': 'sourceURI', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """File - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/file_schema_test_class.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/file_schema_test_class.py
new file mode 100644
index 00000000000..b8c519ed9c7
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/file_schema_test_class.py
@@ -0,0 +1,174 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+def lazy_import():
+ from petstore_api.model.file import File
+ globals()['File'] = File
+
+
+class FileSchemaTestClass(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'file': (File,), # noqa: E501
+ 'files': ([File],), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'file': 'file', # noqa: E501
+ 'files': 'files', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """FileSchemaTestClass - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ file (File): [optional] # noqa: E501
+ files ([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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/format_test.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/format_test.py
new file mode 100644
index 00000000000..494ce2646da
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/format_test.py
@@ -0,0 +1,243 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class FormatTest(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ ('number',): {
+ 'inclusive_maximum': 543.2,
+ 'inclusive_minimum': 32.1,
+ },
+ ('byte',): {
+ 'regex': {
+ 'pattern': r'^(?:[A-Za-z0-9+\/]{4})*(?:[A-Za-z0-9+\/]{2}==|[A-Za-z0-9+\/]{3}=)?$', # noqa: E501
+ },
+ },
+ ('password',): {
+ 'max_length': 64,
+ 'min_length': 10,
+ },
+ ('integer',): {
+ 'inclusive_maximum': 100,
+ 'inclusive_minimum': 10,
+ },
+ ('int32',): {
+ 'inclusive_maximum': 200,
+ 'inclusive_minimum': 20,
+ },
+ ('float',): {
+ 'inclusive_maximum': 987.6,
+ 'inclusive_minimum': 54.3,
+ },
+ ('double',): {
+ 'inclusive_maximum': 123.4,
+ 'inclusive_minimum': 67.8,
+ },
+ ('string',): {
+ 'regex': {
+ 'pattern': r'^[a-z]+$', # noqa: E501
+ 'flags': (re.IGNORECASE)
+ },
+ },
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'number': (float,), # noqa: E501
+ 'byte': (str,), # noqa: E501
+ 'date': (date,), # noqa: E501
+ 'password': (str,), # noqa: E501
+ 'integer': (int,), # noqa: E501
+ 'int32': (int,), # noqa: E501
+ 'int64': (int,), # noqa: E501
+ 'float': (float,), # noqa: E501
+ 'double': (float,), # noqa: E501
+ 'string': (str,), # noqa: E501
+ 'binary': (file_type,), # noqa: E501
+ 'date_time': (datetime,), # noqa: E501
+ 'uuid': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'number': 'number', # noqa: E501
+ 'byte': 'byte', # noqa: E501
+ 'date': 'date', # noqa: E501
+ 'password': 'password', # noqa: E501
+ 'integer': 'integer', # noqa: E501
+ 'int32': 'int32', # noqa: E501
+ 'int64': 'int64', # noqa: E501
+ 'float': 'float', # noqa: E501
+ 'double': 'double', # noqa: E501
+ 'string': 'string', # noqa: E501
+ 'binary': 'binary', # noqa: E501
+ 'date_time': 'dateTime', # noqa: E501
+ 'uuid': 'uuid', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, number, byte, date, password, *args, **kwargs): # noqa: E501
+ """FormatTest - a model defined in OpenAPI
+
+ Args:
+ number (float):
+ byte (str):
+ date (date):
+ password (str):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ integer (int): [optional] # noqa: E501
+ int32 (int): [optional] # noqa: E501
+ int64 (int): [optional] # noqa: E501
+ float (float): [optional] # noqa: E501
+ double (float): [optional] # noqa: E501
+ string (str): [optional] # noqa: E501
+ binary (file_type): [optional] # noqa: E501
+ date_time (datetime): [optional] # noqa: E501
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.number = number
+ self.byte = byte
+ self.date = date
+ self.password = password
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/grandparent.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/grandparent.py
new file mode 100644
index 00000000000..a52744cc3e2
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/grandparent.py
@@ -0,0 +1,166 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class Grandparent(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'radio_waves': (bool,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'radio_waves': 'radioWaves', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """Grandparent - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/grandparent_animal.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/grandparent_animal.py
new file mode 100644
index 00000000000..48d3f6d9f0b
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/grandparent_animal.py
@@ -0,0 +1,188 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+def lazy_import():
+ from petstore_api.model.child_cat import ChildCat
+ from petstore_api.model.child_dog import ChildDog
+ from petstore_api.model.child_lizard import ChildLizard
+ from petstore_api.model.parent_pet import ParentPet
+ globals()['ChildCat'] = ChildCat
+ globals()['ChildDog'] = ChildDog
+ globals()['ChildLizard'] = ChildLizard
+ globals()['ParentPet'] = ParentPet
+
+
+class GrandparentAnimal(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'pet_type': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ lazy_import()
+ val = {
+ 'ChildCat': ChildCat,
+ 'ChildDog': ChildDog,
+ 'ChildLizard': ChildLizard,
+ 'ParentPet': ParentPet,
+ }
+ if not val:
+ return None
+ return {'pet_type': val}
+
+ attribute_map = {
+ 'pet_type': 'pet_type', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, pet_type, *args, **kwargs): # noqa: E501
+ """GrandparentAnimal - a model defined in OpenAPI
+
+ Args:
+ pet_type (str):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.pet_type = pet_type
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/has_only_read_only.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/has_only_read_only.py
new file mode 100644
index 00000000000..c94781ae2c4
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/has_only_read_only.py
@@ -0,0 +1,169 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class HasOnlyReadOnly(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'bar': (str,), # noqa: E501
+ 'foo': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'bar': 'bar', # noqa: E501
+ 'foo': 'foo', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """HasOnlyReadOnly - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ bar (str): [optional] # noqa: E501
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/list.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/list.py
new file mode 100644
index 00000000000..09c762d6a79
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/list.py
@@ -0,0 +1,166 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class List(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ '_123_list': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ '_123_list': '123-list', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """List - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ _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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/map_test.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/map_test.py
new file mode 100644
index 00000000000..169fb9d88ee
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/map_test.py
@@ -0,0 +1,184 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+def lazy_import():
+ from petstore_api.model.string_boolean_map import StringBooleanMap
+ globals()['StringBooleanMap'] = StringBooleanMap
+
+
+class MapTest(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ ('map_of_enum_string',): {
+ 'UPPER': "UPPER",
+ 'LOWER': "lower",
+ },
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'map_map_of_string': ({str: ({str: (str,)},)},), # noqa: E501
+ 'map_of_enum_string': ({str: (str,)},), # noqa: E501
+ 'direct_map': ({str: (bool,)},), # noqa: E501
+ 'indirect_map': (StringBooleanMap,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'map_map_of_string': 'map_map_of_string', # noqa: E501
+ 'map_of_enum_string': 'map_of_enum_string', # noqa: E501
+ 'direct_map': 'direct_map', # noqa: E501
+ 'indirect_map': 'indirect_map', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """MapTest - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ map_map_of_string ({str: ({str: (str,)},)}): [optional] # noqa: E501
+ map_of_enum_string ({str: (str,)}): [optional] # noqa: E501
+ direct_map ({str: (bool,)}): [optional] # noqa: E501
+ indirect_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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/mixed_properties_and_additional_properties_class.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/mixed_properties_and_additional_properties_class.py
new file mode 100644
index 00000000000..01df80d9d62
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/mixed_properties_and_additional_properties_class.py
@@ -0,0 +1,177 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+def lazy_import():
+ from petstore_api.model.animal import Animal
+ globals()['Animal'] = Animal
+
+
+class MixedPropertiesAndAdditionalPropertiesClass(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'uuid': (str,), # noqa: E501
+ 'date_time': (datetime,), # noqa: E501
+ 'map': ({str: (Animal,)},), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'uuid': 'uuid', # noqa: E501
+ 'date_time': 'dateTime', # noqa: E501
+ 'map': 'map', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """MixedPropertiesAndAdditionalPropertiesClass - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ uuid (str): [optional] # noqa: E501
+ date_time (datetime): [optional] # noqa: E501
+ map ({str: (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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/model200_response.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/model200_response.py
new file mode 100644
index 00000000000..46b155b6523
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/model200_response.py
@@ -0,0 +1,169 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class Model200Response(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'name': (int,), # noqa: E501
+ '_class': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'name': 'name', # noqa: E501
+ '_class': 'class', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """Model200Response - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ name (int): [optional] # noqa: E501
+ _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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/model_return.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/model_return.py
new file mode 100644
index 00000000000..377b3507a8b
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/model_return.py
@@ -0,0 +1,166 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class ModelReturn(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ '_return': (int,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ '_return': 'return', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """ModelReturn - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ _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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/name.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/name.py
new file mode 100644
index 00000000000..1432e185ad6
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/name.py
@@ -0,0 +1,178 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class Name(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'name': (int,), # noqa: E501
+ 'snake_case': (int,), # noqa: E501
+ '_property': (str,), # noqa: E501
+ '_123_number': (int,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'name': 'name', # noqa: E501
+ 'snake_case': 'snake_case', # noqa: E501
+ '_property': 'property', # noqa: E501
+ '_123_number': '123Number', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, name, *args, **kwargs): # noqa: E501
+ """Name - a model defined in OpenAPI
+
+ Args:
+ name (int):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ snake_case (int): [optional] # noqa: E501
+ _property (str): [optional] # noqa: E501
+ _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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.name = name
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/number_only.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/number_only.py
new file mode 100644
index 00000000000..d4892dbede5
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/number_only.py
@@ -0,0 +1,166 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class NumberOnly(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'just_number': (float,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'just_number': 'JustNumber', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """NumberOnly - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/number_with_validations.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/number_with_validations.py
new file mode 100644
index 00000000000..458a7945975
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/number_with_validations.py
@@ -0,0 +1,183 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class NumberWithValidations(ModelSimple):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ ('value',): {
+ 'inclusive_maximum': 2E+1,
+ 'inclusive_minimum': 1E+1,
+ },
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'value': (float,),
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {}
+
+ _composed_schemas = None
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs):
+ """NumberWithValidations - a model defined in OpenAPI
+
+ Note that value can be passed either in args or in kwargs, but not in both.
+
+ Args:
+ args[0] (float): # noqa: E501
+
+ Keyword Args:
+ value (float): # noqa: E501
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+ # required up here when default value is not given
+ _path_to_item = kwargs.pop('_path_to_item', ())
+
+ if 'value' in kwargs:
+ value = kwargs.pop('value')
+ elif args:
+ args = list(args)
+ value = args.pop(0)
+ else:
+ raise ApiTypeError(
+ "value is required, but not passed in args or kwargs and doesn't have default",
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+ self.value = value
+ if kwargs:
+ raise ApiTypeError(
+ "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % (
+ kwargs,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/object_model_with_ref_props.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/object_model_with_ref_props.py
new file mode 100644
index 00000000000..b1dc4bf82e2
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/object_model_with_ref_props.py
@@ -0,0 +1,177 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+def lazy_import():
+ from petstore_api.model.number_with_validations import NumberWithValidations
+ globals()['NumberWithValidations'] = NumberWithValidations
+
+
+class ObjectModelWithRefProps(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'my_number': (NumberWithValidations,), # noqa: E501
+ 'my_string': (str,), # noqa: E501
+ 'my_boolean': (bool,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'my_number': 'my_number', # noqa: E501
+ 'my_string': 'my_string', # noqa: E501
+ 'my_boolean': 'my_boolean', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """ObjectModelWithRefProps - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ my_number (NumberWithValidations): [optional] # noqa: E501
+ my_string (str): [optional] # noqa: E501
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/order.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/order.py
new file mode 100644
index 00000000000..b42f066848a
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/order.py
@@ -0,0 +1,186 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class Order(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ ('status',): {
+ 'PLACED': "placed",
+ 'APPROVED': "approved",
+ 'DELIVERED': "delivered",
+ },
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'id': (int,), # noqa: E501
+ 'pet_id': (int,), # noqa: E501
+ 'quantity': (int,), # noqa: E501
+ 'ship_date': (datetime,), # noqa: E501
+ 'status': (str,), # noqa: E501
+ 'complete': (bool,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'id': 'id', # noqa: E501
+ 'pet_id': 'petId', # noqa: E501
+ 'quantity': 'quantity', # noqa: E501
+ 'ship_date': 'shipDate', # noqa: E501
+ 'status': 'status', # noqa: E501
+ 'complete': 'complete', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """Order - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ id (int): [optional] # noqa: E501
+ pet_id (int): [optional] # noqa: E501
+ quantity (int): [optional] # noqa: E501
+ ship_date (datetime): [optional] # noqa: E501
+ status (str): Order Status. [optional] # noqa: E501
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/parent.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/parent.py
new file mode 100644
index 00000000000..b07448d9e1f
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/parent.py
@@ -0,0 +1,212 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+def lazy_import():
+ from petstore_api.model.grandparent import Grandparent
+ from petstore_api.model.parent_all_of import ParentAllOf
+ globals()['Grandparent'] = Grandparent
+ globals()['ParentAllOf'] = ParentAllOf
+
+
+class Parent(ModelComposed):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'radio_waves': (bool,), # noqa: E501
+ 'tele_vision': (bool,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'radio_waves': 'radioWaves', # noqa: E501
+ 'tele_vision': 'teleVision', # noqa: E501
+ }
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ '_composed_instances',
+ '_var_name_to_model_instances',
+ '_additional_properties_model_instances',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """Parent - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ radio_waves (bool): [optional] # noqa: E501
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ constant_args = {
+ '_check_type': _check_type,
+ '_path_to_item': _path_to_item,
+ '_spec_property_naming': _spec_property_naming,
+ '_configuration': _configuration,
+ '_visited_composed_classes': self._visited_composed_classes,
+ }
+ composed_info = validate_get_composed_info(
+ constant_args, kwargs, self)
+ self._composed_instances = composed_info[0]
+ self._var_name_to_model_instances = composed_info[1]
+ self._additional_properties_model_instances = composed_info[2]
+ discarded_args = composed_info[3]
+
+ for var_name, var_value in kwargs.items():
+ if var_name in discarded_args and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self._additional_properties_model_instances:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+
+ @cached_property
+ def _composed_schemas():
+ # we need this here to make our import statements work
+ # we must store _composed_schemas in here so the code is only run
+ # when we invoke this method. If we kept this at the class
+ # level we would get an error beause the class level
+ # code would be run when this module is imported, and these composed
+ # classes don't exist yet because their module has not finished
+ # loading
+ lazy_import()
+ return {
+ 'anyOf': [
+ ],
+ 'allOf': [
+ Grandparent,
+ ParentAllOf,
+ ],
+ 'oneOf': [
+ ],
+ }
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/parent_all_of.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/parent_all_of.py
new file mode 100644
index 00000000000..0d109f25a4c
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/parent_all_of.py
@@ -0,0 +1,166 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class ParentAllOf(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'tele_vision': (bool,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'tele_vision': 'teleVision', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """ParentAllOf - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/parent_pet.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/parent_pet.py
new file mode 100644
index 00000000000..597e30bb9c4
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/parent_pet.py
@@ -0,0 +1,219 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+def lazy_import():
+ from petstore_api.model.child_cat import ChildCat
+ from petstore_api.model.child_dog import ChildDog
+ from petstore_api.model.child_lizard import ChildLizard
+ from petstore_api.model.grandparent_animal import GrandparentAnimal
+ globals()['ChildCat'] = ChildCat
+ globals()['ChildDog'] = ChildDog
+ globals()['ChildLizard'] = ChildLizard
+ globals()['GrandparentAnimal'] = GrandparentAnimal
+
+
+class ParentPet(ModelComposed):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'pet_type': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ lazy_import()
+ val = {
+ 'ChildCat': ChildCat,
+ 'ChildDog': ChildDog,
+ 'ChildLizard': ChildLizard,
+ }
+ if not val:
+ return None
+ return {'pet_type': val}
+
+ attribute_map = {
+ 'pet_type': 'pet_type', # noqa: E501
+ }
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ '_composed_instances',
+ '_var_name_to_model_instances',
+ '_additional_properties_model_instances',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """ParentPet - a model defined in OpenAPI
+
+ Keyword Args:
+ pet_type (str):
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ constant_args = {
+ '_check_type': _check_type,
+ '_path_to_item': _path_to_item,
+ '_spec_property_naming': _spec_property_naming,
+ '_configuration': _configuration,
+ '_visited_composed_classes': self._visited_composed_classes,
+ }
+ composed_info = validate_get_composed_info(
+ constant_args, kwargs, self)
+ self._composed_instances = composed_info[0]
+ self._var_name_to_model_instances = composed_info[1]
+ self._additional_properties_model_instances = composed_info[2]
+ discarded_args = composed_info[3]
+
+ for var_name, var_value in kwargs.items():
+ if var_name in discarded_args and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self._additional_properties_model_instances:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+
+ @cached_property
+ def _composed_schemas():
+ # we need this here to make our import statements work
+ # we must store _composed_schemas in here so the code is only run
+ # when we invoke this method. If we kept this at the class
+ # level we would get an error beause the class level
+ # code would be run when this module is imported, and these composed
+ # classes don't exist yet because their module has not finished
+ # loading
+ lazy_import()
+ return {
+ 'anyOf': [
+ ],
+ 'allOf': [
+ GrandparentAnimal,
+ ],
+ 'oneOf': [
+ ],
+ }
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/pet.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/pet.py
new file mode 100644
index 00000000000..e9f1e30a319
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/pet.py
@@ -0,0 +1,197 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+def lazy_import():
+ from petstore_api.model.category import Category
+ from petstore_api.model.tag import Tag
+ globals()['Category'] = Category
+ globals()['Tag'] = Tag
+
+
+class Pet(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ ('status',): {
+ 'AVAILABLE': "available",
+ 'PENDING': "pending",
+ 'SOLD': "sold",
+ },
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'name': (str,), # noqa: E501
+ 'photo_urls': ([str],), # noqa: E501
+ 'id': (int,), # noqa: E501
+ 'category': (Category,), # noqa: E501
+ 'tags': ([Tag],), # noqa: E501
+ 'status': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'name': 'name', # noqa: E501
+ 'photo_urls': 'photoUrls', # noqa: E501
+ 'id': 'id', # noqa: E501
+ 'category': 'category', # noqa: E501
+ 'tags': 'tags', # noqa: E501
+ 'status': 'status', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, name, photo_urls, *args, **kwargs): # noqa: E501
+ """Pet - a model defined in OpenAPI
+
+ Args:
+ name (str):
+ photo_urls ([str]):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ id (int): [optional] # noqa: E501
+ category (Category): [optional] # noqa: E501
+ tags ([Tag]): [optional] # noqa: E501
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.name = name
+ self.photo_urls = photo_urls
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/player.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/player.py
new file mode 100644
index 00000000000..6e4485fb650
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/player.py
@@ -0,0 +1,172 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class Player(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'name': (str,), # noqa: E501
+ 'enemy_player': (Player,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'name': 'name', # noqa: E501
+ 'enemy_player': 'enemyPlayer', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, name, *args, **kwargs): # noqa: E501
+ """Player - a model defined in OpenAPI
+
+ Args:
+ name (str):
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.name = name
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/read_only_first.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/read_only_first.py
new file mode 100644
index 00000000000..5c68eab91ea
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/read_only_first.py
@@ -0,0 +1,169 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class ReadOnlyFirst(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'bar': (str,), # noqa: E501
+ 'baz': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'bar': 'bar', # noqa: E501
+ 'baz': 'baz', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """ReadOnlyFirst - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ bar (str): [optional] # noqa: E501
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/special_model_name.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/special_model_name.py
new file mode 100644
index 00000000000..823e7759663
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/special_model_name.py
@@ -0,0 +1,166 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class SpecialModelName(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'special_property_name': (int,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'special_property_name': '$special[property.name]', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """SpecialModelName - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/string_boolean_map.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/string_boolean_map.py
new file mode 100644
index 00000000000..4ac52699183
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/string_boolean_map.py
@@ -0,0 +1,169 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class StringBooleanMap(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool,) # noqa: E501
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """StringBooleanMap - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/string_enum.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/string_enum.py
new file mode 100644
index 00000000000..37dc04332ca
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/string_enum.py
@@ -0,0 +1,184 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class StringEnum(ModelSimple):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ ('value',): {
+ 'PLACED': "placed",
+ 'APPROVED': "approved",
+ 'DELIVERED': "delivered",
+ },
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'value': (str,),
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {}
+
+ _composed_schemas = None
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs):
+ """StringEnum - a model defined in OpenAPI
+
+ Note that value can be passed either in args or in kwargs, but not in both.
+
+ Args:
+ args[0] (str):, must be one of ["placed", "approved", "delivered", ] # noqa: E501
+
+ Keyword Args:
+ value (str):, must be one of ["placed", "approved", "delivered", ] # noqa: E501
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ """
+ # required up here when default value is not given
+ _path_to_item = kwargs.pop('_path_to_item', ())
+
+ if 'value' in kwargs:
+ value = kwargs.pop('value')
+ elif args:
+ args = list(args)
+ value = args.pop(0)
+ else:
+ raise ApiTypeError(
+ "value is required, but not passed in args or kwargs and doesn't have default",
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ _check_type = kwargs.pop('_check_type', True)
+ _spec_property_naming = kwargs.pop('_spec_property_naming', False)
+ _configuration = kwargs.pop('_configuration', None)
+ _visited_composed_classes = kwargs.pop('_visited_composed_classes', ())
+
+ if args:
+ raise ApiTypeError(
+ "Invalid positional arguments=%s passed to %s. Remove those invalid positional arguments." % (
+ args,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
+
+ self._data_store = {}
+ self._check_type = _check_type
+ self._spec_property_naming = _spec_property_naming
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+ self.value = value
+ if kwargs:
+ raise ApiTypeError(
+ "Invalid named arguments=%s passed to %s. Remove those invalid named arguments." % (
+ kwargs,
+ self.__class__.__name__,
+ ),
+ path_to_item=_path_to_item,
+ valid_classes=(self.__class__,),
+ )
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/tag.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/tag.py
new file mode 100644
index 00000000000..d3dcb78b7ea
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/tag.py
@@ -0,0 +1,172 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class Tag(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'id': (int,), # noqa: E501
+ 'name': (str,), # noqa: E501
+ 'full_name': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'id': 'id', # noqa: E501
+ 'name': 'name', # noqa: E501
+ 'full_name': 'fullName', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """Tag - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ id (int): [optional] # noqa: E501
+ name (str): [optional] # noqa: E501
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/type_holder_default.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/type_holder_default.py
new file mode 100644
index 00000000000..324b131f3a2
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/type_holder_default.py
@@ -0,0 +1,195 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class TypeHolderDefault(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'string_item': (str,), # noqa: E501
+ 'number_item': (float,), # noqa: E501
+ 'integer_item': (int,), # noqa: E501
+ 'bool_item': (bool,), # noqa: E501
+ 'array_item': ([int],), # noqa: E501
+ 'date_item': (date,), # noqa: E501
+ 'datetime_item': (datetime,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'string_item': 'string_item', # noqa: E501
+ 'number_item': 'number_item', # noqa: E501
+ 'integer_item': 'integer_item', # noqa: E501
+ 'bool_item': 'bool_item', # noqa: E501
+ 'array_item': 'array_item', # noqa: E501
+ 'date_item': 'date_item', # noqa: E501
+ 'datetime_item': 'datetime_item', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, array_item, *args, **kwargs): # noqa: E501
+ """TypeHolderDefault - a model defined in OpenAPI
+
+ Args:
+ array_item ([int]):
+
+ Keyword Args:
+ string_item (str): defaults to "what" # noqa: E501
+ number_item (float): defaults to 1.234 # noqa: E501
+ integer_item (int): defaults to -2 # noqa: E501
+ bool_item (bool): defaults to True # noqa: E501
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ date_item (date): [optional] # noqa: E501
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.string_item = string_item
+ self.number_item = number_item
+ self.integer_item = integer_item
+ self.bool_item = bool_item
+ self.array_item = array_item
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/type_holder_example.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/type_holder_example.py
new file mode 100644
index 00000000000..30bbba178f4
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/type_holder_example.py
@@ -0,0 +1,197 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class TypeHolderExample(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ ('string_item',): {
+ 'WHAT': "what",
+ },
+ ('number_item',): {
+ '1.234': 1.234,
+ },
+ ('integer_item',): {
+ '-2': -2,
+ },
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'string_item': (str,), # noqa: E501
+ 'number_item': (float,), # noqa: E501
+ 'integer_item': (int,), # noqa: E501
+ 'bool_item': (bool,), # noqa: E501
+ 'array_item': ([int],), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'string_item': 'string_item', # noqa: E501
+ 'number_item': 'number_item', # noqa: E501
+ 'integer_item': 'integer_item', # noqa: E501
+ 'bool_item': 'bool_item', # noqa: E501
+ 'array_item': 'array_item', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, bool_item, array_item, *args, **kwargs): # noqa: E501
+ """TypeHolderExample - a model defined in OpenAPI
+
+ Args:
+ bool_item (bool):
+ array_item ([int]):
+
+ Keyword Args:
+ string_item (str): defaults to "what", must be one of ["what", ] # noqa: E501
+ number_item (float): defaults to 1.234, must be one of [1.234, ] # noqa: E501
+ integer_item (int): defaults to -2, must be one of [-2, ] # noqa: E501
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ self.string_item = string_item
+ self.number_item = number_item
+ self.integer_item = integer_item
+ self.bool_item = bool_item
+ self.array_item = array_item
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/user.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/user.py
new file mode 100644
index 00000000000..9a3cd081411
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/user.py
@@ -0,0 +1,187 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class User(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'id': (int,), # noqa: E501
+ 'username': (str,), # noqa: E501
+ 'first_name': (str,), # noqa: E501
+ 'last_name': (str,), # noqa: E501
+ 'email': (str,), # noqa: E501
+ 'password': (str,), # noqa: E501
+ 'phone': (str,), # noqa: E501
+ 'user_status': (int,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'id': 'id', # noqa: E501
+ 'username': 'username', # noqa: E501
+ 'first_name': 'firstName', # noqa: E501
+ 'last_name': 'lastName', # noqa: E501
+ 'email': 'email', # noqa: E501
+ 'password': 'password', # noqa: E501
+ 'phone': 'phone', # noqa: E501
+ 'user_status': 'userStatus', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """User - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ id (int): [optional] # noqa: E501
+ username (str): [optional] # noqa: E501
+ first_name (str): [optional] # noqa: E501
+ last_name (str): [optional] # noqa: E501
+ email (str): [optional] # noqa: E501
+ password (str): [optional] # noqa: E501
+ phone (str): [optional] # noqa: E501
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/xml_item.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/xml_item.py
new file mode 100644
index 00000000000..8401b3f4007
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model/xml_item.py
@@ -0,0 +1,250 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+
+class XmlItem(ModelNormal):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ return {
+ 'attribute_string': (str,), # noqa: E501
+ 'attribute_number': (float,), # noqa: E501
+ 'attribute_integer': (int,), # noqa: E501
+ 'attribute_boolean': (bool,), # noqa: E501
+ 'wrapped_array': ([int],), # noqa: E501
+ 'name_string': (str,), # noqa: E501
+ 'name_number': (float,), # noqa: E501
+ 'name_integer': (int,), # noqa: E501
+ 'name_boolean': (bool,), # noqa: E501
+ 'name_array': ([int],), # noqa: E501
+ 'name_wrapped_array': ([int],), # noqa: E501
+ 'prefix_string': (str,), # noqa: E501
+ 'prefix_number': (float,), # noqa: E501
+ 'prefix_integer': (int,), # noqa: E501
+ 'prefix_boolean': (bool,), # noqa: E501
+ 'prefix_array': ([int],), # noqa: E501
+ 'prefix_wrapped_array': ([int],), # noqa: E501
+ 'namespace_string': (str,), # noqa: E501
+ 'namespace_number': (float,), # noqa: E501
+ 'namespace_integer': (int,), # noqa: E501
+ 'namespace_boolean': (bool,), # noqa: E501
+ 'namespace_array': ([int],), # noqa: E501
+ 'namespace_wrapped_array': ([int],), # noqa: E501
+ 'prefix_ns_string': (str,), # noqa: E501
+ 'prefix_ns_number': (float,), # noqa: E501
+ 'prefix_ns_integer': (int,), # noqa: E501
+ 'prefix_ns_boolean': (bool,), # noqa: E501
+ 'prefix_ns_array': ([int],), # noqa: E501
+ 'prefix_ns_wrapped_array': ([int],), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'attribute_string': 'attribute_string', # noqa: E501
+ 'attribute_number': 'attribute_number', # noqa: E501
+ 'attribute_integer': 'attribute_integer', # noqa: E501
+ 'attribute_boolean': 'attribute_boolean', # noqa: E501
+ 'wrapped_array': 'wrapped_array', # noqa: E501
+ 'name_string': 'name_string', # noqa: E501
+ 'name_number': 'name_number', # noqa: E501
+ 'name_integer': 'name_integer', # noqa: E501
+ 'name_boolean': 'name_boolean', # noqa: E501
+ 'name_array': 'name_array', # noqa: E501
+ 'name_wrapped_array': 'name_wrapped_array', # noqa: E501
+ 'prefix_string': 'prefix_string', # noqa: E501
+ 'prefix_number': 'prefix_number', # noqa: E501
+ 'prefix_integer': 'prefix_integer', # noqa: E501
+ 'prefix_boolean': 'prefix_boolean', # noqa: E501
+ 'prefix_array': 'prefix_array', # noqa: E501
+ 'prefix_wrapped_array': 'prefix_wrapped_array', # noqa: E501
+ 'namespace_string': 'namespace_string', # noqa: E501
+ 'namespace_number': 'namespace_number', # noqa: E501
+ 'namespace_integer': 'namespace_integer', # noqa: E501
+ 'namespace_boolean': 'namespace_boolean', # noqa: E501
+ 'namespace_array': 'namespace_array', # noqa: E501
+ 'namespace_wrapped_array': 'namespace_wrapped_array', # noqa: E501
+ 'prefix_ns_string': 'prefix_ns_string', # noqa: E501
+ 'prefix_ns_number': 'prefix_ns_number', # noqa: E501
+ 'prefix_ns_integer': 'prefix_ns_integer', # noqa: E501
+ 'prefix_ns_boolean': 'prefix_ns_boolean', # noqa: E501
+ 'prefix_ns_array': 'prefix_ns_array', # noqa: E501
+ 'prefix_ns_wrapped_array': 'prefix_ns_wrapped_array', # noqa: E501
+ }
+
+ _composed_schemas = {}
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """XmlItem - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ attribute_string (str): [optional] # noqa: E501
+ attribute_number (float): [optional] # noqa: E501
+ attribute_integer (int): [optional] # noqa: E501
+ attribute_boolean (bool): [optional] # noqa: E501
+ wrapped_array ([int]): [optional] # noqa: E501
+ name_string (str): [optional] # noqa: E501
+ name_number (float): [optional] # noqa: E501
+ name_integer (int): [optional] # noqa: E501
+ name_boolean (bool): [optional] # noqa: E501
+ name_array ([int]): [optional] # noqa: E501
+ name_wrapped_array ([int]): [optional] # noqa: E501
+ prefix_string (str): [optional] # noqa: E501
+ prefix_number (float): [optional] # noqa: E501
+ prefix_integer (int): [optional] # noqa: E501
+ prefix_boolean (bool): [optional] # noqa: E501
+ prefix_array ([int]): [optional] # noqa: E501
+ prefix_wrapped_array ([int]): [optional] # noqa: E501
+ namespace_string (str): [optional] # noqa: E501
+ namespace_number (float): [optional] # noqa: E501
+ namespace_integer (int): [optional] # noqa: E501
+ namespace_boolean (bool): [optional] # noqa: E501
+ namespace_array ([int]): [optional] # noqa: E501
+ namespace_wrapped_array ([int]): [optional] # noqa: E501
+ prefix_ns_string (str): [optional] # noqa: E501
+ prefix_ns_number (float): [optional] # noqa: E501
+ prefix_ns_integer (int): [optional] # noqa: E501
+ prefix_ns_boolean (bool): [optional] # noqa: E501
+ prefix_ns_array ([int]): [optional] # noqa: E501
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ for var_name, var_value in kwargs.items():
+ if var_name not in self.attribute_map and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self.additional_properties_type is None:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model_utils.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model_utils.py
new file mode 100644
index 00000000000..3a555f0a88c
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/model_utils.py
@@ -0,0 +1,1859 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from datetime import date, datetime # noqa: F401
+import inspect
+import io
+import os
+import pprint
+import re
+import tempfile
+
+from dateutil.parser import parse
+
+from petstore_api.exceptions import (
+ ApiKeyError,
+ ApiAttributeError,
+ ApiTypeError,
+ ApiValueError,
+)
+
+none_type = type(None)
+file_type = io.IOBase
+
+
+class cached_property(object):
+ # this caches the result of the function call for fn with no inputs
+ # use this as a decorator on fuction methods that you want converted
+ # into cached properties
+ result_key = '_results'
+
+ def __init__(self, fn):
+ self._fn = fn
+
+ def __get__(self, instance, cls=None):
+ if self.result_key in vars(self):
+ return vars(self)[self.result_key]
+ else:
+ result = self._fn()
+ setattr(self, self.result_key, result)
+ return result
+
+
+PRIMITIVE_TYPES = (list, float, int, bool, datetime, date, str, file_type)
+
+def allows_single_value_input(cls):
+ """
+ This function returns True if the input composed schema model or any
+ descendant model allows a value only input
+ This is true for cases where oneOf contains items like:
+ oneOf:
+ - float
+ - NumberWithValidation
+ - StringEnum
+ - ArrayModel
+ - null
+ TODO: lru_cache this
+ """
+ if (
+ issubclass(cls, ModelSimple) or
+ cls in PRIMITIVE_TYPES
+ ):
+ return True
+ elif issubclass(cls, ModelComposed):
+ if not cls._composed_schemas['oneOf']:
+ return False
+ return any(allows_single_value_input(c) for c in cls._composed_schemas['oneOf'])
+ return False
+
+def composed_model_input_classes(cls):
+ """
+ This function returns a list of the possible models that can be accepted as
+ inputs.
+ TODO: lru_cache this
+ """
+ if issubclass(cls, ModelSimple) or cls in PRIMITIVE_TYPES:
+ return [cls]
+ elif issubclass(cls, ModelNormal):
+ if cls.discriminator is None:
+ return [cls]
+ else:
+ return get_discriminated_classes(cls)
+ elif issubclass(cls, ModelComposed):
+ if not cls._composed_schemas['oneOf']:
+ return []
+ if cls.discriminator is None:
+ input_classes = []
+ for c in cls._composed_schemas['oneOf']:
+ input_classes.extend(composed_model_input_classes(c))
+ return input_classes
+ else:
+ return get_discriminated_classes(cls)
+ return []
+
+
+class OpenApiModel(object):
+ """The base class for all OpenAPIModels"""
+
+ def set_attribute(self, name, value):
+ # this is only used to set properties on self
+
+ path_to_item = []
+ if self._path_to_item:
+ path_to_item.extend(self._path_to_item)
+ path_to_item.append(name)
+
+ if name in self.openapi_types:
+ required_types_mixed = self.openapi_types[name]
+ elif self.additional_properties_type is None:
+ raise ApiAttributeError(
+ "{0} has no attribute '{1}'".format(
+ type(self).__name__, name),
+ path_to_item
+ )
+ elif self.additional_properties_type is not None:
+ required_types_mixed = self.additional_properties_type
+
+ if get_simple_class(name) != str:
+ error_msg = type_error_message(
+ var_name=name,
+ var_value=name,
+ valid_classes=(str,),
+ key_type=True
+ )
+ raise ApiTypeError(
+ error_msg,
+ path_to_item=path_to_item,
+ valid_classes=(str,),
+ key_type=True
+ )
+
+ if self._check_type:
+ value = validate_and_convert_types(
+ value, required_types_mixed, path_to_item, self._spec_property_naming,
+ self._check_type, configuration=self._configuration)
+ if (name,) in self.allowed_values:
+ check_allowed_values(
+ self.allowed_values,
+ (name,),
+ value
+ )
+ if (name,) in self.validations:
+ check_validations(
+ self.validations,
+ (name,),
+ value,
+ self._configuration
+ )
+ self.__dict__['_data_store'][name] = value
+
+ def __repr__(self):
+ """For `print` and `pprint`"""
+ return self.to_str()
+
+ def __ne__(self, other):
+ """Returns true if both objects are not equal"""
+ return not self == other
+
+ def __setattr__(self, attr, value):
+ """set the value of an attribute using dot notation: `instance.attr = val`"""
+ self[attr] = value
+
+ def __getattr__(self, attr):
+ """get the value of an attribute using dot notation: `instance.attr`"""
+ return self.__getitem__(attr)
+
+ def __new__(cls, *args, **kwargs):
+ # this function uses the discriminator to
+ # pick a new schema/class to instantiate because a discriminator
+ # propertyName value was passed in
+
+ if len(args) == 1:
+ arg = args[0]
+ if arg is None and is_type_nullable(cls):
+ # The input data is the 'null' value and the type is nullable.
+ return None
+
+ if issubclass(cls, ModelComposed) and allows_single_value_input(cls):
+ model_kwargs = {}
+ oneof_instance = get_oneof_instance(cls, model_kwargs, kwargs, model_arg=arg)
+ return oneof_instance
+
+
+ visited_composed_classes = kwargs.get('_visited_composed_classes', ())
+ if (
+ cls.discriminator is None or
+ cls in visited_composed_classes
+ ):
+ # Use case 1: this openapi schema (cls) does not have a discriminator
+ # Use case 2: we have already visited this class before and are sure that we
+ # want to instantiate it this time. We have visited this class deserializing
+ # a payload with a discriminator. During that process we traveled through
+ # this class but did not make an instance of it. Now we are making an
+ # instance of a composed class which contains cls in it, so this time make an instance of cls.
+ #
+ # Here's an example of use case 2: If Animal has a discriminator
+ # petType and we pass in "Dog", and the class Dog
+ # allOf includes Animal, we move through Animal
+ # once using the discriminator, and pick Dog.
+ # Then in the composed schema dog Dog, we will make an instance of the
+ # Animal class (because Dal has allOf: Animal) but this time we won't travel
+ # through Animal's discriminator because we passed in
+ # _visited_composed_classes = (Animal,)
+
+ return super(OpenApiModel, cls).__new__(cls)
+
+ # Get the name and value of the discriminator property.
+ # The discriminator name is obtained from the discriminator meta-data
+ # and the discriminator value is obtained from the input data.
+ discr_propertyname_py = list(cls.discriminator.keys())[0]
+ discr_propertyname_js = cls.attribute_map[discr_propertyname_py]
+ if discr_propertyname_js in kwargs:
+ discr_value = kwargs[discr_propertyname_js]
+ elif discr_propertyname_py in kwargs:
+ discr_value = kwargs[discr_propertyname_py]
+ else:
+ # The input data does not contain the discriminator property.
+ path_to_item = kwargs.get('_path_to_item', ())
+ raise ApiValueError(
+ "Cannot deserialize input data due to missing discriminator. "
+ "The discriminator property '%s' is missing at path: %s" %
+ (discr_propertyname_js, path_to_item)
+ )
+
+ # Implementation note: the last argument to get_discriminator_class
+ # is a list of visited classes. get_discriminator_class may recursively
+ # call itself and update the list of visited classes, and the initial
+ # value must be an empty list. Hence not using 'visited_composed_classes'
+ new_cls = get_discriminator_class(
+ cls, discr_propertyname_py, discr_value, [])
+ if new_cls is None:
+ path_to_item = kwargs.get('_path_to_item', ())
+ disc_prop_value = kwargs.get(
+ discr_propertyname_js, kwargs.get(discr_propertyname_py))
+ raise ApiValueError(
+ "Cannot deserialize input data due to invalid discriminator "
+ "value. The OpenAPI document has no mapping for discriminator "
+ "property '%s'='%s' at path: %s" %
+ (discr_propertyname_js, disc_prop_value, path_to_item)
+ )
+
+ if new_cls in visited_composed_classes:
+ # if we are making an instance of a composed schema Descendent
+ # which allOf includes Ancestor, then Ancestor contains
+ # a discriminator that includes Descendent.
+ # So if we make an instance of Descendent, we have to make an
+ # instance of Ancestor to hold the allOf properties.
+ # This code detects that use case and makes the instance of Ancestor
+ # For example:
+ # When making an instance of Dog, _visited_composed_classes = (Dog,)
+ # then we make an instance of Animal to include in dog._composed_instances
+ # so when we are here, cls is Animal
+ # cls.discriminator != None
+ # cls not in _visited_composed_classes
+ # new_cls = Dog
+ # but we know we know that we already have Dog
+ # because it is in visited_composed_classes
+ # 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,)
+
+ if cls._composed_schemas.get('allOf') and oneof_anyof_child:
+ # Validate that we can make self because when we make the
+ # new_cls it will not include the allOf validations in self
+ self_inst = super(OpenApiModel, cls).__new__(cls)
+ self_inst.__init__(*args, **kwargs)
+
+ new_inst = new_cls.__new__(new_cls, *args, **kwargs)
+ new_inst.__init__(*args, **kwargs)
+ return new_inst
+
+
+class ModelSimple(OpenApiModel):
+ """the parent class of models whose type != object in their
+ swagger/openapi"""
+
+ def __setitem__(self, name, value):
+ """set the value of an attribute using square-bracket notation: `instance[attr] = val`"""
+ if name in self.required_properties:
+ self.__dict__[name] = value
+ return
+
+ self.set_attribute(name, value)
+
+ def get(self, name, default=None):
+ """returns the value of an attribute or some default value if the attribute was not set"""
+ if name in self.required_properties:
+ return self.__dict__[name]
+
+ return self.__dict__['_data_store'].get(name, default)
+
+ def __getitem__(self, name):
+ """get the value of an attribute using square-bracket notation: `instance[attr]`"""
+ if name in self:
+ return self.get(name)
+
+ raise ApiAttributeError(
+ "{0} has no attribute '{1}'".format(
+ type(self).__name__, name),
+ [e for e in [self._path_to_item, name] if e]
+ )
+
+ def __contains__(self, name):
+ """used by `in` operator to check if an attrbute value was set in an instance: `'attr' in instance`"""
+ if name in self.required_properties:
+ return name in self.__dict__
+
+ return name in self.__dict__['_data_store']
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return str(self.value)
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, self.__class__):
+ return False
+
+ this_val = self._data_store['value']
+ that_val = other._data_store['value']
+ types = set()
+ types.add(this_val.__class__)
+ types.add(that_val.__class__)
+ vals_equal = this_val == that_val
+ return vals_equal
+
+
+class ModelNormal(OpenApiModel):
+ """the parent class of models whose type == object in their
+ swagger/openapi"""
+
+ def __setitem__(self, name, value):
+ """set the value of an attribute using square-bracket notation: `instance[attr] = val`"""
+ if name in self.required_properties:
+ self.__dict__[name] = value
+ return
+
+ self.set_attribute(name, value)
+
+ def get(self, name, default=None):
+ """returns the value of an attribute or some default value if the attribute was not set"""
+ if name in self.required_properties:
+ return self.__dict__[name]
+
+ return self.__dict__['_data_store'].get(name, default)
+
+ def __getitem__(self, name):
+ """get the value of an attribute using square-bracket notation: `instance[attr]`"""
+ if name in self:
+ return self.get(name)
+
+ raise ApiAttributeError(
+ "{0} has no attribute '{1}'".format(
+ type(self).__name__, name),
+ [e for e in [self._path_to_item, name] if e]
+ )
+
+ def __contains__(self, name):
+ """used by `in` operator to check if an attrbute value was set in an instance: `'attr' in instance`"""
+ if name in self.required_properties:
+ return name in self.__dict__
+
+ return name in self.__dict__['_data_store']
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ return model_to_dict(self, serialize=False)
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, self.__class__):
+ return False
+
+ if not set(self._data_store.keys()) == set(other._data_store.keys()):
+ return False
+ for _var_name, this_val in self._data_store.items():
+ that_val = other._data_store[_var_name]
+ types = set()
+ types.add(this_val.__class__)
+ types.add(that_val.__class__)
+ vals_equal = this_val == that_val
+ if not vals_equal:
+ return False
+ return True
+
+
+class ModelComposed(OpenApiModel):
+ """the parent class of models whose type == object in their
+ swagger/openapi and have oneOf/allOf/anyOf
+
+ When one sets a property we use var_name_to_model_instances to store the value in
+ the correct class instances + run any type checking + validation code.
+ When one gets a property we use var_name_to_model_instances to get the value
+ from the correct class instances.
+ This allows multiple composed schemas to contain the same property with additive
+ constraints on the value.
+
+ _composed_schemas (dict) stores the anyOf/allOf/oneOf classes
+ key (str): allOf/oneOf/anyOf
+ value (list): the classes in the XOf definition.
+ Note: none_type can be included when the openapi document version >= 3.1.0
+ _composed_instances (list): stores a list of instances of the composed schemas
+ defined in _composed_schemas. When properties are accessed in the self instance,
+ they are returned from the self._data_store or the data stores in the instances
+ in self._composed_schemas
+ _var_name_to_model_instances (dict): maps between a variable name on self and
+ the composed instances (self included) which contain that data
+ key (str): property name
+ value (list): list of class instances, self or instances in _composed_instances
+ which contain the value that the key is referring to.
+ """
+
+ def __setitem__(self, name, value):
+ """set the value of an attribute using square-bracket notation: `instance[attr] = val`"""
+ if name in self.required_properties:
+ self.__dict__[name] = value
+ return
+
+ """
+ Use cases:
+ 1. additional_properties_type is None (additionalProperties == False in spec)
+ Check for property presence in self.openapi_types
+ if not present then throw an error
+ if present set in self, set attribute
+ always set on composed schemas
+ 2. additional_properties_type exists
+ set attribute on self
+ always set on composed schemas
+ """
+ if self.additional_properties_type is None:
+ """
+ For an attribute to exist on a composed schema it must:
+ - fulfill schema_requirements in the self composed schema not considering oneOf/anyOf/allOf schemas AND
+ - fulfill schema_requirements in each oneOf/anyOf/allOf schemas
+
+ schema_requirements:
+ For an attribute to exist on a schema it must:
+ - be present in properties at the schema OR
+ - have additionalProperties unset (defaults additionalProperties = any type) OR
+ - have additionalProperties set
+ """
+ if name not in self.openapi_types:
+ raise ApiAttributeError(
+ "{0} has no attribute '{1}'".format(
+ type(self).__name__, name),
+ [e for e in [self._path_to_item, name] if e]
+ )
+ # attribute must be set on self and composed instances
+ self.set_attribute(name, value)
+ for model_instance in self._composed_instances:
+ setattr(model_instance, name, value)
+ if name not in self._var_name_to_model_instances:
+ # we assigned an additional property
+ self.__dict__['_var_name_to_model_instances'][name] = self._composed_instances + [self]
+ return None
+
+ __unset_attribute_value__ = object()
+
+ def get(self, name, default=None):
+ """returns the value of an attribute or some default value if the attribute was not set"""
+ if name in self.required_properties:
+ return self.__dict__[name]
+
+ # get the attribute from the correct instance
+ model_instances = self._var_name_to_model_instances.get(name)
+ values = []
+ # A composed model stores self and child (oneof/anyOf/allOf) models under
+ # self._var_name_to_model_instances.
+ # Any property must exist in self and all model instances
+ # The value stored in all model instances must be the same
+ if model_instances:
+ for model_instance in model_instances:
+ if name in model_instance._data_store:
+ v = model_instance._data_store[name]
+ if v not in values:
+ values.append(v)
+ len_values = len(values)
+ if len_values == 0:
+ return default
+ elif len_values == 1:
+ return values[0]
+ elif len_values > 1:
+ raise ApiValueError(
+ "Values stored for property {0} in {1} differ when looking "
+ "at self and self's composed instances. All values must be "
+ "the same".format(name, type(self).__name__),
+ [e for e in [self._path_to_item, name] if e]
+ )
+
+ def __getitem__(self, name):
+ """get the value of an attribute using square-bracket notation: `instance[attr]`"""
+ value = self.get(name, self.__unset_attribute_value__)
+ if value is self.__unset_attribute_value__:
+ raise ApiAttributeError(
+ "{0} has no attribute '{1}'".format(
+ type(self).__name__, name),
+ [e for e in [self._path_to_item, name] if e]
+ )
+ return value
+
+ def __contains__(self, name):
+ """used by `in` operator to check if an attrbute value was set in an instance: `'attr' in instance`"""
+
+ if name in self.required_properties:
+ return name in self.__dict__
+
+ model_instances = self._var_name_to_model_instances.get(
+ name, self._additional_properties_model_instances)
+
+ if model_instances:
+ for model_instance in model_instances:
+ if name in model_instance._data_store:
+ return True
+
+ return False
+
+ def to_dict(self):
+ """Returns the model properties as a dict"""
+ return model_to_dict(self, serialize=False)
+
+ def to_str(self):
+ """Returns the string representation of the model"""
+ return pprint.pformat(self.to_dict())
+
+ def __eq__(self, other):
+ """Returns true if both objects are equal"""
+ if not isinstance(other, self.__class__):
+ return False
+
+ if not set(self._data_store.keys()) == set(other._data_store.keys()):
+ return False
+ for _var_name, this_val in self._data_store.items():
+ that_val = other._data_store[_var_name]
+ types = set()
+ types.add(this_val.__class__)
+ types.add(that_val.__class__)
+ vals_equal = this_val == that_val
+ if not vals_equal:
+ return False
+ return True
+
+
+COERCION_INDEX_BY_TYPE = {
+ ModelComposed: 0,
+ ModelNormal: 1,
+ ModelSimple: 2,
+ none_type: 3, # The type of 'None'.
+ list: 4,
+ dict: 5,
+ float: 6,
+ int: 7,
+ bool: 8,
+ datetime: 9,
+ date: 10,
+ str: 11,
+ file_type: 12, # 'file_type' is an alias for the built-in 'file' or 'io.IOBase' type.
+}
+
+# these are used to limit what type conversions we try to do
+# when we have a valid type already and we want to try converting
+# to another type
+UPCONVERSION_TYPE_PAIRS = (
+ (str, datetime),
+ (str, date),
+ (int, float), # A float may be serialized as an integer, e.g. '3' is a valid serialized float.
+ (list, ModelComposed),
+ (dict, ModelComposed),
+ (str, ModelComposed),
+ (int, ModelComposed),
+ (float, ModelComposed),
+ (list, ModelComposed),
+ (list, ModelNormal),
+ (dict, ModelNormal),
+ (str, ModelSimple),
+ (int, ModelSimple),
+ (float, ModelSimple),
+ (list, ModelSimple),
+)
+
+COERCIBLE_TYPE_PAIRS = {
+ False: ( # client instantiation of a model with client data
+ # (dict, ModelComposed),
+ # (list, ModelComposed),
+ # (dict, ModelNormal),
+ # (list, ModelNormal),
+ # (str, ModelSimple),
+ # (int, ModelSimple),
+ # (float, ModelSimple),
+ # (list, ModelSimple),
+ # (str, int),
+ # (str, float),
+ # (str, datetime),
+ # (str, date),
+ # (int, str),
+ # (float, str),
+ ),
+ True: ( # server -> client data
+ (dict, ModelComposed),
+ (list, ModelComposed),
+ (dict, ModelNormal),
+ (list, ModelNormal),
+ (str, ModelSimple),
+ (int, ModelSimple),
+ (float, ModelSimple),
+ (list, ModelSimple),
+ # (str, int),
+ # (str, float),
+ (str, datetime),
+ (str, date),
+ # (int, str),
+ # (float, str),
+ (str, file_type)
+ ),
+}
+
+
+def get_simple_class(input_value):
+ """Returns an input_value's simple class that we will use for type checking
+ Python2:
+ float and int will return int, where int is the python3 int backport
+ str and unicode will return str, where str is the python3 str backport
+ Note: float and int ARE both instances of int backport
+ Note: str_py2 and unicode_py2 are NOT both instances of str backport
+
+ Args:
+ input_value (class/class_instance): the item for which we will return
+ the simple class
+ """
+ if isinstance(input_value, type):
+ # input_value is a class
+ return input_value
+ elif isinstance(input_value, tuple):
+ return tuple
+ elif isinstance(input_value, list):
+ return list
+ elif isinstance(input_value, dict):
+ return dict
+ elif isinstance(input_value, none_type):
+ return none_type
+ elif isinstance(input_value, file_type):
+ return file_type
+ elif isinstance(input_value, bool):
+ # this must be higher than the int check because
+ # isinstance(True, int) == True
+ return bool
+ elif isinstance(input_value, int):
+ return int
+ elif isinstance(input_value, datetime):
+ # this must be higher than the date check because
+ # isinstance(datetime_instance, date) == True
+ return datetime
+ elif isinstance(input_value, date):
+ return date
+ elif isinstance(input_value, str):
+ return str
+ return type(input_value)
+
+
+def check_allowed_values(allowed_values, input_variable_path, input_values):
+ """Raises an exception if the input_values are not allowed
+
+ Args:
+ allowed_values (dict): the allowed_values dict
+ input_variable_path (tuple): the path to the input variable
+ input_values (list/str/int/float/date/datetime): the values that we
+ are checking to see if they are in allowed_values
+ """
+ these_allowed_values = list(allowed_values[input_variable_path].values())
+ if (isinstance(input_values, list)
+ and not set(input_values).issubset(
+ set(these_allowed_values))):
+ invalid_values = ", ".join(
+ map(str, set(input_values) - set(these_allowed_values))),
+ raise ApiValueError(
+ "Invalid values for `%s` [%s], must be a subset of [%s]" %
+ (
+ input_variable_path[0],
+ invalid_values,
+ ", ".join(map(str, these_allowed_values))
+ )
+ )
+ elif (isinstance(input_values, dict)
+ and not set(
+ input_values.keys()).issubset(set(these_allowed_values))):
+ invalid_values = ", ".join(
+ map(str, set(input_values.keys()) - set(these_allowed_values)))
+ raise ApiValueError(
+ "Invalid keys in `%s` [%s], must be a subset of [%s]" %
+ (
+ input_variable_path[0],
+ invalid_values,
+ ", ".join(map(str, these_allowed_values))
+ )
+ )
+ elif (not isinstance(input_values, (list, dict))
+ and input_values not in these_allowed_values):
+ raise ApiValueError(
+ "Invalid value for `%s` (%s), must be one of %s" %
+ (
+ input_variable_path[0],
+ input_values,
+ these_allowed_values
+ )
+ )
+
+
+def is_json_validation_enabled(schema_keyword, configuration=None):
+ """Returns true if JSON schema validation is enabled for the specified
+ validation keyword. This can be used to skip JSON schema structural validation
+ as requested in the configuration.
+
+ Args:
+ schema_keyword (string): the name of a JSON schema validation keyword.
+ configuration (Configuration): the configuration class.
+ """
+
+ return (configuration is None or
+ not hasattr(configuration, '_disabled_client_side_validations') or
+ schema_keyword not in configuration._disabled_client_side_validations)
+
+
+def check_validations(
+ validations, input_variable_path, input_values,
+ configuration=None):
+ """Raises an exception if the input_values are invalid
+
+ Args:
+ validations (dict): the validation dictionary.
+ input_variable_path (tuple): the path to the input variable.
+ input_values (list/str/int/float/date/datetime): the values that we
+ are checking.
+ configuration (Configuration): the configuration class.
+ """
+
+ if input_values is None:
+ return
+
+ current_validations = validations[input_variable_path]
+ if (is_json_validation_enabled('multipleOf', configuration) and
+ 'multiple_of' in current_validations and
+ isinstance(input_values, (int, float)) and
+ not (float(input_values) / current_validations['multiple_of']).is_integer()):
+ # Note 'multipleOf' will be as good as the floating point arithmetic.
+ raise ApiValueError(
+ "Invalid value for `%s`, value must be a multiple of "
+ "`%s`" % (
+ input_variable_path[0],
+ current_validations['multiple_of']
+ )
+ )
+
+ if (is_json_validation_enabled('maxLength', configuration) and
+ 'max_length' in current_validations and
+ len(input_values) > current_validations['max_length']):
+ raise ApiValueError(
+ "Invalid value for `%s`, length must be less than or equal to "
+ "`%s`" % (
+ input_variable_path[0],
+ current_validations['max_length']
+ )
+ )
+
+ if (is_json_validation_enabled('minLength', configuration) and
+ 'min_length' in current_validations and
+ len(input_values) < current_validations['min_length']):
+ raise ApiValueError(
+ "Invalid value for `%s`, length must be greater than or equal to "
+ "`%s`" % (
+ input_variable_path[0],
+ current_validations['min_length']
+ )
+ )
+
+ if (is_json_validation_enabled('maxItems', configuration) and
+ 'max_items' in current_validations and
+ len(input_values) > current_validations['max_items']):
+ raise ApiValueError(
+ "Invalid value for `%s`, number of items must be less than or "
+ "equal to `%s`" % (
+ input_variable_path[0],
+ current_validations['max_items']
+ )
+ )
+
+ if (is_json_validation_enabled('minItems', configuration) and
+ 'min_items' in current_validations and
+ len(input_values) < current_validations['min_items']):
+ raise ValueError(
+ "Invalid value for `%s`, number of items must be greater than or "
+ "equal to `%s`" % (
+ input_variable_path[0],
+ current_validations['min_items']
+ )
+ )
+
+ items = ('exclusive_maximum', 'inclusive_maximum', 'exclusive_minimum',
+ 'inclusive_minimum')
+ if (any(item in current_validations for item in items)):
+ if isinstance(input_values, list):
+ max_val = max(input_values)
+ min_val = min(input_values)
+ elif isinstance(input_values, dict):
+ max_val = max(input_values.values())
+ min_val = min(input_values.values())
+ else:
+ max_val = input_values
+ min_val = input_values
+
+ if (is_json_validation_enabled('exclusiveMaximum', configuration) and
+ 'exclusive_maximum' in current_validations and
+ max_val >= current_validations['exclusive_maximum']):
+ raise ApiValueError(
+ "Invalid value for `%s`, must be a value less than `%s`" % (
+ input_variable_path[0],
+ current_validations['exclusive_maximum']
+ )
+ )
+
+ if (is_json_validation_enabled('maximum', configuration) and
+ 'inclusive_maximum' in current_validations and
+ max_val > current_validations['inclusive_maximum']):
+ raise ApiValueError(
+ "Invalid value for `%s`, must be a value less than or equal to "
+ "`%s`" % (
+ input_variable_path[0],
+ current_validations['inclusive_maximum']
+ )
+ )
+
+ if (is_json_validation_enabled('exclusiveMinimum', configuration) and
+ 'exclusive_minimum' in current_validations and
+ min_val <= current_validations['exclusive_minimum']):
+ raise ApiValueError(
+ "Invalid value for `%s`, must be a value greater than `%s`" %
+ (
+ input_variable_path[0],
+ current_validations['exclusive_maximum']
+ )
+ )
+
+ if (is_json_validation_enabled('minimum', configuration) and
+ 'inclusive_minimum' in current_validations and
+ min_val < current_validations['inclusive_minimum']):
+ raise ApiValueError(
+ "Invalid value for `%s`, must be a value greater than or equal "
+ "to `%s`" % (
+ input_variable_path[0],
+ current_validations['inclusive_minimum']
+ )
+ )
+ flags = current_validations.get('regex', {}).get('flags', 0)
+ if (is_json_validation_enabled('pattern', configuration) and
+ 'regex' in current_validations and
+ not re.search(current_validations['regex']['pattern'],
+ input_values, flags=flags)):
+ err_msg = r"Invalid value for `%s`, must match regular expression `%s`" % (
+ input_variable_path[0],
+ current_validations['regex']['pattern']
+ )
+ if flags != 0:
+ # Don't print the regex flags if the flags are not
+ # specified in the OAS document.
+ err_msg = r"%s with flags=`%s`" % (err_msg, flags)
+ raise ApiValueError(err_msg)
+
+
+def order_response_types(required_types):
+ """Returns the required types sorted in coercion order
+
+ Args:
+ required_types (list/tuple): collection of classes or instance of
+ list or dict with class information inside it.
+
+ Returns:
+ (list): coercion order sorted collection of classes or instance
+ of list or dict with class information inside it.
+ """
+
+ def index_getter(class_or_instance):
+ if isinstance(class_or_instance, list):
+ return COERCION_INDEX_BY_TYPE[list]
+ elif isinstance(class_or_instance, dict):
+ return COERCION_INDEX_BY_TYPE[dict]
+ elif (inspect.isclass(class_or_instance)
+ and issubclass(class_or_instance, ModelComposed)):
+ return COERCION_INDEX_BY_TYPE[ModelComposed]
+ elif (inspect.isclass(class_or_instance)
+ and issubclass(class_or_instance, ModelNormal)):
+ return COERCION_INDEX_BY_TYPE[ModelNormal]
+ elif (inspect.isclass(class_or_instance)
+ and issubclass(class_or_instance, ModelSimple)):
+ return COERCION_INDEX_BY_TYPE[ModelSimple]
+ elif class_or_instance in COERCION_INDEX_BY_TYPE:
+ return COERCION_INDEX_BY_TYPE[class_or_instance]
+ raise ApiValueError("Unsupported type: %s" % class_or_instance)
+
+ sorted_types = sorted(
+ required_types,
+ key=lambda class_or_instance: index_getter(class_or_instance)
+ )
+ return sorted_types
+
+
+def remove_uncoercible(required_types_classes, current_item, spec_property_naming,
+ must_convert=True):
+ """Only keeps the type conversions that are possible
+
+ Args:
+ required_types_classes (tuple): tuple of classes that are required
+ these should be ordered by COERCION_INDEX_BY_TYPE
+ spec_property_naming (bool): True if the variable names in the input
+ data are serialized names as specified in the OpenAPI document.
+ False if the variables names in the input data are python
+ variable names in PEP-8 snake case.
+ current_item (any): the current item (input data) to be converted
+
+ Keyword Args:
+ must_convert (bool): if True the item to convert is of the wrong
+ type and we want a big list of coercibles
+ if False, we want a limited list of coercibles
+
+ Returns:
+ (list): the remaining coercible required types, classes only
+ """
+ current_type_simple = get_simple_class(current_item)
+
+ results_classes = []
+ for required_type_class in required_types_classes:
+ # convert our models to OpenApiModel
+ required_type_class_simplified = required_type_class
+ if isinstance(required_type_class_simplified, type):
+ if issubclass(required_type_class_simplified, ModelComposed):
+ required_type_class_simplified = ModelComposed
+ elif issubclass(required_type_class_simplified, ModelNormal):
+ required_type_class_simplified = ModelNormal
+ elif issubclass(required_type_class_simplified, ModelSimple):
+ required_type_class_simplified = ModelSimple
+
+ if required_type_class_simplified == current_type_simple:
+ # don't consider converting to one's own class
+ continue
+
+ class_pair = (current_type_simple, required_type_class_simplified)
+ if must_convert and class_pair in COERCIBLE_TYPE_PAIRS[spec_property_naming]:
+ results_classes.append(required_type_class)
+ elif class_pair in UPCONVERSION_TYPE_PAIRS:
+ results_classes.append(required_type_class)
+ return results_classes
+
+def get_discriminated_classes(cls):
+ """
+ Returns all the classes that a discriminator converts to
+ TODO: lru_cache this
+ """
+ possible_classes = []
+ key = list(cls.discriminator.keys())[0]
+ if is_type_nullable(cls):
+ possible_classes.append(cls)
+ for discr_cls in cls.discriminator[key].values():
+ if hasattr(discr_cls, 'discriminator') and discr_cls.discriminator is not None:
+ possible_classes.extend(get_discriminated_classes(discr_cls))
+ else:
+ possible_classes.append(discr_cls)
+ return possible_classes
+
+
+def get_possible_classes(cls, from_server_context):
+ # TODO: lru_cache this
+ possible_classes = [cls]
+ if from_server_context:
+ return possible_classes
+ if hasattr(cls, 'discriminator') and cls.discriminator is not None:
+ possible_classes = []
+ possible_classes.extend(get_discriminated_classes(cls))
+ elif issubclass(cls, ModelComposed):
+ possible_classes.extend(composed_model_input_classes(cls))
+ return possible_classes
+
+
+def get_required_type_classes(required_types_mixed, spec_property_naming):
+ """Converts the tuple required_types into a tuple and a dict described
+ below
+
+ Args:
+ required_types_mixed (tuple/list): will contain either classes or
+ instance of list or dict
+ spec_property_naming (bool): if True these values came from the
+ server, and we use the data types in our endpoints.
+ If False, we are client side and we need to include
+ oneOf and discriminator classes inside the data types in our endpoints
+
+ Returns:
+ (valid_classes, dict_valid_class_to_child_types_mixed):
+ valid_classes (tuple): the valid classes that the current item
+ should be
+ dict_valid_class_to_child_types_mixed (dict):
+ valid_class (class): this is the key
+ child_types_mixed (list/dict/tuple): describes the valid child
+ types
+ """
+ valid_classes = []
+ child_req_types_by_current_type = {}
+ for required_type in required_types_mixed:
+ if isinstance(required_type, list):
+ valid_classes.append(list)
+ child_req_types_by_current_type[list] = required_type
+ elif isinstance(required_type, tuple):
+ valid_classes.append(tuple)
+ child_req_types_by_current_type[tuple] = required_type
+ elif isinstance(required_type, dict):
+ valid_classes.append(dict)
+ child_req_types_by_current_type[dict] = required_type[str]
+ else:
+ valid_classes.extend(get_possible_classes(required_type, spec_property_naming))
+ return tuple(valid_classes), child_req_types_by_current_type
+
+
+def change_keys_js_to_python(input_dict, model_class):
+ """
+ Converts from javascript_key keys in the input_dict to python_keys in
+ the output dict using the mapping in model_class.
+ If the input_dict contains a key which does not declared in the model_class,
+ the key is added to the output dict as is. The assumption is the model_class
+ may have undeclared properties (additionalProperties attribute in the OAS
+ document).
+ """
+
+ if getattr(model_class, 'attribute_map', None) is None:
+ return input_dict
+ output_dict = {}
+ reversed_attr_map = {value: key for key, value in
+ model_class.attribute_map.items()}
+ for javascript_key, value in input_dict.items():
+ python_key = reversed_attr_map.get(javascript_key)
+ if python_key is None:
+ # if the key is unknown, it is in error or it is an
+ # additionalProperties variable
+ python_key = javascript_key
+ output_dict[python_key] = value
+ return output_dict
+
+
+def get_type_error(var_value, path_to_item, valid_classes, key_type=False):
+ error_msg = type_error_message(
+ var_name=path_to_item[-1],
+ var_value=var_value,
+ valid_classes=valid_classes,
+ key_type=key_type
+ )
+ return ApiTypeError(
+ error_msg,
+ path_to_item=path_to_item,
+ valid_classes=valid_classes,
+ key_type=key_type
+ )
+
+
+def deserialize_primitive(data, klass, path_to_item):
+ """Deserializes string to primitive type.
+
+ :param data: str/int/float
+ :param klass: str/class the class to convert to
+
+ :return: int, float, str, bool, date, datetime
+ """
+ additional_message = ""
+ try:
+ if klass in {datetime, date}:
+ additional_message = (
+ "If you need your parameter to have a fallback "
+ "string value, please set its type as `type: {}` in your "
+ "spec. That allows the value to be any type. "
+ )
+ if klass == datetime:
+ if len(data) < 8:
+ raise ValueError("This is not a datetime")
+ # The string should be in iso8601 datetime format.
+ parsed_datetime = parse(data)
+ date_only = (
+ parsed_datetime.hour == 0 and
+ parsed_datetime.minute == 0 and
+ parsed_datetime.second == 0 and
+ parsed_datetime.tzinfo is None and
+ 8 <= len(data) <= 10
+ )
+ if date_only:
+ raise ValueError("This is a date, not a datetime")
+ return parsed_datetime
+ elif klass == date:
+ if len(data) < 8:
+ raise ValueError("This is not a date")
+ return parse(data).date()
+ else:
+ converted_value = klass(data)
+ if isinstance(data, str) and klass == float:
+ if str(converted_value) != data:
+ # '7' -> 7.0 -> '7.0' != '7'
+ raise ValueError('This is not a float')
+ return converted_value
+ except (OverflowError, ValueError) as ex:
+ # parse can raise OverflowError
+ raise ApiValueError(
+ "{0}Failed to parse {1} as {2}".format(
+ additional_message, repr(data), klass.__name__
+ ),
+ path_to_item=path_to_item
+ ) from ex
+
+
+def get_discriminator_class(model_class,
+ discr_name,
+ discr_value, cls_visited):
+ """Returns the child class specified by the discriminator.
+
+ Args:
+ model_class (OpenApiModel): the model class.
+ discr_name (string): the name of the discriminator property.
+ discr_value (any): the discriminator value.
+ cls_visited (list): list of model classes that have been visited.
+ Used to determine the discriminator class without
+ visiting circular references indefinitely.
+
+ Returns:
+ used_model_class (class/None): the chosen child class that will be used
+ to deserialize the data, for example dog.Dog.
+ If a class is not found, None is returned.
+ """
+
+ if model_class in cls_visited:
+ # The class has already been visited and no suitable class was found.
+ return None
+ cls_visited.append(model_class)
+ used_model_class = None
+ if discr_name in model_class.discriminator:
+ class_name_to_discr_class = model_class.discriminator[discr_name]
+ used_model_class = class_name_to_discr_class.get(discr_value)
+ if used_model_class is None:
+ # We didn't find a discriminated class in class_name_to_discr_class.
+ # So look in the ancestor or descendant discriminators
+ # The discriminator mapping may exist in a descendant (anyOf, oneOf)
+ # or ancestor (allOf).
+ # Ancestor example: in the GrandparentAnimal -> ParentPet -> ChildCat
+ # hierarchy, the discriminator mappings may be defined at any level
+ # in the hierarchy.
+ # Descendant example: mammal -> whale/zebra/Pig -> BasquePig/DanishPig
+ # if we try to make BasquePig from mammal, we need to travel through
+ # the oneOf descendant discriminators to find BasquePig
+ descendant_classes = model_class._composed_schemas.get('oneOf', ()) + \
+ model_class._composed_schemas.get('anyOf', ())
+ ancestor_classes = model_class._composed_schemas.get('allOf', ())
+ possible_classes = descendant_classes + ancestor_classes
+ for cls in possible_classes:
+ # Check if the schema has inherited discriminators.
+ if hasattr(cls, 'discriminator') and cls.discriminator is not None:
+ used_model_class = get_discriminator_class(
+ cls, discr_name, discr_value, cls_visited)
+ if used_model_class is not None:
+ return used_model_class
+ return used_model_class
+
+
+def deserialize_model(model_data, model_class, path_to_item, check_type,
+ configuration, spec_property_naming):
+ """Deserializes model_data to model instance.
+
+ Args:
+ model_data (int/str/float/bool/none_type/list/dict): data to instantiate the model
+ model_class (OpenApiModel): the model class
+ path_to_item (list): path to the model in the received data
+ check_type (bool): whether to check the data tupe for the values in
+ the model
+ configuration (Configuration): the instance to use to convert files
+ spec_property_naming (bool): True if the variable names in the input
+ data are serialized names as specified in the OpenAPI document.
+ False if the variables names in the input data are python
+ variable names in PEP-8 snake case.
+
+ Returns:
+ model instance
+
+ Raise:
+ ApiTypeError
+ ApiValueError
+ ApiKeyError
+ """
+
+ kw_args = dict(_check_type=check_type,
+ _path_to_item=path_to_item,
+ _configuration=configuration,
+ _spec_property_naming=spec_property_naming)
+
+ if issubclass(model_class, ModelSimple):
+ return model_class(model_data, **kw_args)
+ elif isinstance(model_data, list):
+ return model_class(*model_data, **kw_args)
+ if isinstance(model_data, dict):
+ kw_args.update(model_data)
+ return model_class(**kw_args)
+ elif isinstance(model_data, PRIMITIVE_TYPES):
+ return model_class(model_data, **kw_args)
+
+
+def deserialize_file(response_data, configuration, content_disposition=None):
+ """Deserializes body to file
+
+ Saves response body into a file in a temporary folder,
+ using the filename from the `Content-Disposition` header if provided.
+
+ Args:
+ param response_data (str): the file data to write
+ configuration (Configuration): the instance to use to convert files
+
+ Keyword Args:
+ content_disposition (str): the value of the Content-Disposition
+ header
+
+ Returns:
+ (file_type): the deserialized file which is open
+ The user is responsible for closing and reading the file
+ """
+ fd, path = tempfile.mkstemp(dir=configuration.temp_folder_path)
+ os.close(fd)
+ os.remove(path)
+
+ if content_disposition:
+ filename = re.search(r'filename=[\'"]?([^\'"\s]+)[\'"]?',
+ content_disposition).group(1)
+ path = os.path.join(os.path.dirname(path), filename)
+
+ with open(path, "wb") as f:
+ if isinstance(response_data, str):
+ # change str to bytes so we can write it
+ response_data = response_data.encode('utf-8')
+ f.write(response_data)
+
+ f = open(path, "rb")
+ return f
+
+
+def attempt_convert_item(input_value, valid_classes, path_to_item,
+ configuration, spec_property_naming, key_type=False,
+ must_convert=False, check_type=True):
+ """
+ Args:
+ input_value (any): the data to convert
+ valid_classes (any): the classes that are valid
+ path_to_item (list): the path to the item to convert
+ configuration (Configuration): the instance to use to convert files
+ spec_property_naming (bool): True if the variable names in the input
+ data are serialized names as specified in the OpenAPI document.
+ False if the variables names in the input data are python
+ variable names in PEP-8 snake case.
+ key_type (bool): if True we need to convert a key type (not supported)
+ must_convert (bool): if True we must convert
+ check_type (bool): if True we check the type or the returned data in
+ ModelComposed/ModelNormal/ModelSimple instances
+
+ Returns:
+ instance (any) the fixed item
+
+ Raises:
+ ApiTypeError
+ ApiValueError
+ ApiKeyError
+ """
+ valid_classes_ordered = order_response_types(valid_classes)
+ valid_classes_coercible = remove_uncoercible(
+ valid_classes_ordered, input_value, spec_property_naming)
+ if not valid_classes_coercible or key_type:
+ # we do not handle keytype errors, json will take care
+ # of this for us
+ if configuration is None or not configuration.discard_unknown_keys:
+ raise get_type_error(input_value, path_to_item, valid_classes,
+ key_type=key_type)
+ for valid_class in valid_classes_coercible:
+ try:
+ if issubclass(valid_class, OpenApiModel):
+ return deserialize_model(input_value, valid_class,
+ path_to_item, check_type,
+ configuration, spec_property_naming)
+ elif valid_class == file_type:
+ return deserialize_file(input_value, configuration)
+ return deserialize_primitive(input_value, valid_class,
+ path_to_item)
+ except (ApiTypeError, ApiValueError, ApiKeyError) as conversion_exc:
+ if must_convert:
+ raise conversion_exc
+ # if we have conversion errors when must_convert == False
+ # we ignore the exception and move on to the next class
+ continue
+ # we were unable to convert, must_convert == False
+ return input_value
+
+
+def is_type_nullable(input_type):
+ """
+ Returns true if None is an allowed value for the specified input_type.
+
+ A type is nullable if at least one of the following conditions is true:
+ 1. The OAS 'nullable' attribute has been specified,
+ 1. The type is the 'null' type,
+ 1. The type is a anyOf/oneOf composed schema, and a child schema is
+ the 'null' type.
+ Args:
+ input_type (type): the class of the input_value that we are
+ checking
+ Returns:
+ bool
+ """
+ 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.
+ 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', ()):
+ if is_type_nullable(t): return True
+ return False
+
+
+def is_valid_type(input_class_simple, valid_classes):
+ """
+ Args:
+ input_class_simple (class): the class of the input_value that we are
+ checking
+ valid_classes (tuple): the valid classes that the current item
+ should be
+ Returns:
+ bool
+ """
+ valid_type = input_class_simple in valid_classes
+ if not valid_type and (
+ issubclass(input_class_simple, OpenApiModel) or
+ input_class_simple is none_type):
+ for valid_class in valid_classes:
+ if input_class_simple is none_type and is_type_nullable(valid_class):
+ # Schema is oneOf/anyOf and the 'null' type is one of the allowed types.
+ return True
+ if not (issubclass(valid_class, OpenApiModel) and valid_class.discriminator):
+ continue
+ discr_propertyname_py = list(valid_class.discriminator.keys())[0]
+ discriminator_classes = (
+ valid_class.discriminator[discr_propertyname_py].values()
+ )
+ valid_type = is_valid_type(input_class_simple, discriminator_classes)
+ if valid_type:
+ return True
+ return valid_type
+
+
+def validate_and_convert_types(input_value, required_types_mixed, path_to_item,
+ spec_property_naming, _check_type, configuration=None):
+ """Raises a TypeError is there is a problem, otherwise returns value
+
+ Args:
+ input_value (any): the data to validate/convert
+ required_types_mixed (list/dict/tuple): A list of
+ valid classes, or a list tuples of valid classes, or a dict where
+ the value is a tuple of value classes
+ path_to_item: (list) the path to the data being validated
+ this stores a list of keys or indices to get to the data being
+ validated
+ spec_property_naming (bool): True if the variable names in the input
+ data are serialized names as specified in the OpenAPI document.
+ False if the variables names in the input data are python
+ variable names in PEP-8 snake case.
+ _check_type: (boolean) if true, type will be checked and conversion
+ will be attempted.
+ configuration: (Configuration): the configuration class to use
+ when converting file_type items.
+ If passed, conversion will be attempted when possible
+ If not passed, no conversions will be attempted and
+ exceptions will be raised
+
+ Returns:
+ the correctly typed value
+
+ Raises:
+ ApiTypeError
+ """
+ results = get_required_type_classes(required_types_mixed, spec_property_naming)
+ valid_classes, child_req_types_by_current_type = results
+
+ input_class_simple = get_simple_class(input_value)
+ valid_type = is_valid_type(input_class_simple, valid_classes)
+ if not valid_type:
+ if configuration:
+ # if input_value is not valid_type try to convert it
+ converted_instance = attempt_convert_item(
+ input_value,
+ valid_classes,
+ path_to_item,
+ configuration,
+ spec_property_naming,
+ key_type=False,
+ must_convert=True,
+ check_type=_check_type
+ )
+ return converted_instance
+ else:
+ raise get_type_error(input_value, path_to_item, valid_classes,
+ key_type=False)
+
+ # input_value's type is in valid_classes
+ if len(valid_classes) > 1 and configuration:
+ # there are valid classes which are not the current class
+ valid_classes_coercible = remove_uncoercible(
+ valid_classes, input_value, spec_property_naming, must_convert=False)
+ if valid_classes_coercible:
+ converted_instance = attempt_convert_item(
+ input_value,
+ valid_classes_coercible,
+ path_to_item,
+ configuration,
+ spec_property_naming,
+ key_type=False,
+ must_convert=False,
+ check_type=_check_type
+ )
+ return converted_instance
+
+ if child_req_types_by_current_type == {}:
+ # all types are of the required types and there are no more inner
+ # variables left to look at
+ return input_value
+ inner_required_types = child_req_types_by_current_type.get(
+ type(input_value)
+ )
+ if inner_required_types is None:
+ # for this type, there are not more inner variables left to look at
+ return input_value
+ if isinstance(input_value, list):
+ if input_value == []:
+ # allow an empty list
+ return input_value
+ for index, inner_value in enumerate(input_value):
+ inner_path = list(path_to_item)
+ inner_path.append(index)
+ input_value[index] = validate_and_convert_types(
+ inner_value,
+ inner_required_types,
+ inner_path,
+ spec_property_naming,
+ _check_type,
+ configuration=configuration
+ )
+ elif isinstance(input_value, dict):
+ if input_value == {}:
+ # allow an empty dict
+ return input_value
+ for inner_key, inner_val in input_value.items():
+ inner_path = list(path_to_item)
+ inner_path.append(inner_key)
+ if get_simple_class(inner_key) != str:
+ raise get_type_error(inner_key, inner_path, valid_classes,
+ key_type=True)
+ input_value[inner_key] = validate_and_convert_types(
+ inner_val,
+ inner_required_types,
+ inner_path,
+ spec_property_naming,
+ _check_type,
+ configuration=configuration
+ )
+ return input_value
+
+
+def model_to_dict(model_instance, serialize=True):
+ """Returns the model properties as a dict
+
+ Args:
+ model_instance (one of your model instances): the model instance that
+ will be converted to a dict.
+
+ Keyword Args:
+ serialize (bool): if True, the keys in the dict will be values from
+ attribute_map
+ """
+ result = {}
+
+ model_instances = [model_instance]
+ if model_instance._composed_schemas:
+ model_instances.extend(model_instance._composed_instances)
+ for model_instance in model_instances:
+ for attr, value in model_instance._data_store.items():
+ if serialize:
+ # we use get here because additional property key names do not
+ # exist in attribute_map
+ attr = model_instance.attribute_map.get(attr, attr)
+ if isinstance(value, list):
+ if not value:
+ # empty list or None
+ result[attr] = value
+ else:
+ res = []
+ for v in value:
+ if isinstance(v, PRIMITIVE_TYPES) or v is None:
+ res.append(v)
+ elif isinstance(v, ModelSimple):
+ res.append(v.value)
+ else:
+ res.append(model_to_dict(v, serialize=serialize))
+ result[attr] = res
+ elif isinstance(value, dict):
+ result[attr] = dict(map(
+ lambda item: (item[0],
+ model_to_dict(item[1], serialize=serialize))
+ if hasattr(item[1], '_data_store') else item,
+ value.items()
+ ))
+ elif isinstance(value, ModelSimple):
+ result[attr] = value.value
+ elif hasattr(value, '_data_store'):
+ result[attr] = model_to_dict(value, serialize=serialize)
+ else:
+ result[attr] = value
+
+ return result
+
+
+def type_error_message(var_value=None, var_name=None, valid_classes=None,
+ key_type=None):
+ """
+ Keyword Args:
+ var_value (any): the variable which has the type_error
+ var_name (str): the name of the variable which has the typ error
+ valid_classes (tuple): the accepted classes for current_item's
+ value
+ key_type (bool): False if our value is a value in a dict
+ True if it is a key in a dict
+ False if our item is an item in a list
+ """
+ key_or_value = 'value'
+ if key_type:
+ key_or_value = 'key'
+ valid_classes_phrase = get_valid_classes_phrase(valid_classes)
+ msg = (
+ "Invalid type for variable '{0}'. Required {1} type {2} and "
+ "passed type was {3}".format(
+ var_name,
+ key_or_value,
+ valid_classes_phrase,
+ type(var_value).__name__,
+ )
+ )
+ return msg
+
+
+def get_valid_classes_phrase(input_classes):
+ """Returns a string phrase describing what types are allowed
+ """
+ all_classes = list(input_classes)
+ all_classes = sorted(all_classes, key=lambda cls: cls.__name__)
+ all_class_names = [cls.__name__ for cls in all_classes]
+ if len(all_class_names) == 1:
+ return 'is {0}'.format(all_class_names[0])
+ return "is one of [{0}]".format(", ".join(all_class_names))
+
+
+def convert_js_args_to_python_args(fn):
+ from functools import wraps
+ @wraps(fn)
+ def wrapped_init(_self, *args, **kwargs):
+ """
+ An attribute named `self` received from the api will conflicts with the reserved `self`
+ parameter of a class method. During generation, `self` attributes are mapped
+ to `_self` in models. Here, we name `_self` instead of `self` to avoid conflicts.
+ """
+ spec_property_naming = kwargs.get('_spec_property_naming', False)
+ if spec_property_naming:
+ kwargs = change_keys_js_to_python(kwargs, _self.__class__)
+ return fn(_self, *args, **kwargs)
+ return wrapped_init
+
+
+def get_allof_instances(self, model_args, constant_args):
+ """
+ Args:
+ self: the class we are handling
+ model_args (dict): var_name to var_value
+ used to make instances
+ constant_args (dict):
+ metadata arguments:
+ _check_type
+ _path_to_item
+ _spec_property_naming
+ _configuration
+ _visited_composed_classes
+
+ Returns
+ composed_instances (list)
+ """
+ composed_instances = []
+ for allof_class in self._composed_schemas['allOf']:
+
+ try:
+ allof_instance = allof_class(**model_args, **constant_args)
+ composed_instances.append(allof_instance)
+ except Exception as ex:
+ raise ApiValueError(
+ "Invalid inputs given to generate an instance of '%s'. The "
+ "input data was invalid for the allOf schema '%s' in the composed "
+ "schema '%s'. Error=%s" % (
+ allof_class.__name__,
+ allof_class.__name__,
+ self.__class__.__name__,
+ str(ex)
+ )
+ ) from ex
+ return composed_instances
+
+
+def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None):
+ """
+ Find the oneOf schema that matches the input data (e.g. payload).
+ If exactly one schema matches the input data, an instance of that schema
+ is returned.
+ If zero or more than one schema match the input data, an exception is raised.
+ In OAS 3.x, the payload MUST, by validation, match exactly one of the
+ schemas described by oneOf.
+
+ Args:
+ cls: the class we are handling
+ model_kwargs (dict): var_name to var_value
+ The input data, e.g. the payload that must match a oneOf schema
+ in the OpenAPI document.
+ constant_kwargs (dict): var_name to var_value
+ args that every model requires, including configuration, server
+ and path to item.
+
+ Kwargs:
+ model_arg: (int, float, bool, str, date, datetime, ModelSimple, None):
+ the value to assign to a primitive class or ModelSimple class
+ Notes:
+ - this is only passed in when oneOf includes types which are not object
+ - None is used to suppress handling of model_arg, nullable models are handled in __new__
+
+ Returns
+ oneof_instance (instance)
+ """
+ if len(cls._composed_schemas['oneOf']) == 0:
+ return None
+
+ oneof_instances = []
+ # Iterate over each oneOf schema and determine if the input data
+ # matches the oneOf schemas.
+ for oneof_class in cls._composed_schemas['oneOf']:
+ # The composed oneOf schema allows the 'null' type and the input data
+ # is the null value. This is a OAS >= 3.1 feature.
+ if oneof_class is none_type:
+ # skip none_types because we are deserializing dict data.
+ # none_type deserialization is handled in the __new__ method
+ continue
+
+ single_value_input = allows_single_value_input(oneof_class)
+
+ try:
+ if not single_value_input:
+ oneof_instance = oneof_class(**model_kwargs, **constant_kwargs)
+ else:
+ if issubclass(oneof_class, ModelSimple):
+ oneof_instance = oneof_class(model_arg, **constant_kwargs)
+ elif oneof_class in PRIMITIVE_TYPES:
+ oneof_instance = validate_and_convert_types(
+ model_arg,
+ (oneof_class,),
+ constant_kwargs['_path_to_item'],
+ constant_kwargs['_spec_property_naming'],
+ constant_kwargs['_check_type'],
+ configuration=constant_kwargs['_configuration']
+ )
+ oneof_instances.append(oneof_instance)
+ except Exception:
+ pass
+ if len(oneof_instances) == 0:
+ raise ApiValueError(
+ "Invalid inputs given to generate an instance of %s. None "
+ "of the oneOf schemas matched the input data." %
+ cls.__name__
+ )
+ elif len(oneof_instances) > 1:
+ raise ApiValueError(
+ "Invalid inputs given to generate an instance of %s. Multiple "
+ "oneOf schemas matched the inputs, but a max of one is allowed." %
+ cls.__name__
+ )
+ return oneof_instances[0]
+
+
+def get_anyof_instances(self, model_args, constant_args):
+ """
+ Args:
+ self: the class we are handling
+ model_args (dict): var_name to var_value
+ The input data, e.g. the payload that must match at least one
+ anyOf child schema in the OpenAPI document.
+ constant_args (dict): var_name to var_value
+ args that every model requires, including configuration, server
+ and path to item.
+
+ Returns
+ anyof_instances (list)
+ """
+ anyof_instances = []
+ if len(self._composed_schemas['anyOf']) == 0:
+ return anyof_instances
+
+ for anyof_class in self._composed_schemas['anyOf']:
+ # The composed oneOf schema allows the 'null' type and the input data
+ # is the null value. This is a OAS >= 3.1 feature.
+ if anyof_class is none_type:
+ # skip none_types because we are deserializing dict data.
+ # none_type deserialization is handled in the __new__ method
+ continue
+
+ try:
+ anyof_instance = anyof_class(**model_args, **constant_args)
+ anyof_instances.append(anyof_instance)
+ except Exception:
+ pass
+ if len(anyof_instances) == 0:
+ raise ApiValueError(
+ "Invalid inputs given to generate an instance of %s. None of the "
+ "anyOf schemas matched the inputs." %
+ self.__class__.__name__
+ )
+ return anyof_instances
+
+
+def get_discarded_args(self, composed_instances, model_args):
+ """
+ Gathers the args that were discarded by configuration.discard_unknown_keys
+ """
+ model_arg_keys = model_args.keys()
+ discarded_args = set()
+ # arguments passed to self were already converted to python names
+ # before __init__ was called
+ for instance in composed_instances:
+ if instance.__class__ in self._composed_schemas['allOf']:
+ try:
+ keys = instance.to_dict().keys()
+ discarded_keys = model_args - keys
+ discarded_args.update(discarded_keys)
+ except Exception:
+ # allOf integer schema will throw exception
+ pass
+ else:
+ try:
+ all_keys = set(model_to_dict(instance, serialize=False).keys())
+ js_keys = model_to_dict(instance, serialize=True).keys()
+ all_keys.update(js_keys)
+ discarded_keys = model_arg_keys - all_keys
+ discarded_args.update(discarded_keys)
+ except Exception:
+ # allOf integer schema will throw exception
+ pass
+ return discarded_args
+
+
+def validate_get_composed_info(constant_args, model_args, self):
+ """
+ For composed schemas, generate schema instances for
+ all schemas in the oneOf/anyOf/allOf definition. If additional
+ properties are allowed, also assign those properties on
+ all matched schemas that contain additionalProperties.
+ Openapi schemas are python classes.
+
+ Exceptions are raised if:
+ - 0 or > 1 oneOf schema matches the model_args input data
+ - no anyOf schema matches the model_args input data
+ - any of the allOf schemas do not match the model_args input data
+
+ Args:
+ constant_args (dict): these are the args that every model requires
+ model_args (dict): these are the required and optional spec args that
+ were passed in to make this model
+ self (class): the class that we are instantiating
+ This class contains self._composed_schemas
+
+ Returns:
+ composed_info (list): length three
+ composed_instances (list): the composed instances which are not
+ self
+ var_name_to_model_instances (dict): a dict going from var_name
+ to the model_instance which holds that var_name
+ the model_instance may be self or an instance of one of the
+ classes in self.composed_instances()
+ additional_properties_model_instances (list): a list of the
+ model instances which have the property
+ additional_properties_type. This list can include self
+ """
+ # create composed_instances
+ composed_instances = []
+ allof_instances = get_allof_instances(self, model_args, constant_args)
+ composed_instances.extend(allof_instances)
+ oneof_instance = get_oneof_instance(self.__class__, model_args, constant_args)
+ if oneof_instance is not None:
+ composed_instances.append(oneof_instance)
+ anyof_instances = get_anyof_instances(self, model_args, constant_args)
+ composed_instances.extend(anyof_instances)
+ """
+ set additional_properties_model_instances
+ additional properties must be evaluated at the schema level
+ so self's additional properties are most important
+ If self is a composed schema with:
+ - no properties defined in self
+ - additionalProperties: False
+ Then for object payloads every property is an additional property
+ and they are not allowed, so only empty dict is allowed
+
+ Properties must be set on all matching schemas
+ so when a property is assigned toa composed instance, it must be set on all
+ composed instances regardless of additionalProperties presence
+ keeping it to prevent breaking changes in v5.0.1
+ TODO remove cls._additional_properties_model_instances in 6.0.0
+ """
+ additional_properties_model_instances = []
+ if self.additional_properties_type is not None:
+ additional_properties_model_instances = [self]
+
+ """
+ no need to set properties on self in here, they will be set in __init__
+ By here all composed schema oneOf/anyOf/allOf instances have their properties set using
+ model_args
+ """
+ discarded_args = get_discarded_args(self, composed_instances, model_args)
+
+ # map variable names to composed_instances
+ var_name_to_model_instances = {}
+ for prop_name in model_args:
+ if prop_name not in discarded_args:
+ var_name_to_model_instances[prop_name] = [self] + composed_instances
+
+ return [
+ composed_instances,
+ var_name_to_model_instances,
+ additional_properties_model_instances,
+ discarded_args
+ ]
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/models/__init__.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/models/__init__.py
new file mode 100644
index 00000000000..361e2bd9766
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/models/__init__.py
@@ -0,0 +1,74 @@
+# flake8: noqa
+
+# import all models into this package
+# if you have many models here with many references from one model to another this may
+# raise a RecursionError
+# to avoid this, import only the models that you directly need like:
+# from from petstore_api.model.pet import Pet
+# or import this package, but before doing it, use:
+# import sys
+# sys.setrecursionlimit(n)
+
+from petstore_api.model.additional_properties_any_type import AdditionalPropertiesAnyType
+from petstore_api.model.additional_properties_array import AdditionalPropertiesArray
+from petstore_api.model.additional_properties_boolean import AdditionalPropertiesBoolean
+from petstore_api.model.additional_properties_class import AdditionalPropertiesClass
+from petstore_api.model.additional_properties_integer import AdditionalPropertiesInteger
+from petstore_api.model.additional_properties_number import AdditionalPropertiesNumber
+from petstore_api.model.additional_properties_object import AdditionalPropertiesObject
+from petstore_api.model.additional_properties_string import AdditionalPropertiesString
+from petstore_api.model.animal import Animal
+from petstore_api.model.animal_farm import AnimalFarm
+from petstore_api.model.api_response import ApiResponse
+from petstore_api.model.array_of_array_of_number_only import ArrayOfArrayOfNumberOnly
+from petstore_api.model.array_of_number_only import ArrayOfNumberOnly
+from petstore_api.model.array_test import ArrayTest
+from petstore_api.model.capitalization import Capitalization
+from petstore_api.model.cat import Cat
+from petstore_api.model.cat_all_of import CatAllOf
+from petstore_api.model.category import Category
+from petstore_api.model.child import Child
+from petstore_api.model.child_all_of import ChildAllOf
+from petstore_api.model.child_cat import ChildCat
+from petstore_api.model.child_cat_all_of import ChildCatAllOf
+from petstore_api.model.child_dog import ChildDog
+from petstore_api.model.child_dog_all_of import ChildDogAllOf
+from petstore_api.model.child_lizard import ChildLizard
+from petstore_api.model.child_lizard_all_of import ChildLizardAllOf
+from petstore_api.model.class_model import ClassModel
+from petstore_api.model.client import Client
+from petstore_api.model.dog import Dog
+from petstore_api.model.dog_all_of import DogAllOf
+from petstore_api.model.enum_arrays import EnumArrays
+from petstore_api.model.enum_class import EnumClass
+from petstore_api.model.enum_test import EnumTest
+from petstore_api.model.file import File
+from petstore_api.model.file_schema_test_class import FileSchemaTestClass
+from petstore_api.model.format_test import FormatTest
+from petstore_api.model.grandparent import Grandparent
+from petstore_api.model.grandparent_animal import GrandparentAnimal
+from petstore_api.model.has_only_read_only import HasOnlyReadOnly
+from petstore_api.model.list import List
+from petstore_api.model.map_test import MapTest
+from petstore_api.model.mixed_properties_and_additional_properties_class import MixedPropertiesAndAdditionalPropertiesClass
+from petstore_api.model.model200_response import Model200Response
+from petstore_api.model.model_return import ModelReturn
+from petstore_api.model.name import Name
+from petstore_api.model.number_only import NumberOnly
+from petstore_api.model.number_with_validations import NumberWithValidations
+from petstore_api.model.object_model_with_ref_props import ObjectModelWithRefProps
+from petstore_api.model.order import Order
+from petstore_api.model.parent import Parent
+from petstore_api.model.parent_all_of import ParentAllOf
+from petstore_api.model.parent_pet import ParentPet
+from petstore_api.model.pet import Pet
+from petstore_api.model.player import Player
+from petstore_api.model.read_only_first import ReadOnlyFirst
+from petstore_api.model.special_model_name import SpecialModelName
+from petstore_api.model.string_boolean_map import StringBooleanMap
+from petstore_api.model.string_enum import StringEnum
+from petstore_api.model.tag import Tag
+from petstore_api.model.type_holder_default import TypeHolderDefault
+from petstore_api.model.type_holder_example import TypeHolderExample
+from petstore_api.model.user import User
+from petstore_api.model.xml_item import XmlItem
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/rest.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/rest.py
new file mode 100644
index 00000000000..a1d580fbe05
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/petstore_api/rest.py
@@ -0,0 +1,292 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import io
+import json
+import logging
+import re
+import ssl
+from urllib.parse import urlencode
+
+import urllib3
+
+from petstore_api.exceptions import ApiException, UnauthorizedException, ForbiddenException, NotFoundException, ServiceException, ApiValueError
+
+
+logger = logging.getLogger(__name__)
+
+
+class RESTResponse(io.IOBase):
+
+ def __init__(self, resp):
+ self.urllib3_response = resp
+ self.status = resp.status
+ self.reason = resp.reason
+ self.data = resp.data
+
+ def getheaders(self):
+ """Returns a dictionary of the response headers."""
+ return self.urllib3_response.getheaders()
+
+ def getheader(self, name, default=None):
+ """Returns a given response header."""
+ return self.urllib3_response.getheader(name, default)
+
+
+class RESTClientObject(object):
+
+ def __init__(self, configuration, pools_size=4, maxsize=None):
+ # urllib3.PoolManager will pass all kw parameters to connectionpool
+ # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/poolmanager.py#L75 # noqa: E501
+ # https://github.com/shazow/urllib3/blob/f9409436f83aeb79fbaf090181cd81b784f1b8ce/urllib3/connectionpool.py#L680 # noqa: E501
+ # maxsize is the number of requests to host that are allowed in parallel # noqa: E501
+ # Custom SSL certificates and client certificates: http://urllib3.readthedocs.io/en/latest/advanced-usage.html # noqa: E501
+
+ # cert_reqs
+ if configuration.verify_ssl:
+ cert_reqs = ssl.CERT_REQUIRED
+ else:
+ cert_reqs = ssl.CERT_NONE
+
+ addition_pool_args = {}
+ if configuration.assert_hostname is not None:
+ addition_pool_args['assert_hostname'] = configuration.assert_hostname # noqa: E501
+
+ if configuration.retries is not None:
+ addition_pool_args['retries'] = configuration.retries
+
+ if configuration.socket_options is not None:
+ addition_pool_args['socket_options'] = configuration.socket_options
+
+ if maxsize is None:
+ if configuration.connection_pool_maxsize is not None:
+ maxsize = configuration.connection_pool_maxsize
+ else:
+ maxsize = 4
+
+ # https pool manager
+ if configuration.proxy:
+ self.pool_manager = urllib3.ProxyManager(
+ num_pools=pools_size,
+ maxsize=maxsize,
+ cert_reqs=cert_reqs,
+ ca_certs=configuration.ssl_ca_cert,
+ cert_file=configuration.cert_file,
+ key_file=configuration.key_file,
+ proxy_url=configuration.proxy,
+ proxy_headers=configuration.proxy_headers,
+ **addition_pool_args
+ )
+ else:
+ self.pool_manager = urllib3.PoolManager(
+ num_pools=pools_size,
+ maxsize=maxsize,
+ cert_reqs=cert_reqs,
+ ca_certs=configuration.ssl_ca_cert,
+ cert_file=configuration.cert_file,
+ key_file=configuration.key_file,
+ **addition_pool_args
+ )
+
+ def request(self, method, url, query_params=None, headers=None,
+ body=None, post_params=None, _preload_content=True,
+ _request_timeout=None):
+ """Perform requests.
+
+ :param method: http request method
+ :param url: http request url
+ :param query_params: query parameters in the url
+ :param headers: http request headers
+ :param body: request json body, for `application/json`
+ :param post_params: request post parameters,
+ `application/x-www-form-urlencoded`
+ and `multipart/form-data`
+ :param _preload_content: if False, the urllib3.HTTPResponse object will
+ be returned without reading/decoding response
+ data. Default is True.
+ :param _request_timeout: timeout setting for this request. If one
+ number provided, it will be total request
+ timeout. It can also be a pair (tuple) of
+ (connection, read) timeouts.
+ """
+ method = method.upper()
+ assert method in ['GET', 'HEAD', 'DELETE', 'POST', 'PUT',
+ 'PATCH', 'OPTIONS']
+
+ if post_params and body:
+ raise ApiValueError(
+ "body parameter cannot be used with post_params parameter."
+ )
+
+ post_params = post_params or {}
+ headers = headers or {}
+
+ timeout = None
+ if _request_timeout:
+ if isinstance(_request_timeout, (int, float)): # noqa: E501,F821
+ timeout = urllib3.Timeout(total=_request_timeout)
+ elif (isinstance(_request_timeout, tuple) and
+ len(_request_timeout) == 2):
+ timeout = urllib3.Timeout(
+ connect=_request_timeout[0], read=_request_timeout[1])
+
+ if 'Content-Type' not in headers:
+ headers['Content-Type'] = 'application/json'
+
+ try:
+ # For `POST`, `PUT`, `PATCH`, `OPTIONS`, `DELETE`
+ if method in ['POST', 'PUT', 'PATCH', 'OPTIONS', 'DELETE']:
+ if query_params:
+ url += '?' + urlencode(query_params)
+ if re.search('json', headers['Content-Type'], re.IGNORECASE):
+ request_body = None
+ if body is not None:
+ request_body = json.dumps(body)
+ r = self.pool_manager.request(
+ method, url,
+ body=request_body,
+ preload_content=_preload_content,
+ timeout=timeout,
+ headers=headers)
+ elif headers['Content-Type'] == 'application/x-www-form-urlencoded': # noqa: E501
+ r = self.pool_manager.request(
+ method, url,
+ fields=post_params,
+ encode_multipart=False,
+ preload_content=_preload_content,
+ timeout=timeout,
+ headers=headers)
+ elif headers['Content-Type'] == 'multipart/form-data':
+ # must del headers['Content-Type'], or the correct
+ # Content-Type which generated by urllib3 will be
+ # overwritten.
+ del headers['Content-Type']
+ r = self.pool_manager.request(
+ method, url,
+ fields=post_params,
+ encode_multipart=True,
+ preload_content=_preload_content,
+ timeout=timeout,
+ headers=headers)
+ # Pass a `string` parameter directly in the body to support
+ # other content types than Json when `body` argument is
+ # provided in serialized form
+ elif isinstance(body, str) or isinstance(body, bytes):
+ request_body = body
+ r = self.pool_manager.request(
+ method, url,
+ body=request_body,
+ preload_content=_preload_content,
+ timeout=timeout,
+ headers=headers)
+ else:
+ # Cannot generate the request from given parameters
+ msg = """Cannot prepare a request message for provided
+ arguments. Please check that your arguments match
+ declared content type."""
+ raise ApiException(status=0, reason=msg)
+ # For `GET`, `HEAD`
+ else:
+ r = self.pool_manager.request(method, url,
+ fields=query_params,
+ preload_content=_preload_content,
+ timeout=timeout,
+ headers=headers)
+ except urllib3.exceptions.SSLError as e:
+ msg = "{0}\n{1}".format(type(e).__name__, str(e))
+ raise ApiException(status=0, reason=msg)
+
+ if _preload_content:
+ r = RESTResponse(r)
+
+ # log response body
+ logger.debug("response body: %s", r.data)
+
+ if not 200 <= r.status <= 299:
+ if r.status == 401:
+ raise UnauthorizedException(http_resp=r)
+
+ if r.status == 403:
+ raise ForbiddenException(http_resp=r)
+
+ if r.status == 404:
+ raise NotFoundException(http_resp=r)
+
+ if 500 <= r.status <= 599:
+ raise ServiceException(http_resp=r)
+
+ raise ApiException(http_resp=r)
+
+ return r
+
+ def GET(self, url, headers=None, query_params=None, _preload_content=True,
+ _request_timeout=None):
+ return self.request("GET", url,
+ headers=headers,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ query_params=query_params)
+
+ def HEAD(self, url, headers=None, query_params=None, _preload_content=True,
+ _request_timeout=None):
+ return self.request("HEAD", url,
+ headers=headers,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ query_params=query_params)
+
+ def OPTIONS(self, url, headers=None, query_params=None, post_params=None,
+ body=None, _preload_content=True, _request_timeout=None):
+ return self.request("OPTIONS", url,
+ headers=headers,
+ query_params=query_params,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+
+ def DELETE(self, url, headers=None, query_params=None, body=None,
+ _preload_content=True, _request_timeout=None):
+ return self.request("DELETE", url,
+ headers=headers,
+ query_params=query_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+
+ def POST(self, url, headers=None, query_params=None, post_params=None,
+ body=None, _preload_content=True, _request_timeout=None):
+ return self.request("POST", url,
+ headers=headers,
+ query_params=query_params,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+
+ def PUT(self, url, headers=None, query_params=None, post_params=None,
+ body=None, _preload_content=True, _request_timeout=None):
+ return self.request("PUT", url,
+ headers=headers,
+ query_params=query_params,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
+
+ def PATCH(self, url, headers=None, query_params=None, post_params=None,
+ body=None, _preload_content=True, _request_timeout=None):
+ return self.request("PATCH", url,
+ headers=headers,
+ query_params=query_params,
+ post_params=post_params,
+ _preload_content=_preload_content,
+ _request_timeout=_request_timeout,
+ body=body)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/pom.xml b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/pom.xml
new file mode 100644
index 00000000000..1db0285b181
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/pom.xml
@@ -0,0 +1,46 @@
+
+ 4.0.0
+ org.openapitools
+ PythonV2PetstoreClientTestsDisallowAdditionalPropertiesIfNotPresent
+ pom
+ 1.0-SNAPSHOT
+ Python OpenAPI Petstore Client
+
+
+
+ maven-dependency-plugin
+
+
+ package
+
+ copy-dependencies
+
+
+ ${project.build.directory}
+
+
+
+
+
+ org.codehaus.mojo
+ exec-maven-plugin
+ 1.2.1
+
+
+ test
+ integration-test
+
+ exec
+
+
+ make
+
+ test
+
+
+
+
+
+
+
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/requirements.txt b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/requirements.txt
new file mode 100644
index 00000000000..96947f60408
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/requirements.txt
@@ -0,0 +1,3 @@
+python_dateutil >= 2.5.3
+setuptools >= 21.0.0
+urllib3 >= 1.25.3
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/setup.cfg b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/setup.cfg
new file mode 100644
index 00000000000..11433ee875a
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/setup.cfg
@@ -0,0 +1,2 @@
+[flake8]
+max-line-length=99
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/setup.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/setup.py
new file mode 100644
index 00000000000..c484eec94f3
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/setup.py
@@ -0,0 +1,43 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from setuptools import setup, find_packages # noqa: H301
+
+NAME = "petstore-api"
+VERSION = "1.0.0"
+# To install the library, run the following
+#
+# python setup.py install
+#
+# prerequisite: setuptools
+# http://pypi.python.org/pypi/setuptools
+
+REQUIRES = [
+ "urllib3 >= 1.25.3",
+ "python-dateutil",
+]
+
+setup(
+ name=NAME,
+ version=VERSION,
+ description="OpenAPI Petstore",
+ author="OpenAPI Generator community",
+ author_email="team@openapitools.org",
+ url="",
+ keywords=["OpenAPI", "OpenAPI-Generator", "OpenAPI Petstore"],
+ python_requires=">=3.6",
+ install_requires=REQUIRES,
+ packages=find_packages(exclude=["test", "tests"]),
+ include_package_data=True,
+ license="Apache-2.0",
+ long_description="""\
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+ """
+)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test-requirements.txt b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test-requirements.txt
new file mode 100644
index 00000000000..bb4f22bb7a6
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test-requirements.txt
@@ -0,0 +1 @@
+pytest-cov>=2.8.1
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/__init__.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/__init__.py
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_additional_properties_any_type.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_additional_properties_any_type.py
new file mode 100644
index 00000000000..ce985f76ed9
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_additional_properties_any_type.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.additional_properties_any_type import AdditionalPropertiesAnyType
+
+
+class TestAdditionalPropertiesAnyType(unittest.TestCase):
+ """AdditionalPropertiesAnyType unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testAdditionalPropertiesAnyType(self):
+ """Test AdditionalPropertiesAnyType"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = AdditionalPropertiesAnyType() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_additional_properties_array.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_additional_properties_array.py
new file mode 100644
index 00000000000..f63ca82f6c2
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_additional_properties_array.py
@@ -0,0 +1,50 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.additional_properties_array import AdditionalPropertiesArray
+
+
+class TestAdditionalPropertiesArray(unittest.TestCase):
+ """AdditionalPropertiesArray unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testAdditionalPropertiesArray(self):
+ """Test AdditionalPropertiesArray"""
+ # can make model without additional properties
+ model = AdditionalPropertiesArray()
+
+ # can make one with additional properties
+ import datetime
+ some_val = []
+ model = AdditionalPropertiesArray(some_key=some_val)
+ assert model['some_key'] == some_val
+ some_val = [True, datetime.date(1970,1,1), datetime.datetime(1970,1,1), {}, 3.1, 1, [], 'hello']
+ model = AdditionalPropertiesArray(some_key=some_val)
+ assert model['some_key'] == some_val
+
+ # type checking works on additional properties
+ with self.assertRaises(petstore_api.ApiTypeError) as exc:
+ model = AdditionalPropertiesArray(some_key='some string')
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_additional_properties_boolean.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_additional_properties_boolean.py
new file mode 100644
index 00000000000..e5a13891c09
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_additional_properties_boolean.py
@@ -0,0 +1,45 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.additional_properties_boolean import AdditionalPropertiesBoolean
+
+
+class TestAdditionalPropertiesBoolean(unittest.TestCase):
+ """AdditionalPropertiesBoolean unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testAdditionalPropertiesBoolean(self):
+ """Test AdditionalPropertiesBoolean"""
+ # can make model without additional properties
+ model = AdditionalPropertiesBoolean()
+
+ # can make one with additional properties
+ model = AdditionalPropertiesBoolean(some_key=True)
+ assert model['some_key'] == True
+
+ # type checking works on additional properties
+ with self.assertRaises(petstore_api.ApiTypeError) as exc:
+ model = AdditionalPropertiesBoolean(some_key='True')
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_additional_properties_class.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_additional_properties_class.py
new file mode 100644
index 00000000000..befc14455da
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_additional_properties_class.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.additional_properties_class import AdditionalPropertiesClass
+
+
+class TestAdditionalPropertiesClass(unittest.TestCase):
+ """AdditionalPropertiesClass unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testAdditionalPropertiesClass(self):
+ """Test AdditionalPropertiesClass"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = AdditionalPropertiesClass() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_additional_properties_integer.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_additional_properties_integer.py
new file mode 100644
index 00000000000..0e08b8f8770
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_additional_properties_integer.py
@@ -0,0 +1,45 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.additional_properties_integer import AdditionalPropertiesInteger
+
+
+class TestAdditionalPropertiesInteger(unittest.TestCase):
+ """AdditionalPropertiesInteger unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testAdditionalPropertiesInteger(self):
+ """Test AdditionalPropertiesInteger"""
+ # can make model without additional properties
+ model = AdditionalPropertiesInteger()
+
+ # can make one with additional properties
+ model = AdditionalPropertiesInteger(some_key=3)
+ assert model['some_key'] == 3
+
+ # type checking works on additional properties
+ with self.assertRaises(petstore_api.ApiTypeError) as exc:
+ model = AdditionalPropertiesInteger(some_key=11.3)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_additional_properties_number.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_additional_properties_number.py
new file mode 100644
index 00000000000..90f4429e989
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_additional_properties_number.py
@@ -0,0 +1,45 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.additional_properties_number import AdditionalPropertiesNumber
+
+
+class TestAdditionalPropertiesNumber(unittest.TestCase):
+ """AdditionalPropertiesNumber unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testAdditionalPropertiesNumber(self):
+ """Test AdditionalPropertiesNumber"""
+ # can make model without additional properties
+ model = AdditionalPropertiesNumber()
+
+ # can make one with additional properties
+ model = AdditionalPropertiesNumber(some_key=11.3)
+ assert model['some_key'] == 11.3
+
+ # type checking works on additional properties
+ with self.assertRaises(petstore_api.ApiTypeError) as exc:
+ model = AdditionalPropertiesNumber(some_key=10)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_additional_properties_object.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_additional_properties_object.py
new file mode 100644
index 00000000000..ded4a8e8a12
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_additional_properties_object.py
@@ -0,0 +1,50 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.additional_properties_object import AdditionalPropertiesObject
+
+
+class TestAdditionalPropertiesObject(unittest.TestCase):
+ """AdditionalPropertiesObject unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testAdditionalPropertiesObject(self):
+ """Test AdditionalPropertiesObject"""
+ # can make model without additional properties
+ model = AdditionalPropertiesObject()
+
+ # can make one with additional properties
+ some_val = {}
+ model = AdditionalPropertiesObject(some_key=some_val)
+ assert model['some_key'] == some_val
+ import datetime
+ some_val = {'a': True, 'b': datetime.date(1970,1,1), 'c': datetime.datetime(1970,1,1), 'd': {}, 'e': 3.1, 'f': 1, 'g': [], 'h': 'hello'}
+ model = AdditionalPropertiesObject(some_key=some_val)
+ assert model['some_key'] == some_val
+
+ # type checking works on additional properties
+ with self.assertRaises(petstore_api.ApiTypeError) as exc:
+ model = AdditionalPropertiesObject(some_key='some string')
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_additional_properties_string.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_additional_properties_string.py
new file mode 100644
index 00000000000..cff2c31921f
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_additional_properties_string.py
@@ -0,0 +1,45 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.additional_properties_string import AdditionalPropertiesString
+
+
+class TestAdditionalPropertiesString(unittest.TestCase):
+ """AdditionalPropertiesString unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testAdditionalPropertiesString(self):
+ """Test AdditionalPropertiesString"""
+ # can make model without additional properties
+ model = AdditionalPropertiesString()
+
+ # can make one with additional properties
+ model = AdditionalPropertiesString(some_key='some_val')
+ assert model['some_key'] == 'some_val'
+
+ # type checking works on additional properties
+ with self.assertRaises(petstore_api.ApiTypeError) as exc:
+ model = AdditionalPropertiesString(some_key=True)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_animal.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_animal.py
new file mode 100644
index 00000000000..958f303f13e
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_animal.py
@@ -0,0 +1,48 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+try:
+ from petstore_api.model import cat
+except ImportError:
+ cat = sys.modules[
+ 'petstore_api.model.cat']
+try:
+ from petstore_api.model import dog
+except ImportError:
+ dog = sys.modules[
+ 'petstore_api.model.dog']
+from petstore_api.model.animal import Animal
+
+
+class TestAnimal(unittest.TestCase):
+ """Animal unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testAnimal(self):
+ """Test Animal"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = Animal() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_animal_farm.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_animal_farm.py
new file mode 100644
index 00000000000..7117d42b430
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_animal_farm.py
@@ -0,0 +1,43 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+try:
+ from petstore_api.model import animal
+except ImportError:
+ animal = sys.modules[
+ 'petstore_api.model.animal']
+from petstore_api.model.animal_farm import AnimalFarm
+
+
+class TestAnimalFarm(unittest.TestCase):
+ """AnimalFarm unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testAnimalFarm(self):
+ """Test AnimalFarm"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = AnimalFarm() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_another_fake_api.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_another_fake_api.py
new file mode 100644
index 00000000000..f79966a2696
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_another_fake_api.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.api.another_fake_api import AnotherFakeApi # noqa: E501
+
+
+class TestAnotherFakeApi(unittest.TestCase):
+ """AnotherFakeApi unit test stubs"""
+
+ def setUp(self):
+ self.api = AnotherFakeApi() # noqa: E501
+
+ def tearDown(self):
+ pass
+
+ def test_call_123_test_special_tags(self):
+ """Test case for call_123_test_special_tags
+
+ To test special tags # noqa: E501
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_api_response.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_api_response.py
new file mode 100644
index 00000000000..9db92633f62
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_api_response.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.api_response import ApiResponse
+
+
+class TestApiResponse(unittest.TestCase):
+ """ApiResponse unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testApiResponse(self):
+ """Test ApiResponse"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = ApiResponse() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_array_of_array_of_number_only.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_array_of_array_of_number_only.py
new file mode 100644
index 00000000000..4980ad17afb
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_array_of_array_of_number_only.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.array_of_array_of_number_only import ArrayOfArrayOfNumberOnly
+
+
+class TestArrayOfArrayOfNumberOnly(unittest.TestCase):
+ """ArrayOfArrayOfNumberOnly unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testArrayOfArrayOfNumberOnly(self):
+ """Test ArrayOfArrayOfNumberOnly"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = ArrayOfArrayOfNumberOnly() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_array_of_number_only.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_array_of_number_only.py
new file mode 100644
index 00000000000..479c537cada
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_array_of_number_only.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.array_of_number_only import ArrayOfNumberOnly
+
+
+class TestArrayOfNumberOnly(unittest.TestCase):
+ """ArrayOfNumberOnly unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testArrayOfNumberOnly(self):
+ """Test ArrayOfNumberOnly"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = ArrayOfNumberOnly() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_array_test.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_array_test.py
new file mode 100644
index 00000000000..2426b27b7e4
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_array_test.py
@@ -0,0 +1,43 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+try:
+ from petstore_api.model import read_only_first
+except ImportError:
+ read_only_first = sys.modules[
+ 'petstore_api.model.read_only_first']
+from petstore_api.model.array_test import ArrayTest
+
+
+class TestArrayTest(unittest.TestCase):
+ """ArrayTest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testArrayTest(self):
+ """Test ArrayTest"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = ArrayTest() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_capitalization.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_capitalization.py
new file mode 100644
index 00000000000..20d2649c01e
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_capitalization.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.capitalization import Capitalization
+
+
+class TestCapitalization(unittest.TestCase):
+ """Capitalization unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testCapitalization(self):
+ """Test Capitalization"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = Capitalization() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_cat.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_cat.py
new file mode 100644
index 00000000000..64b525aaf11
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_cat.py
@@ -0,0 +1,48 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+try:
+ from petstore_api.model import animal
+except ImportError:
+ animal = sys.modules[
+ 'petstore_api.model.animal']
+try:
+ from petstore_api.model import cat_all_of
+except ImportError:
+ cat_all_of = sys.modules[
+ 'petstore_api.model.cat_all_of']
+from petstore_api.model.cat import Cat
+
+
+class TestCat(unittest.TestCase):
+ """Cat unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testCat(self):
+ """Test Cat"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = Cat() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_cat_all_of.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_cat_all_of.py
new file mode 100644
index 00000000000..a5bb91ac864
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_cat_all_of.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.cat_all_of import CatAllOf
+
+
+class TestCatAllOf(unittest.TestCase):
+ """CatAllOf unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testCatAllOf(self):
+ """Test CatAllOf"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = CatAllOf() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_category.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_category.py
new file mode 100644
index 00000000000..59b64e5924a
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_category.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.category import Category
+
+
+class TestCategory(unittest.TestCase):
+ """Category unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testCategory(self):
+ """Test Category"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = Category() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_child.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_child.py
new file mode 100644
index 00000000000..790fc1abc8d
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_child.py
@@ -0,0 +1,57 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+try:
+ from petstore_api.model import child_all_of
+except ImportError:
+ child_all_of = sys.modules[
+ 'petstore_api.model.child_all_of']
+try:
+ from petstore_api.model import parent
+except ImportError:
+ parent = sys.modules[
+ 'petstore_api.model.parent']
+from petstore_api.model.child import Child
+
+
+class TestChild(unittest.TestCase):
+ """Child unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testChild(self):
+ """Test Child
+ This will fail because additional_properties_type is None in ChildAllOf and it must be defined as any type
+ to allow in the property radio_waves which is not defined in ChildAllOf, it is defined in Grandparent
+ """
+ # make an instance of Child, a composed schema model
+ radio_waves = True
+ tele_vision = True
+ inter_net = True
+ with self.assertRaises(petstore_api.exceptions.ApiValueError):
+ child = Child(
+ radio_waves=radio_waves,
+ tele_vision=tele_vision,
+ inter_net=inter_net
+ )
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_child_all_of.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_child_all_of.py
new file mode 100644
index 00000000000..96e479cf079
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_child_all_of.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.child_all_of import ChildAllOf
+
+
+class TestChildAllOf(unittest.TestCase):
+ """ChildAllOf unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testChildAllOf(self):
+ """Test ChildAllOf"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = ChildAllOf() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_child_cat.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_child_cat.py
new file mode 100644
index 00000000000..34c085515a8
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_child_cat.py
@@ -0,0 +1,48 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+try:
+ from petstore_api.model import child_cat_all_of
+except ImportError:
+ child_cat_all_of = sys.modules[
+ 'petstore_api.model.child_cat_all_of']
+try:
+ from petstore_api.model import parent_pet
+except ImportError:
+ parent_pet = sys.modules[
+ 'petstore_api.model.parent_pet']
+from petstore_api.model.child_cat import ChildCat
+
+
+class TestChildCat(unittest.TestCase):
+ """ChildCat unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testChildCat(self):
+ """Test ChildCat"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = ChildCat() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_child_cat_all_of.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_child_cat_all_of.py
new file mode 100644
index 00000000000..2a7aab100fb
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_child_cat_all_of.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.child_cat_all_of import ChildCatAllOf
+
+
+class TestChildCatAllOf(unittest.TestCase):
+ """ChildCatAllOf unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testChildCatAllOf(self):
+ """Test ChildCatAllOf"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = ChildCatAllOf() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_child_dog.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_child_dog.py
new file mode 100644
index 00000000000..dfb09213e40
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_child_dog.py
@@ -0,0 +1,48 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+try:
+ from petstore_api.model import child_dog_all_of
+except ImportError:
+ child_dog_all_of = sys.modules[
+ 'petstore_api.model.child_dog_all_of']
+try:
+ from petstore_api.model import parent_pet
+except ImportError:
+ parent_pet = sys.modules[
+ 'petstore_api.model.parent_pet']
+from petstore_api.model.child_dog import ChildDog
+
+
+class TestChildDog(unittest.TestCase):
+ """ChildDog unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testChildDog(self):
+ """Test ChildDog"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = ChildDog() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_child_dog_all_of.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_child_dog_all_of.py
new file mode 100644
index 00000000000..ca75000c650
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_child_dog_all_of.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.child_dog_all_of import ChildDogAllOf
+
+
+class TestChildDogAllOf(unittest.TestCase):
+ """ChildDogAllOf unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testChildDogAllOf(self):
+ """Test ChildDogAllOf"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = ChildDogAllOf() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_child_lizard.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_child_lizard.py
new file mode 100644
index 00000000000..975dc1612a9
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_child_lizard.py
@@ -0,0 +1,48 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+try:
+ from petstore_api.model import child_lizard_all_of
+except ImportError:
+ child_lizard_all_of = sys.modules[
+ 'petstore_api.model.child_lizard_all_of']
+try:
+ from petstore_api.model import parent_pet
+except ImportError:
+ parent_pet = sys.modules[
+ 'petstore_api.model.parent_pet']
+from petstore_api.model.child_lizard import ChildLizard
+
+
+class TestChildLizard(unittest.TestCase):
+ """ChildLizard unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testChildLizard(self):
+ """Test ChildLizard"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = ChildLizard() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_child_lizard_all_of.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_child_lizard_all_of.py
new file mode 100644
index 00000000000..1b3bf4dba94
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_child_lizard_all_of.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.child_lizard_all_of import ChildLizardAllOf
+
+
+class TestChildLizardAllOf(unittest.TestCase):
+ """ChildLizardAllOf unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testChildLizardAllOf(self):
+ """Test ChildLizardAllOf"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = ChildLizardAllOf() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_class_model.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_class_model.py
new file mode 100644
index 00000000000..060df39e4b5
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_class_model.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.class_model import ClassModel
+
+
+class TestClassModel(unittest.TestCase):
+ """ClassModel unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testClassModel(self):
+ """Test ClassModel"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = ClassModel() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_client.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_client.py
new file mode 100644
index 00000000000..ab5e3a80d37
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_client.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.client import Client
+
+
+class TestClient(unittest.TestCase):
+ """Client unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testClient(self):
+ """Test Client"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = Client() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_dog.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_dog.py
new file mode 100644
index 00000000000..9fb96ebc6b9
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_dog.py
@@ -0,0 +1,57 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+try:
+ from petstore_api.model import animal
+except ImportError:
+ animal = sys.modules[
+ 'petstore_api.model.animal']
+try:
+ from petstore_api.model import dog_all_of
+except ImportError:
+ dog_all_of = sys.modules[
+ 'petstore_api.model.dog_all_of']
+from petstore_api.model.dog import Dog
+
+
+class TestDog(unittest.TestCase):
+ """Dog unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testDog(self):
+ """Test Dog
+ This will fail because additional_properties_type is None in Animal and it must be defined as any type
+ to allow in the property breed which is not defined in Animal, it is defined in Dog
+ """
+ # make an instance of dog, a composed schema model
+ class_name = 'Dog'
+ color = 'white'
+ breed = 'Jack Russel Terrier'
+ with self.assertRaises(petstore_api.exceptions.ApiValueError):
+ dog = Dog(
+ class_name=class_name,
+ color=color,
+ breed=breed
+ )
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_dog_all_of.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_dog_all_of.py
new file mode 100644
index 00000000000..7ab4e8ae79d
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_dog_all_of.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.dog_all_of import DogAllOf
+
+
+class TestDogAllOf(unittest.TestCase):
+ """DogAllOf unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testDogAllOf(self):
+ """Test DogAllOf"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = DogAllOf() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_enum_arrays.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_enum_arrays.py
new file mode 100644
index 00000000000..64ad5fd7dc0
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_enum_arrays.py
@@ -0,0 +1,162 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.enum_arrays import EnumArrays
+
+
+class TestEnumArrays(unittest.TestCase):
+ """EnumArrays unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def test_enumarrays_init(self):
+ #
+ # Check various combinations of valid values.
+ #
+ fish_or_crab = EnumArrays(just_symbol=">=")
+ self.assertEqual(fish_or_crab.just_symbol, ">=")
+ # if optional property is unset we raise an exception
+ with self.assertRaises(petstore_api.ApiAttributeError) as exc:
+ self.assertEqual(fish_or_crab.array_enum, None)
+
+ fish_or_crab = EnumArrays(just_symbol="$", array_enum=["fish"])
+ self.assertEqual(fish_or_crab.just_symbol, "$")
+ self.assertEqual(fish_or_crab.array_enum, ["fish"])
+
+ fish_or_crab = EnumArrays(just_symbol=">=", array_enum=["fish"])
+ self.assertEqual(fish_or_crab.just_symbol, ">=")
+ self.assertEqual(fish_or_crab.array_enum, ["fish"])
+
+ fish_or_crab = EnumArrays(just_symbol="$", array_enum=["crab"])
+ self.assertEqual(fish_or_crab.just_symbol, "$")
+ self.assertEqual(fish_or_crab.array_enum, ["crab"])
+
+
+ #
+ # Check if setting invalid values fails
+ #
+ with self.assertRaises(petstore_api.ApiValueError) as exc:
+ fish_or_crab = EnumArrays(just_symbol="<=")
+
+ with self.assertRaises(petstore_api.ApiValueError) as exc:
+ fish_or_crab = EnumArrays(just_symbol="$", array_enum=["dog"])
+
+ with self.assertRaises(petstore_api.ApiTypeError) as exc:
+ fish_or_crab = EnumArrays(just_symbol=["$"], array_enum=["crab"])
+
+
+ def test_enumarrays_setter(self):
+
+ #
+ # Check various combinations of valid values
+ #
+ fish_or_crab = EnumArrays()
+
+ fish_or_crab.just_symbol = ">="
+ self.assertEqual(fish_or_crab.just_symbol, ">=")
+
+ fish_or_crab.just_symbol = "$"
+ self.assertEqual(fish_or_crab.just_symbol, "$")
+
+ fish_or_crab.array_enum = []
+ self.assertEqual(fish_or_crab.array_enum, [])
+
+ fish_or_crab.array_enum = ["fish"]
+ self.assertEqual(fish_or_crab.array_enum, ["fish"])
+
+ fish_or_crab.array_enum = ["fish", "fish", "fish"]
+ self.assertEqual(fish_or_crab.array_enum, ["fish", "fish", "fish"])
+
+ fish_or_crab.array_enum = ["crab"]
+ self.assertEqual(fish_or_crab.array_enum, ["crab"])
+
+ fish_or_crab.array_enum = ["crab", "fish"]
+ self.assertEqual(fish_or_crab.array_enum, ["crab", "fish"])
+
+ fish_or_crab.array_enum = ["crab", "fish", "crab", "fish"]
+ self.assertEqual(fish_or_crab.array_enum, ["crab", "fish", "crab", "fish"])
+
+ #
+ # Check if setting invalid values fails
+ #
+ fish_or_crab = EnumArrays()
+ with self.assertRaises(petstore_api.ApiValueError) as exc:
+ fish_or_crab.just_symbol = "!="
+
+ with self.assertRaises(petstore_api.ApiTypeError) as exc:
+ fish_or_crab.just_symbol = ["fish"]
+
+ with self.assertRaises(petstore_api.ApiValueError) as exc:
+ fish_or_crab.array_enum = ["cat"]
+
+ with self.assertRaises(petstore_api.ApiValueError) as exc:
+ fish_or_crab.array_enum = ["fish", "crab", "dog"]
+
+ with self.assertRaises(petstore_api.ApiTypeError) as exc:
+ fish_or_crab.array_enum = "fish"
+
+
+ def test_todict(self):
+ #
+ # Check if dictionary serialization works
+ #
+ dollar_fish_crab_dict = {
+ 'just_symbol': "$",
+ 'array_enum': ["fish", "crab"]
+ }
+
+ dollar_fish_crab = EnumArrays(
+ just_symbol="$", array_enum=["fish", "crab"])
+
+ self.assertEqual(dollar_fish_crab_dict, dollar_fish_crab.to_dict())
+
+ #
+ # Sanity check for different arrays
+ #
+ dollar_crab_fish_dict = {
+ 'just_symbol': "$",
+ 'array_enum': ["crab", "fish"]
+ }
+
+ dollar_fish_crab = EnumArrays(
+ just_symbol="$", array_enum=["fish", "crab"])
+
+ self.assertNotEqual(dollar_crab_fish_dict, dollar_fish_crab.to_dict())
+
+
+ def test_equals(self):
+ #
+ # Check if object comparison works
+ #
+ fish1 = EnumArrays(just_symbol="$", array_enum=["fish"])
+ fish2 = EnumArrays(just_symbol="$", array_enum=["fish"])
+ self.assertEqual(fish1, fish2)
+
+ fish = EnumArrays(just_symbol="$", array_enum=["fish"])
+ crab = EnumArrays(just_symbol="$", array_enum=["crab"])
+ self.assertNotEqual(fish, crab)
+
+ dollar = EnumArrays(just_symbol="$")
+ greater = EnumArrays(just_symbol=">=")
+ self.assertNotEqual(dollar, greater)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_enum_class.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_enum_class.py
new file mode 100644
index 00000000000..f910231c9d0
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_enum_class.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.enum_class import EnumClass
+
+
+class TestEnumClass(unittest.TestCase):
+ """EnumClass unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testEnumClass(self):
+ """Test EnumClass"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = EnumClass() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_enum_test.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_enum_test.py
new file mode 100644
index 00000000000..7b4c1b6b66a
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_enum_test.py
@@ -0,0 +1,43 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+try:
+ from petstore_api.model import string_enum
+except ImportError:
+ string_enum = sys.modules[
+ 'petstore_api.model.string_enum']
+from petstore_api.model.enum_test import EnumTest
+
+
+class TestEnumTest(unittest.TestCase):
+ """EnumTest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testEnumTest(self):
+ """Test EnumTest"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = EnumTest() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_fake_api.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_fake_api.py
new file mode 100644
index 00000000000..34d207f3c71
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_fake_api.py
@@ -0,0 +1,197 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.api.fake_api import FakeApi # noqa: E501
+
+
+class TestFakeApi(unittest.TestCase):
+ """FakeApi unit test stubs"""
+
+ def setUp(self):
+ self.api = FakeApi() # noqa: E501
+
+ def tearDown(self):
+ pass
+
+ def test_create_xml_item(self):
+ """Test case for create_xml_item
+
+ creates an XmlItem # noqa: E501
+ """
+ pass
+
+ def test_boolean(self):
+ """Test case for boolean
+
+ """
+ endpoint = self.api.boolean
+ assert endpoint.openapi_types['body'] == (bool,)
+ assert endpoint.settings['response_type'] == (bool,)
+
+ def test_string(self):
+ """Test case for string
+
+ """
+ endpoint = self.api.string
+ assert endpoint.openapi_types['body'] == (str,)
+ assert endpoint.settings['response_type'] == (str,)
+
+ def test_object_model_with_ref_props(self):
+ """Test case for object_model_with_ref_props
+
+ """
+ from petstore_api.model import object_model_with_ref_props
+ endpoint = self.api.object_model_with_ref_props
+ assert endpoint.openapi_types['body'] == (object_model_with_ref_props.ObjectModelWithRefProps,)
+ assert endpoint.settings['response_type'] == (object_model_with_ref_props.ObjectModelWithRefProps,)
+
+ def test_string_enum(self):
+ """Test case for string_enum
+
+ """
+ from petstore_api.model import string_enum
+ endpoint = self.api.string_enum
+ assert endpoint.openapi_types['body'] == (string_enum.StringEnum,)
+ assert endpoint.settings['response_type'] == (string_enum.StringEnum,)
+
+ def test_array_model(self):
+ """Test case for array_model
+
+ """
+ from petstore_api.model import animal_farm
+ endpoint = self.api.array_model
+ assert endpoint.openapi_types['body'] == (animal_farm.AnimalFarm,)
+ assert endpoint.settings['response_type'] == (animal_farm.AnimalFarm,)
+
+ def test_number_with_validations(self):
+ """Test case for number_with_validations
+
+ """
+ from petstore_api.model import number_with_validations
+ endpoint = self.api.number_with_validations
+ assert endpoint.openapi_types['body'] == (number_with_validations.NumberWithValidations,)
+ assert endpoint.settings['response_type'] == (number_with_validations.NumberWithValidations,)
+
+ def test_test_body_with_file_schema(self):
+ """Test case for test_body_with_file_schema
+
+ """
+ pass
+
+ def test_test_body_with_query_params(self):
+ """Test case for test_body_with_query_params
+
+ """
+ pass
+
+ def test_test_client_model(self):
+ """Test case for test_client_model
+
+ To test \"client\" model # noqa: E501
+ """
+ pass
+
+ def test_test_endpoint_enums_length_one(self):
+ """Test case for test_endpoint_enums_length_one
+
+ """
+ # when we omit the required enums of length one, they are still set
+ endpoint = self.api.test_endpoint_enums_length_one
+ import six
+ if six.PY3:
+ from unittest.mock import patch
+ else:
+ from mock import patch
+ with patch.object(endpoint, 'call_with_http_info') as call_with_http_info:
+ endpoint()
+ call_with_http_info.assert_called_with(
+ _check_input_type=True,
+ _check_return_type=True,
+ _host_index=None,
+ _preload_content=True,
+ _request_timeout=None,
+ _return_http_data_only=True,
+ async_req=False,
+ header_number=1.234,
+ path_integer=34,
+ path_string='hello',
+ query_integer=3,
+ query_string='brillig'
+ )
+
+ def test_test_endpoint_parameters(self):
+ """Test case for test_endpoint_parameters
+
+ Fake endpoint for testing various parameters 假端點 偽のエンドポイント 가짜 엔드 포인트 # noqa: E501
+ """
+ # check that we can access the endpoint's validations
+ endpoint = self.api.test_endpoint_parameters
+ assert endpoint.validations[('number',)] == {
+ 'inclusive_maximum': 543.2,
+ 'inclusive_minimum': 32.1,
+ }
+ # make sure that an exception is thrown on an invalid value
+ keyword_args = dict(
+ number=544, # invalid
+ double=100,
+ pattern_without_delimiter="abc",
+ byte='sample string'
+ )
+ with self.assertRaises(petstore_api.ApiValueError):
+ self.api.test_endpoint_parameters(**keyword_args)
+
+ def test_test_enum_parameters(self):
+ """Test case for test_enum_parameters
+
+ To test enum parameters # noqa: E501
+ """
+ # check that we can access the endpoint's allowed_values
+ endpoint = self.api.test_enum_parameters
+ assert endpoint.allowed_values[('enum_query_string',)] == {
+ "_ABC": "_abc",
+ "-EFG": "-efg",
+ "(XYZ)": "(xyz)"
+ }
+ # make sure that an exception is thrown on an invalid value
+ keyword_args = dict(enum_query_string="bad value")
+ with self.assertRaises(petstore_api.ApiValueError):
+ self.api.test_enum_parameters(**keyword_args)
+
+ def test_test_group_parameters(self):
+ """Test case for test_group_parameters
+
+ Fake endpoint to test group parameters (optional) # noqa: E501
+ """
+ pass
+
+ def test_test_inline_additional_properties(self):
+ """Test case for test_inline_additional_properties
+
+ test inline additionalProperties # noqa: E501
+ """
+ pass
+
+ def test_test_json_form_data(self):
+ """Test case for test_json_form_data
+
+ test json serialization of form data # noqa: E501
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_fake_classname_tags_123_api.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_fake_classname_tags_123_api.py
new file mode 100644
index 00000000000..1ade31405a6
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_fake_classname_tags_123_api.py
@@ -0,0 +1,39 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.api.fake_classname_tags_123_api import FakeClassnameTags123Api # noqa: E501
+
+
+class TestFakeClassnameTags123Api(unittest.TestCase):
+ """FakeClassnameTags123Api unit test stubs"""
+
+ def setUp(self):
+ self.api = FakeClassnameTags123Api() # noqa: E501
+
+ def tearDown(self):
+ pass
+
+ def test_test_classname(self):
+ """Test case for test_classname
+
+ To test class name in snake case # noqa: E501
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_file.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_file.py
new file mode 100644
index 00000000000..8d60f64e01c
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_file.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.file import File
+
+
+class TestFile(unittest.TestCase):
+ """File unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testFile(self):
+ """Test File"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = File() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_file_schema_test_class.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_file_schema_test_class.py
new file mode 100644
index 00000000000..9a4f6d38dfe
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_file_schema_test_class.py
@@ -0,0 +1,43 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+try:
+ from petstore_api.model import file
+except ImportError:
+ file = sys.modules[
+ 'petstore_api.model.file']
+from petstore_api.model.file_schema_test_class import FileSchemaTestClass
+
+
+class TestFileSchemaTestClass(unittest.TestCase):
+ """FileSchemaTestClass unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testFileSchemaTestClass(self):
+ """Test FileSchemaTestClass"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = FileSchemaTestClass() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_format_test.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_format_test.py
new file mode 100644
index 00000000000..ca37b005fd9
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_format_test.py
@@ -0,0 +1,153 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.format_test import FormatTest
+
+
+class TestFormatTest(unittest.TestCase):
+ """FormatTest unit test stubs"""
+
+ def setUp(self):
+ import datetime
+ self.required_named_args = dict(
+ number=40.1,
+ byte='what',
+ date=datetime.date(2019, 3, 23),
+ password='rainbowtable'
+ )
+
+ def test_integer(self):
+ var_name = 'integer'
+ validations = FormatTest.validations[(var_name,)]
+ keyword_args = {}
+ keyword_args.update(self.required_named_args)
+ key_adder_pairs = [('inclusive_maximum', 1), ('inclusive_minimum', -1)]
+ for key, adder in key_adder_pairs:
+ # value outside the bounds throws an error
+ with self.assertRaises(petstore_api.ApiValueError):
+ keyword_args[var_name] = validations[key] + adder
+ FormatTest(**keyword_args)
+
+ # value inside the bounds works
+ keyword_args[var_name] = validations[key]
+ assert (getattr(FormatTest(**keyword_args), var_name) ==
+ validations[key])
+
+ def test_int32(self):
+ var_name = 'int32'
+ validations = FormatTest.validations[(var_name,)]
+ keyword_args = {}
+ keyword_args.update(self.required_named_args)
+ key_adder_pairs = [('inclusive_maximum', 1), ('inclusive_minimum', -1)]
+ for key, adder in key_adder_pairs:
+ # value outside the bounds throws an error
+ with self.assertRaises(petstore_api.ApiValueError):
+ keyword_args[var_name] = validations[key] + adder
+ FormatTest(**keyword_args)
+
+ # value inside the bounds works
+ keyword_args[var_name] = validations[key]
+ assert (getattr(FormatTest(**keyword_args), var_name) ==
+ validations[key])
+
+ def test_number(self):
+ var_name = 'number'
+ validations = FormatTest.validations[(var_name,)]
+ keyword_args = {}
+ keyword_args.update(self.required_named_args)
+ key_adder_pairs = [('inclusive_maximum', 1), ('inclusive_minimum', -1)]
+ for key, adder in key_adder_pairs:
+ # value outside the bounds throws an error
+ with self.assertRaises(petstore_api.ApiValueError):
+ keyword_args[var_name] = validations[key] + adder
+ FormatTest(**keyword_args)
+
+ # value inside the bounds works
+ keyword_args[var_name] = validations[key]
+ assert (getattr(FormatTest(**keyword_args), var_name) ==
+ validations[key])
+
+ def test_float(self):
+ var_name = 'float'
+ validations = FormatTest.validations[(var_name,)]
+ keyword_args = {}
+ keyword_args.update(self.required_named_args)
+ key_adder_pairs = [('inclusive_maximum', 1), ('inclusive_minimum', -1)]
+ for key, adder in key_adder_pairs:
+ # value outside the bounds throws an error
+ with self.assertRaises(petstore_api.ApiValueError):
+ keyword_args[var_name] = validations[key] + adder
+ FormatTest(**keyword_args)
+
+ # value inside the bounds works
+ keyword_args[var_name] = validations[key]
+ assert (getattr(FormatTest(**keyword_args), var_name) ==
+ validations[key])
+
+ def test_double(self):
+ var_name = 'double'
+ validations = FormatTest.validations[(var_name,)]
+ keyword_args = {}
+ keyword_args.update(self.required_named_args)
+ key_adder_pairs = [('inclusive_maximum', 1), ('inclusive_minimum', -1)]
+ for key, adder in key_adder_pairs:
+ # value outside the bounds throws an error
+ with self.assertRaises(petstore_api.ApiValueError):
+ keyword_args[var_name] = validations[key] + adder
+ FormatTest(**keyword_args)
+
+ # value inside the bounds works
+ keyword_args[var_name] = validations[key]
+ assert (getattr(FormatTest(**keyword_args), var_name) ==
+ validations[key])
+
+ def test_password(self):
+ var_name = 'password'
+ validations = FormatTest.validations[(var_name,)]
+ keyword_args = {}
+ keyword_args.update(self.required_named_args)
+ key_adder_pairs = [('max_length', 1), ('min_length', -1)]
+ for key, adder in key_adder_pairs:
+ # value outside the bounds throws an error
+ with self.assertRaises(petstore_api.ApiValueError):
+ keyword_args[var_name] = 'a'*(validations[key] + adder)
+ FormatTest(**keyword_args)
+
+ # value inside the bounds works
+ keyword_args[var_name] = 'a'*validations[key]
+ assert (getattr(FormatTest(**keyword_args), var_name) ==
+ 'a'*validations[key])
+
+ def test_string(self):
+ var_name = 'string'
+ validations = FormatTest.validations[(var_name,)]
+ keyword_args = {}
+ keyword_args.update(self.required_named_args)
+ values_invalid = ['abc3', '1', '.', ' ', 'مرحبا', '']
+ for value_invalid in values_invalid:
+ # invalid values throw exceptions
+ with self.assertRaises(petstore_api.ApiValueError):
+ keyword_args[var_name] = value_invalid
+ FormatTest(**keyword_args)
+
+ # valid value works
+ value_valid = 'abcdz'
+ keyword_args[var_name] = value_valid
+ assert getattr(FormatTest(**keyword_args), var_name) == value_valid
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_grandparent.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_grandparent.py
new file mode 100644
index 00000000000..2972d01161c
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_grandparent.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.grandparent import Grandparent
+
+
+class TestGrandparent(unittest.TestCase):
+ """Grandparent unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testGrandparent(self):
+ """Test Grandparent"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = Grandparent() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_grandparent_animal.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_grandparent_animal.py
new file mode 100644
index 00000000000..cabe4d81f98
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_grandparent_animal.py
@@ -0,0 +1,58 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+try:
+ from petstore_api.model import child_cat
+except ImportError:
+ child_cat = sys.modules[
+ 'petstore_api.model.child_cat']
+try:
+ from petstore_api.model import child_dog
+except ImportError:
+ child_dog = sys.modules[
+ 'petstore_api.model.child_dog']
+try:
+ from petstore_api.model import child_lizard
+except ImportError:
+ child_lizard = sys.modules[
+ 'petstore_api.model.child_lizard']
+try:
+ from petstore_api.model import parent_pet
+except ImportError:
+ parent_pet = sys.modules[
+ 'petstore_api.model.parent_pet']
+from petstore_api.model.grandparent_animal import GrandparentAnimal
+
+
+class TestGrandparentAnimal(unittest.TestCase):
+ """GrandparentAnimal unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testGrandparentAnimal(self):
+ """Test GrandparentAnimal"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = GrandparentAnimal() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_has_only_read_only.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_has_only_read_only.py
new file mode 100644
index 00000000000..9ebd7683b39
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_has_only_read_only.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.has_only_read_only import HasOnlyReadOnly
+
+
+class TestHasOnlyReadOnly(unittest.TestCase):
+ """HasOnlyReadOnly unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testHasOnlyReadOnly(self):
+ """Test HasOnlyReadOnly"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = HasOnlyReadOnly() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_list.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_list.py
new file mode 100644
index 00000000000..52156adfed2
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_list.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.list import List
+
+
+class TestList(unittest.TestCase):
+ """List unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testList(self):
+ """Test List"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = List() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_map_test.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_map_test.py
new file mode 100644
index 00000000000..3feda0f688d
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_map_test.py
@@ -0,0 +1,125 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+try:
+ from petstore_api.model import string_boolean_map
+except ImportError:
+ string_boolean_map = sys.modules[
+ 'petstore_api.model.string_boolean_map']
+from petstore_api.model.map_test import MapTest
+
+
+class TestMapTest(unittest.TestCase):
+ """MapTest unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def test_maptest_init(self):
+ #
+ # Test MapTest construction with valid values
+ #
+ up_or_low_dict = {
+ 'UPPER': "UP",
+ 'lower': "low"
+ }
+ map_enum_test = MapTest(map_of_enum_string=up_or_low_dict)
+
+ self.assertEqual(map_enum_test.map_of_enum_string, up_or_low_dict)
+
+ map_of_map_of_strings = {
+ 'valueDict': up_or_low_dict
+ }
+ map_enum_test = MapTest(map_map_of_string=map_of_map_of_strings)
+
+ self.assertEqual(map_enum_test.map_map_of_string, map_of_map_of_strings)
+
+ #
+ # Make sure that the init fails for invalid enum values
+ #
+ black_or_white_dict = {
+ 'black': "UP",
+ 'white': "low"
+ }
+ with self.assertRaises(petstore_api.ApiValueError):
+ MapTest(map_of_enum_string=black_or_white_dict)
+
+ def test_maptest_setter(self):
+ #
+ # Check with some valid values
+ #
+ map_enum_test = MapTest()
+ up_or_low_dict = {
+ 'UPPER': "UP",
+ 'lower': "low"
+ }
+ map_enum_test.map_of_enum_string = up_or_low_dict
+ self.assertEqual(map_enum_test.map_of_enum_string, up_or_low_dict)
+
+ #
+ # Check if the setter fails for invalid enum values
+ #
+ map_enum_test = MapTest()
+ black_or_white_dict = {
+ 'black': "UP",
+ 'white': "low"
+ }
+ with self.assertRaises(petstore_api.ApiValueError):
+ map_enum_test.map_of_enum_string = black_or_white_dict
+
+ def test_todict(self):
+ #
+ # Check dictionary serialization
+ #
+ map_enum_test = MapTest()
+ up_or_low_dict = {
+ 'UPPER': "UP",
+ 'lower': "low"
+ }
+ map_of_map_of_strings = {
+ 'valueDict': up_or_low_dict
+ }
+ indirect_map = string_boolean_map.StringBooleanMap(**{
+ 'option1': True
+ })
+ direct_map = {
+ 'option2': False
+ }
+ map_enum_test.map_of_enum_string = up_or_low_dict
+ map_enum_test.map_map_of_string = map_of_map_of_strings
+ map_enum_test.indirect_map = indirect_map
+ map_enum_test.direct_map = direct_map
+
+ self.assertEqual(map_enum_test.map_of_enum_string, up_or_low_dict)
+ self.assertEqual(map_enum_test.map_map_of_string, map_of_map_of_strings)
+ self.assertEqual(map_enum_test.indirect_map, indirect_map)
+ self.assertEqual(map_enum_test.direct_map, direct_map)
+
+ expected_dict = {
+ 'map_of_enum_string': up_or_low_dict,
+ 'map_map_of_string': map_of_map_of_strings,
+ 'indirect_map': indirect_map.to_dict(),
+ 'direct_map': direct_map
+ }
+
+ self.assertEqual(map_enum_test.to_dict(), expected_dict)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_mixed_properties_and_additional_properties_class.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_mixed_properties_and_additional_properties_class.py
new file mode 100644
index 00000000000..4dcb5ad4268
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_mixed_properties_and_additional_properties_class.py
@@ -0,0 +1,43 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+try:
+ from petstore_api.model import animal
+except ImportError:
+ animal = sys.modules[
+ 'petstore_api.model.animal']
+from petstore_api.model.mixed_properties_and_additional_properties_class import MixedPropertiesAndAdditionalPropertiesClass
+
+
+class TestMixedPropertiesAndAdditionalPropertiesClass(unittest.TestCase):
+ """MixedPropertiesAndAdditionalPropertiesClass unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testMixedPropertiesAndAdditionalPropertiesClass(self):
+ """Test MixedPropertiesAndAdditionalPropertiesClass"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = MixedPropertiesAndAdditionalPropertiesClass() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_model200_response.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_model200_response.py
new file mode 100644
index 00000000000..4012eaae336
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_model200_response.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.model200_response import Model200Response
+
+
+class TestModel200Response(unittest.TestCase):
+ """Model200Response unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testModel200Response(self):
+ """Test Model200Response"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = Model200Response() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_model_return.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_model_return.py
new file mode 100644
index 00000000000..54c98b33cd6
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_model_return.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.model_return import ModelReturn
+
+
+class TestModelReturn(unittest.TestCase):
+ """ModelReturn unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testModelReturn(self):
+ """Test ModelReturn"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = ModelReturn() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_name.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_name.py
new file mode 100644
index 00000000000..6a9be99d1a5
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_name.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.name import Name
+
+
+class TestName(unittest.TestCase):
+ """Name unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testName(self):
+ """Test Name"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = Name() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_number_only.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_number_only.py
new file mode 100644
index 00000000000..07aab1d78af
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_number_only.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.number_only import NumberOnly
+
+
+class TestNumberOnly(unittest.TestCase):
+ """NumberOnly unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testNumberOnly(self):
+ """Test NumberOnly"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = NumberOnly() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_number_with_validations.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_number_with_validations.py
new file mode 100644
index 00000000000..3f0b78835d4
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_number_with_validations.py
@@ -0,0 +1,45 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.number_with_validations import NumberWithValidations
+
+
+class TestNumberWithValidations(unittest.TestCase):
+ """NumberWithValidations unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testNumberWithValidations(self):
+ """Test NumberWithValidations"""
+ valid_values = [10.0, 15.0, 20.0]
+ for valid_value in valid_values:
+ model = NumberWithValidations(valid_value)
+ assert model.value == valid_value
+
+ invalid_values = [9.0, 21.0]
+ for invalid_value in invalid_values:
+ with self.assertRaises(petstore_api.ApiValueError):
+ NumberWithValidations(invalid_value)
+
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_object_model_with_ref_props.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_object_model_with_ref_props.py
new file mode 100644
index 00000000000..35bd3b6d8ec
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_object_model_with_ref_props.py
@@ -0,0 +1,49 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+try:
+ from petstore_api.model import number_with_validations
+except ImportError:
+ number_with_validations = sys.modules[
+ 'petstore_api.model.number_with_validations']
+from petstore_api.model.object_model_with_ref_props import ObjectModelWithRefProps
+
+
+class TestObjectModelWithRefProps(unittest.TestCase):
+ """ObjectModelWithRefProps unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testObjectModelWithRefProps(self):
+ """Test ObjectModelWithRefProps"""
+ from petstore_api.model.number_with_validations import NumberWithValidations
+ self.assertEqual(
+ ObjectModelWithRefProps.openapi_types,
+ {
+ 'my_number': (NumberWithValidations,),
+ 'my_string': (str,),
+ 'my_boolean': (bool,),
+ }
+ )
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_order.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_order.py
new file mode 100644
index 00000000000..ee6988e28cc
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_order.py
@@ -0,0 +1,41 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.order import Order
+
+
+class TestOrder(unittest.TestCase):
+ """Order unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testOrder(self):
+ """Test Order"""
+ order = Order()
+ order.status = "placed"
+ self.assertEqual("placed", order.status)
+ with self.assertRaises(petstore_api.ApiValueError):
+ order.status = "invalid"
+
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_parent.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_parent.py
new file mode 100644
index 00000000000..20282dfb41e
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_parent.py
@@ -0,0 +1,48 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+try:
+ from petstore_api.model import grandparent
+except ImportError:
+ grandparent = sys.modules[
+ 'petstore_api.model.grandparent']
+try:
+ from petstore_api.model import parent_all_of
+except ImportError:
+ parent_all_of = sys.modules[
+ 'petstore_api.model.parent_all_of']
+from petstore_api.model.parent import Parent
+
+
+class TestParent(unittest.TestCase):
+ """Parent unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testParent(self):
+ """Test Parent"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = Parent() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_parent_all_of.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_parent_all_of.py
new file mode 100644
index 00000000000..ca87189bba5
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_parent_all_of.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.parent_all_of import ParentAllOf
+
+
+class TestParentAllOf(unittest.TestCase):
+ """ParentAllOf unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testParentAllOf(self):
+ """Test ParentAllOf"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = ParentAllOf() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_parent_pet.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_parent_pet.py
new file mode 100644
index 00000000000..17a4d60e75d
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_parent_pet.py
@@ -0,0 +1,58 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+try:
+ from petstore_api.model import child_cat
+except ImportError:
+ child_cat = sys.modules[
+ 'petstore_api.model.child_cat']
+try:
+ from petstore_api.model import child_dog
+except ImportError:
+ child_dog = sys.modules[
+ 'petstore_api.model.child_dog']
+try:
+ from petstore_api.model import child_lizard
+except ImportError:
+ child_lizard = sys.modules[
+ 'petstore_api.model.child_lizard']
+try:
+ from petstore_api.model import grandparent_animal
+except ImportError:
+ grandparent_animal = sys.modules[
+ 'petstore_api.model.grandparent_animal']
+from petstore_api.model.parent_pet import ParentPet
+
+
+class TestParentPet(unittest.TestCase):
+ """ParentPet unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testParentPet(self):
+ """Test ParentPet"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = ParentPet() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_pet.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_pet.py
new file mode 100644
index 00000000000..b072cff5e9a
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_pet.py
@@ -0,0 +1,89 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+try:
+ from petstore_api.model import category
+except ImportError:
+ category = sys.modules[
+ 'petstore_api.model.category']
+try:
+ from petstore_api.models import tag
+except ImportError:
+ tag = sys.modules[
+ 'petstore_api.model.tag']
+from petstore_api.model.pet import Pet
+
+
+class TestPet(unittest.TestCase):
+ """Pet unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def test_to_str(self):
+ pet = Pet(name="test name", photo_urls=["string"])
+ pet.id = 1
+ pet.status = "available"
+ cate = category.Category()
+ cate.id = 1
+ cate.name = "dog"
+ pet.category = cate
+ tag1 = tag.Tag()
+ tag1.id = 1
+ pet.tags = [tag1]
+
+ data = ("{'category': {'id': 1, 'name': 'dog'},\n"
+ " 'id': 1,\n"
+ " 'name': 'test name',\n"
+ " 'photo_urls': ['string'],\n"
+ " 'status': 'available',\n"
+ " 'tags': [{'id': 1}]}")
+ self.assertEqual(data, pet.to_str())
+
+ def test_equal(self):
+ pet1 = Pet(name="test name", photo_urls=["string"])
+ pet1.id = 1
+ pet1.status = "available"
+ cate1 = category.Category()
+ cate1.id = 1
+ cate1.name = "dog"
+ tag1 = tag.Tag()
+ tag1.id = 1
+ pet1.tags = [tag1]
+
+ pet2 = Pet(name="test name", photo_urls=["string"])
+ pet2.id = 1
+ pet2.status = "available"
+ cate2 = category.Category()
+ cate2.id = 1
+ cate2.name = "dog"
+ tag2 = tag.Tag()
+ tag2.id = 1
+ pet2.tags = [tag2]
+
+ self.assertTrue(pet1 == pet2)
+
+ # reset pet1 tags to empty array so that object comparison returns false
+ pet1.tags = []
+ self.assertFalse(pet1 == pet2)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_pet_api.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_pet_api.py
new file mode 100644
index 00000000000..091b30cf8ac
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_pet_api.py
@@ -0,0 +1,95 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.api.pet_api import PetApi # noqa: E501
+
+
+class TestPetApi(unittest.TestCase):
+ """PetApi unit test stubs"""
+
+ def setUp(self):
+ self.api = PetApi() # noqa: E501
+
+ def tearDown(self):
+ pass
+
+ def test_add_pet(self):
+ """Test case for add_pet
+
+ Add a new pet to the store # noqa: E501
+ """
+ pass
+
+ def test_delete_pet(self):
+ """Test case for delete_pet
+
+ Deletes a pet # noqa: E501
+ """
+ pass
+
+ def test_find_pets_by_status(self):
+ """Test case for find_pets_by_status
+
+ Finds Pets by status # noqa: E501
+ """
+ pass
+
+ def test_find_pets_by_tags(self):
+ """Test case for find_pets_by_tags
+
+ Finds Pets by tags # noqa: E501
+ """
+ pass
+
+ def test_get_pet_by_id(self):
+ """Test case for get_pet_by_id
+
+ Find pet by ID # noqa: E501
+ """
+ pass
+
+ def test_update_pet(self):
+ """Test case for update_pet
+
+ Update an existing pet # noqa: E501
+ """
+ pass
+
+ def test_update_pet_with_form(self):
+ """Test case for update_pet_with_form
+
+ Updates a pet in the store with form data # noqa: E501
+ """
+ pass
+
+ def test_upload_file(self):
+ """Test case for upload_file
+
+ uploads an image # noqa: E501
+ """
+ pass
+
+ def test_upload_file_with_required_file(self):
+ """Test case for upload_file_with_required_file
+
+ uploads an image (required) # noqa: E501
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_player.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_player.py
new file mode 100644
index 00000000000..ee7b95a677f
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_player.py
@@ -0,0 +1,44 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.player import Player
+
+
+class TestPlayer(unittest.TestCase):
+ """Player unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testPlayer(self):
+ """Test Player"""
+ # we can make a player without an enemy_player property
+ jane = Player(name="Jane")
+ # we can make a player with an enemy_player
+ sally = Player(name="Sally", enemy_player=jane)
+ # we can make a player with an inline enemy_player
+ jim = Player(
+ name="Jim",
+ enemy_player=Player(name="Sam")
+ )
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_read_only_first.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_read_only_first.py
new file mode 100644
index 00000000000..c2dcde240e7
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_read_only_first.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.read_only_first import ReadOnlyFirst
+
+
+class TestReadOnlyFirst(unittest.TestCase):
+ """ReadOnlyFirst unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testReadOnlyFirst(self):
+ """Test ReadOnlyFirst"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = ReadOnlyFirst() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_special_model_name.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_special_model_name.py
new file mode 100644
index 00000000000..6124525f517
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_special_model_name.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.special_model_name import SpecialModelName
+
+
+class TestSpecialModelName(unittest.TestCase):
+ """SpecialModelName unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testSpecialModelName(self):
+ """Test SpecialModelName"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = SpecialModelName() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_store_api.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_store_api.py
new file mode 100644
index 00000000000..0d9cc3dd36e
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_store_api.py
@@ -0,0 +1,60 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.api.store_api import StoreApi # noqa: E501
+
+
+class TestStoreApi(unittest.TestCase):
+ """StoreApi unit test stubs"""
+
+ def setUp(self):
+ self.api = StoreApi() # noqa: E501
+
+ def tearDown(self):
+ pass
+
+ def test_delete_order(self):
+ """Test case for delete_order
+
+ Delete purchase order by ID # noqa: E501
+ """
+ pass
+
+ def test_get_inventory(self):
+ """Test case for get_inventory
+
+ Returns pet inventories by status # noqa: E501
+ """
+ pass
+
+ def test_get_order_by_id(self):
+ """Test case for get_order_by_id
+
+ Find purchase order by ID # noqa: E501
+ """
+ pass
+
+ def test_place_order(self):
+ """Test case for place_order
+
+ Place an order for a pet # noqa: E501
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_string_boolean_map.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_string_boolean_map.py
new file mode 100644
index 00000000000..e2e9d8b420b
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_string_boolean_map.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.string_boolean_map import StringBooleanMap
+
+
+class TestStringBooleanMap(unittest.TestCase):
+ """StringBooleanMap unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testStringBooleanMap(self):
+ """Test StringBooleanMap"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = StringBooleanMap() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_string_enum.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_string_enum.py
new file mode 100644
index 00000000000..5eed0ad6f0e
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_string_enum.py
@@ -0,0 +1,49 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.string_enum import StringEnum
+
+
+class TestStringEnum(unittest.TestCase):
+ """StringEnum unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testStringEnum(self):
+ """Test StringEnum"""
+
+ """Test OuterEnum"""
+ # make sure that we can access its allowed_values
+ assert StringEnum.allowed_values[('value',)] == {
+ 'PLACED': "placed",
+ 'APPROVED': "approved",
+ 'DELIVERED': "delivered"
+ }
+ # make sure that an exception is thrown on an invalid value
+ with self.assertRaises(petstore_api.ApiValueError):
+ StringEnum('bad_value')
+ # make sure valid value works
+ valid_value = StringEnum.allowed_values[('value',)]['PLACED']
+ assert valid_value == StringEnum(valid_value).value
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_tag.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_tag.py
new file mode 100644
index 00000000000..68a3b9046bf
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_tag.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.tag import Tag
+
+
+class TestTag(unittest.TestCase):
+ """Tag unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testTag(self):
+ """Test Tag"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = Tag() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_type_holder_default.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_type_holder_default.py
new file mode 100644
index 00000000000..f9c050b81a8
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_type_holder_default.py
@@ -0,0 +1,41 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.type_holder_default import TypeHolderDefault
+
+
+class TestTypeHolderDefault(unittest.TestCase):
+ """TypeHolderDefault unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testTypeHolderDefault(self):
+ """Test TypeHolderDefault"""
+ # required_vars are set to None now until swagger-parser/swagger-core fixes
+ # https://github.com/swagger-api/swagger-parser/issues/971
+ array_item = [1, 2, 3]
+ model = TypeHolderDefault(array_item=array_item)
+ self.assertEqual(model.string_item, 'what')
+ self.assertEqual(model.bool_item, True)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_type_holder_example.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_type_holder_example.py
new file mode 100644
index 00000000000..e1ee7c36862
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_type_holder_example.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.type_holder_example import TypeHolderExample
+
+
+class TestTypeHolderExample(unittest.TestCase):
+ """TypeHolderExample unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testTypeHolderExample(self):
+ """Test TypeHolderExample"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = TypeHolderExample() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_user.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_user.py
new file mode 100644
index 00000000000..7241bb589c5
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_user.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.user import User
+
+
+class TestUser(unittest.TestCase):
+ """User unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testUser(self):
+ """Test User"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = User() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_user_api.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_user_api.py
new file mode 100644
index 00000000000..df306da0776
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_user_api.py
@@ -0,0 +1,88 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+
+import unittest
+
+import petstore_api
+from petstore_api.api.user_api import UserApi # noqa: E501
+
+
+class TestUserApi(unittest.TestCase):
+ """UserApi unit test stubs"""
+
+ def setUp(self):
+ self.api = UserApi() # noqa: E501
+
+ def tearDown(self):
+ pass
+
+ def test_create_user(self):
+ """Test case for create_user
+
+ Create user # noqa: E501
+ """
+ pass
+
+ def test_create_users_with_array_input(self):
+ """Test case for create_users_with_array_input
+
+ Creates list of users with given input array # noqa: E501
+ """
+ pass
+
+ def test_create_users_with_list_input(self):
+ """Test case for create_users_with_list_input
+
+ Creates list of users with given input array # noqa: E501
+ """
+ pass
+
+ def test_delete_user(self):
+ """Test case for delete_user
+
+ Delete user # noqa: E501
+ """
+ pass
+
+ def test_get_user_by_name(self):
+ """Test case for get_user_by_name
+
+ Get user by user name # noqa: E501
+ """
+ pass
+
+ def test_login_user(self):
+ """Test case for login_user
+
+ Logs user into the system # noqa: E501
+ """
+ pass
+
+ def test_logout_user(self):
+ """Test case for logout_user
+
+ Logs out current logged in user session # noqa: E501
+ """
+ pass
+
+ def test_update_user(self):
+ """Test case for update_user
+
+ Updated user # noqa: E501
+ """
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_xml_item.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_xml_item.py
new file mode 100644
index 00000000000..4354664815f
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test/test_xml_item.py
@@ -0,0 +1,38 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+from __future__ import absolute_import
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.xml_item import XmlItem
+
+
+class TestXmlItem(unittest.TestCase):
+ """XmlItem unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testXmlItem(self):
+ """Test XmlItem"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = XmlItem() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test_python.sh b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test_python.sh
new file mode 100644
index 00000000000..6f5e2c41d3a
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/test_python.sh
@@ -0,0 +1,31 @@
+#!/bin/bash
+
+REQUIREMENTS_FILE=dev-requirements.txt
+REQUIREMENTS_OUT=dev-requirements.txt.log
+SETUP_OUT=*.egg-info
+VENV=venv
+DEACTIVE=false
+
+export LC_ALL=en_US.UTF-8
+export LANG=en_US.UTF-8
+
+### set virtualenv
+if [ -z "$VIRTUAL_ENV" ]; then
+ virtualenv $VENV --no-site-packages --always-copy
+ source $VENV/bin/activate
+ DEACTIVE=true
+fi
+
+### install dependencies
+pip install -r $REQUIREMENTS_FILE | tee -a $REQUIREMENTS_OUT
+
+### run tests
+tox || exit 1
+
+### static analysis of code
+#flake8 --show-source petstore_api/
+
+### deactivate virtualenv
+#if [ $DEACTIVE == true ]; then
+# deactivate
+#fi
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/testfiles/1px_pic1.png b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/testfiles/1px_pic1.png
new file mode 100644
index 00000000000..7d3a386a210
Binary files /dev/null and b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/testfiles/1px_pic1.png differ
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/testfiles/1px_pic2.png b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/testfiles/1px_pic2.png
new file mode 100644
index 00000000000..7d3a386a210
Binary files /dev/null and b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/testfiles/1px_pic2.png differ
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/testfiles/foo.png b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/testfiles/foo.png
new file mode 100644
index 00000000000..a9b12cf5927
Binary files /dev/null and b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/testfiles/foo.png differ
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/tests/__init__.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/tests/__init__.py
new file mode 100644
index 00000000000..e69de29bb2d
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/tests/test_api_client.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/tests/test_api_client.py
new file mode 100644
index 00000000000..c249bf1fc5e
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/tests/test_api_client.py
@@ -0,0 +1,221 @@
+# coding: utf-8
+
+# flake8: noqa
+
+"""
+Run the tests.
+$ pip install nose (optional)
+$ cd OpenAPIetstore-python
+$ nosetests -v
+"""
+
+import os
+import time
+import atexit
+import weakref
+import unittest
+from dateutil.parser import parse
+
+import petstore_api
+import petstore_api.configuration
+
+HOST = 'http://petstore.swagger.io/v2'
+
+
+class ApiClientTests(unittest.TestCase):
+
+ def setUp(self):
+ self.api_client = petstore_api.ApiClient()
+
+ def test_configuration(self):
+ config = petstore_api.Configuration()
+ config.host = 'http://localhost/'
+
+ config.api_key['api_key'] = '123456'
+ config.api_key_prefix['api_key'] = 'PREFIX'
+ config.username = 'test_username'
+ config.password = 'test_password'
+
+ header_params = {'test1': 'value1'}
+ query_params = {'test2': 'value2'}
+ auth_settings = ['api_key', 'unknown']
+
+ client = petstore_api.ApiClient(config)
+
+ # test prefix
+ self.assertEqual('PREFIX', client.configuration.api_key_prefix['api_key'])
+
+ # update parameters based on auth setting
+ client.update_params_for_auth(header_params, query_params, auth_settings, resource_path=None, method=None, body=None)
+
+ # test api key auth
+ self.assertEqual(header_params['test1'], 'value1')
+ self.assertEqual(header_params['api_key'], 'PREFIX 123456')
+ self.assertEqual(query_params['test2'], 'value2')
+
+ # test basic auth
+ self.assertEqual('test_username', client.configuration.username)
+ self.assertEqual('test_password', client.configuration.password)
+
+ # test api key without prefix
+ config.api_key['api_key'] = '123456'
+ config.api_key_prefix['api_key'] = None
+ # update parameters based on auth setting
+ client.update_params_for_auth(header_params, query_params, auth_settings, resource_path=None, method=None, body=None)
+ self.assertEqual(header_params['api_key'], '123456')
+
+ # test api key with empty prefix
+ config.api_key['api_key'] = '123456'
+ config.api_key_prefix['api_key'] = ''
+ # update parameters based on auth setting
+ client.update_params_for_auth(header_params, query_params, auth_settings, resource_path=None, method=None, body=None)
+ self.assertEqual(header_params['api_key'], '123456')
+
+ # test api key with prefix specified in the api_key, useful when the prefix
+ # must include '=' sign followed by the API key secret without space.
+ config.api_key['api_key'] = 'PREFIX=123456'
+ config.api_key_prefix['api_key'] = None
+ # update parameters based on auth setting
+ client.update_params_for_auth(header_params, query_params, auth_settings, resource_path=None, method=None, body=None)
+ self.assertEqual(header_params['api_key'], 'PREFIX=123456')
+
+
+ def test_select_header_accept(self):
+ accepts = ['APPLICATION/JSON', 'APPLICATION/XML']
+ accept = self.api_client.select_header_accept(accepts)
+ self.assertEqual(accept, 'application/json')
+
+ accepts = ['application/json', 'application/xml']
+ accept = self.api_client.select_header_accept(accepts)
+ self.assertEqual(accept, 'application/json')
+
+ accepts = ['application/xml', 'application/json']
+ accept = self.api_client.select_header_accept(accepts)
+ self.assertEqual(accept, 'application/json')
+
+ accepts = ['text/plain', 'application/xml']
+ accept = self.api_client.select_header_accept(accepts)
+ self.assertEqual(accept, 'text/plain, application/xml')
+
+ accepts = []
+ accept = self.api_client.select_header_accept(accepts)
+ self.assertEqual(accept, None)
+
+ def test_select_header_content_type(self):
+ content_types = ['APPLICATION/JSON', 'APPLICATION/XML']
+ content_type = self.api_client.select_header_content_type(content_types)
+ self.assertEqual(content_type, 'application/json')
+
+ content_types = ['application/json', 'application/xml']
+ content_type = self.api_client.select_header_content_type(content_types)
+ self.assertEqual(content_type, 'application/json')
+
+ content_types = ['application/xml', 'application/json']
+ content_type = self.api_client.select_header_content_type(content_types)
+ self.assertEqual(content_type, 'application/json')
+
+ content_types = ['text/plain', 'application/xml']
+ content_type = self.api_client.select_header_content_type(content_types)
+ self.assertEqual(content_type, 'text/plain')
+
+ content_types = []
+ content_type = self.api_client.select_header_content_type(content_types)
+ self.assertEqual(content_type, 'application/json')
+
+ def test_sanitize_for_serialization(self):
+ # None
+ data = None
+ result = self.api_client.sanitize_for_serialization(None)
+ self.assertEqual(result, data)
+
+ # str
+ data = "test string"
+ result = self.api_client.sanitize_for_serialization(data)
+ self.assertEqual(result, data)
+
+ # int
+ data = 1
+ result = self.api_client.sanitize_for_serialization(data)
+ self.assertEqual(result, data)
+
+ # bool
+ data = True
+ result = self.api_client.sanitize_for_serialization(data)
+ self.assertEqual(result, data)
+
+ # date
+ data = parse("1997-07-16").date() # date
+ result = self.api_client.sanitize_for_serialization(data)
+ self.assertEqual(result, "1997-07-16")
+
+ # datetime
+ data = parse("1997-07-16T19:20:30.45+01:00") # datetime
+ result = self.api_client.sanitize_for_serialization(data)
+ self.assertEqual(result, "1997-07-16T19:20:30.450000+01:00")
+
+ # list
+ data = [1]
+ result = self.api_client.sanitize_for_serialization(data)
+ self.assertEqual(result, data)
+
+ # dict
+ data = {"test key": "test value"}
+ result = self.api_client.sanitize_for_serialization(data)
+ self.assertEqual(result, data)
+
+ # model
+ pet_dict = {"id": 1, "name": "monkey",
+ "category": {"id": 1, "name": "test category"},
+ "tags": [{"id": 1, "fullName": "test tag1"},
+ {"id": 2, "fullName": "test tag2"}],
+ "status": "available",
+ "photoUrls": ["http://foo.bar.com/3",
+ "http://foo.bar.com/4"]}
+ from petstore_api.model.pet import Pet
+ from petstore_api.model.category import Category
+ from petstore_api.model.tag import Tag
+ from petstore_api.model.string_boolean_map import StringBooleanMap
+ pet = Pet(name=pet_dict["name"], photo_urls=pet_dict["photoUrls"])
+ pet.id = pet_dict["id"]
+ cate = Category()
+ cate.id = pet_dict["category"]["id"]
+ cate.name = pet_dict["category"]["name"]
+ pet.category = cate
+ tag1 = Tag()
+ tag1.id = pet_dict["tags"][0]["id"]
+ tag1.full_name = pet_dict["tags"][0]["fullName"]
+ tag2 = Tag()
+ tag2.id = pet_dict["tags"][1]["id"]
+ tag2.full_name = pet_dict["tags"][1]["fullName"]
+ pet.tags = [tag1, tag2]
+ pet.status = pet_dict["status"]
+
+ data = pet
+ result = self.api_client.sanitize_for_serialization(data)
+ self.assertEqual(result, pet_dict)
+
+ # list of models
+ list_of_pet_dict = [pet_dict]
+ data = [pet]
+ result = self.api_client.sanitize_for_serialization(data)
+ self.assertEqual(result, list_of_pet_dict)
+
+ # model with additional proerties
+ model_dict = {'some_key': True}
+ model = StringBooleanMap(**model_dict)
+ result = self.api_client.sanitize_for_serialization(model)
+ self.assertEqual(result, model_dict)
+
+ def test_context_manager_closes_threadpool(self):
+ with petstore_api.ApiClient() as client:
+ self.assertIsNotNone(client.pool)
+ pool_ref = weakref.ref(client._pool)
+ self.assertIsNotNone(pool_ref())
+ self.assertIsNone(pool_ref())
+
+ def test_atexit_closes_threadpool(self):
+ client = petstore_api.ApiClient()
+ self.assertIsNotNone(client.pool)
+ self.assertIsNotNone(client._pool)
+ atexit._run_exitfuncs()
+ self.assertIsNone(client._pool)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/tests/test_api_exception.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/tests/test_api_exception.py
new file mode 100644
index 00000000000..0d0771b5785
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/tests/test_api_exception.py
@@ -0,0 +1,86 @@
+# coding: utf-8
+
+# flake8: noqa
+
+"""
+Run the tests.
+$ pip install nose (optional)
+$ cd petstore_api-python
+$ nosetests -v
+"""
+
+import os
+import six
+import sys
+import unittest
+
+import petstore_api
+
+from .util import id_gen
+
+class ApiExceptionTests(unittest.TestCase):
+
+ def setUp(self):
+ self.api_client = petstore_api.ApiClient()
+ from petstore_api.api.pet_api import PetApi
+ self.pet_api = PetApi(self.api_client)
+ self.setUpModels()
+
+ def setUpModels(self):
+ from petstore_api.model import category, tag, pet
+ self.category = category.Category()
+ self.category.id = id_gen()
+ self.category.name = "dog"
+ self.tag = tag.Tag()
+ self.tag.id = id_gen()
+ self.tag.full_name = "blank"
+ self.pet = pet.Pet(name="hello kity", photo_urls=["http://foo.bar.com/1", "http://foo.bar.com/2"])
+ self.pet.id = id_gen()
+ self.pet.status = "sold"
+ self.pet.category = self.category
+ self.pet.tags = [self.tag]
+
+ def test_404_error(self):
+ self.pet_api.add_pet(self.pet)
+ self.pet_api.delete_pet(pet_id=self.pet.id)
+
+ with self.checkRaiseRegex(petstore_api.ApiException, "Pet not found"):
+ self.pet_api.get_pet_by_id(pet_id=self.pet.id)
+
+ try:
+ self.pet_api.get_pet_by_id(pet_id=self.pet.id)
+ except petstore_api.ApiException as e:
+ self.assertEqual(e.status, 404)
+ self.assertEqual(e.reason, "Not Found")
+ self.checkRegex(e.body, "Pet not found")
+
+ def test_500_error(self):
+ self.pet_api.add_pet(self.pet)
+
+ with self.checkRaiseRegex(petstore_api.ApiException, "Internal Server Error"):
+ self.pet_api.upload_file(
+ pet_id=self.pet.id,
+ additional_metadata="special"
+ )
+
+ try:
+ self.pet_api.upload_file(
+ pet_id=self.pet.id,
+ additional_metadata="special"
+ )
+ except petstore_api.ApiException as e:
+ self.assertEqual(e.status, 500)
+ self.assertEqual(e.reason, "Internal Server Error")
+ self.checkRegex(e.body, "Error 500 Internal Server Error")
+
+ def checkRaiseRegex(self, expected_exception, expected_regex):
+ if sys.version_info < (3, 0):
+ return self.assertRaisesRegexp(expected_exception, expected_regex)
+
+ return self.assertRaisesRegex(expected_exception, expected_regex)
+
+ def checkRegex(self, text, expected_regex):
+ if sys.version_info < (3, 0):
+ return self.assertRegexpMatches(text, expected_regex)
+
+ return self.assertRegex(text, expected_regex)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/tests/test_deserialization.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/tests/test_deserialization.py
new file mode 100644
index 00000000000..92903bb232d
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/tests/test_deserialization.py
@@ -0,0 +1,442 @@
+# coding: utf-8
+
+# flake8: noqa
+
+"""
+Run the tests.
+$ pip install nose (optional)
+$ cd OpenAPIPetstore-python
+$ nosetests -v
+"""
+from collections import namedtuple
+import json
+import os
+import time
+import unittest
+import datetime
+
+import six
+
+import petstore_api
+
+from petstore_api.exceptions import (
+ ApiTypeError,
+ ApiKeyError,
+ ApiValueError,
+)
+from petstore_api.model import (
+ enum_test,
+ pet,
+ animal,
+ dog,
+ parent_pet,
+ child_lizard,
+ category,
+ string_enum,
+ number_with_validations,
+ string_boolean_map,
+)
+from petstore_api.model_utils import (
+ file_type,
+ model_to_dict,
+)
+
+from petstore_api.rest import RESTResponse
+
+MockResponse = namedtuple('MockResponse', 'data')
+
+class DeserializationTests(unittest.TestCase):
+
+ def setUp(self):
+ self.api_client = petstore_api.ApiClient()
+ self.deserialize = self.api_client.deserialize
+
+ def test_enum_test(self):
+ """ deserialize dict(str, Enum_Test) """
+ data = {
+ 'enum_test': {
+ "enum_string": "UPPER",
+ "enum_string_required": "lower",
+ "enum_integer": 1,
+ "enum_number": 1.1,
+ "stringEnum": "placed"
+ }
+ }
+ response = MockResponse(data=json.dumps(data))
+
+ deserialized = self.deserialize(response,
+ ({str: (enum_test.EnumTest,)},), True)
+ self.assertTrue(isinstance(deserialized, dict))
+ self.assertTrue(
+ isinstance(deserialized['enum_test'], enum_test.EnumTest))
+ value = (
+ string_enum.StringEnum.allowed_values[('value',)]["PLACED"])
+ string_enum_val = string_enum.StringEnum(value)
+ sample_instance = enum_test.EnumTest(
+ enum_string="UPPER",
+ enum_string_required="lower",
+ enum_integer=1,
+ enum_number=1.1,
+ string_enum=string_enum_val
+ )
+ self.assertEqual(deserialized['enum_test'], sample_instance)
+
+ def test_deserialize_dict_str_pet(self):
+ """ deserialize dict(str, Pet) """
+ data = {
+ 'pet': {
+ "id": 0,
+ "category": {
+ "id": 0,
+ "name": "string"
+ },
+ "name": "doggie",
+ "photoUrls": [
+ "string"
+ ],
+ "tags": [
+ {
+ "id": 0,
+ "fullName": "string"
+ }
+ ],
+ "status": "available"
+ }
+ }
+ response = MockResponse(data=json.dumps(data))
+
+ deserialized = self.deserialize(response,
+ ({str: (pet.Pet,)},), True)
+ self.assertTrue(isinstance(deserialized, dict))
+ self.assertTrue(isinstance(deserialized['pet'], pet.Pet))
+
+ def test_deserialize_dict_str_dog(self):
+ """ deserialize dict(str, Dog), use discriminator
+ This will fail because additional_properties_type is None in Animal and it must be defined as any type
+ to allow in the property breed which is not defined in Animal, it is defined in Dog
+ """
+ with self.assertRaises(petstore_api.exceptions.ApiValueError):
+ data = {
+ 'dog': {
+ "className": "Dog",
+ "color": "white",
+ "breed": "Jack Russel Terrier"
+ }
+ }
+ response = MockResponse(data=json.dumps(data))
+
+ deserialized = self.deserialize(response,
+ ({str: (animal.Animal,)},), True)
+
+ def test_deserialize_lizard(self):
+ """ deserialize ChildLizard, use discriminator
+ because additional_properties_type is None in ChildLizardAllOf
+ we are unable to use the discriminator
+ For this to work correctly, additional_properties_type must allow in any type
+ Then in ChildLizardAllOf defines the property pet_type and allows in lovesRocks as an additionalProperty
+ """
+ with self.assertRaises(petstore_api.exceptions.ApiValueError):
+ data = {
+ "pet_type": "ChildLizard",
+ "lovesRocks": True
+ }
+ response = MockResponse(data=json.dumps(data))
+
+ lizard = self.deserialize(response,
+ (parent_pet.ParentPet,), True)
+
+ def test_deserialize_dict_str_int(self):
+ """ deserialize dict(str, int) """
+ data = {
+ 'integer': 1
+ }
+ response = MockResponse(data=json.dumps(data))
+
+ deserialized = self.deserialize(response, ({str: (int,)},), True)
+ self.assertTrue(isinstance(deserialized, dict))
+ self.assertTrue(isinstance(deserialized['integer'], int))
+
+ def test_deserialize_str(self):
+ """ deserialize str """
+ data = "test str"
+ response = MockResponse(data=json.dumps(data))
+
+ deserialized = self.deserialize(response, (str,), True)
+ self.assertTrue(isinstance(deserialized, str))
+
+ def test_deserialize_date(self):
+ """ deserialize date """
+ data = "1997-07-16"
+ response = MockResponse(data=json.dumps(data))
+
+ deserialized = self.deserialize(response, (datetime.date,), True)
+ self.assertTrue(isinstance(deserialized, datetime.date))
+
+ def test_deserialize_datetime(self):
+ """ deserialize datetime """
+ data = "1997-07-16T19:20:30.45+01:00"
+ response = MockResponse(data=json.dumps(data))
+
+ deserialized = self.deserialize(response, (datetime.datetime,), True)
+ self.assertTrue(isinstance(deserialized, datetime.datetime))
+
+ def test_deserialize_pet(self):
+ """ deserialize pet """
+ data = {
+ "id": 0,
+ "category": {
+ "id": 0,
+ "name": "string"
+ },
+ "name": "doggie",
+ "photoUrls": [
+ "string"
+ ],
+ "tags": [
+ {
+ "id": 0,
+ "fullName": "string"
+ }
+ ],
+ "status": "available"
+ }
+ response = MockResponse(data=json.dumps(data))
+
+ deserialized = self.deserialize(response, (pet.Pet,), True)
+ self.assertTrue(isinstance(deserialized, pet.Pet))
+ self.assertEqual(deserialized.id, 0)
+ self.assertEqual(deserialized.name, "doggie")
+ self.assertTrue(isinstance(deserialized.category, category.Category))
+ self.assertEqual(deserialized.category.name, "string")
+ self.assertTrue(isinstance(deserialized.tags, list))
+ self.assertEqual(deserialized.tags[0].full_name, "string")
+
+ def test_deserialize_list_of_pet(self):
+ """ deserialize list[Pet] """
+ data = [
+ {
+ "id": 0,
+ "category": {
+ "id": 0,
+ "name": "string"
+ },
+ "name": "doggie0",
+ "photoUrls": [
+ "string"
+ ],
+ "tags": [
+ {
+ "id": 0,
+ "fullName": "string"
+ }
+ ],
+ "status": "available"
+ },
+ {
+ "id": 1,
+ "category": {
+ "id": 0,
+ "name": "string"
+ },
+ "name": "doggie1",
+ "photoUrls": [
+ "string"
+ ],
+ "tags": [
+ {
+ "id": 0,
+ "fullName": "string"
+ }
+ ],
+ "status": "available"
+ }]
+ response = MockResponse(data=json.dumps(data))
+
+ deserialized = self.deserialize(response,
+ ([pet.Pet],), True)
+ self.assertTrue(isinstance(deserialized, list))
+ self.assertTrue(isinstance(deserialized[0], pet.Pet))
+ self.assertEqual(deserialized[0].id, 0)
+ self.assertEqual(deserialized[1].id, 1)
+ self.assertEqual(deserialized[0].name, "doggie0")
+ self.assertEqual(deserialized[1].name, "doggie1")
+
+ def test_deserialize_nested_dict(self):
+ """ deserialize dict(str, dict(str, int)) """
+ data = {
+ "foo": {
+ "bar": 1
+ }
+ }
+ response = MockResponse(data=json.dumps(data))
+
+ deserialized = self.deserialize(response,
+ ({str: ({str: (int,)},)},), True)
+ self.assertTrue(isinstance(deserialized, dict))
+ self.assertTrue(isinstance(deserialized["foo"], dict))
+ self.assertTrue(isinstance(deserialized["foo"]["bar"], int))
+
+ def test_deserialize_nested_list(self):
+ """ deserialize list[list[str]] """
+ data = [["foo"]]
+ response = MockResponse(data=json.dumps(data))
+
+ deserialized = self.deserialize(response, ([[str]],), True)
+ self.assertTrue(isinstance(deserialized, list))
+ self.assertTrue(isinstance(deserialized[0], list))
+ self.assertTrue(isinstance(deserialized[0][0], str))
+
+ def test_deserialize_none(self):
+ """ deserialize None """
+ response = MockResponse(data=json.dumps(None))
+
+ error_msg = (
+ "Invalid type for variable 'received_data'. Required value type is "
+ "datetime and passed type was NoneType at ['received_data']"
+ )
+ with self.assertRaises(ApiTypeError) as exc:
+ deserialized = self.deserialize(response, (datetime.datetime,), True)
+ self.assertEqual(str(exc.exception), error_msg)
+
+ def test_deserialize_OuterEnum(self):
+ """ deserialize OuterEnum """
+ # make sure that an exception is thrown on an invalid value
+ with self.assertRaises(ApiValueError):
+ self.deserialize(
+ MockResponse(data=json.dumps("test str")),
+ (string_enum.StringEnum,),
+ True
+ )
+
+ # valid value works
+ placed_str = (
+ string_enum.StringEnum.allowed_values[('value',)]["PLACED"]
+ )
+ response = MockResponse(data=json.dumps(placed_str))
+ deserialized = self.deserialize(response,
+ (string_enum.StringEnum,), True)
+ self.assertTrue(isinstance(deserialized, string_enum.StringEnum))
+ self.assertTrue(deserialized.value == placed_str)
+
+ def test_deserialize_NumberWithValidations(self):
+ """ deserialize NumberWithValidations """
+ # make sure that an exception is thrown on an invalid type value
+ with self.assertRaises(ApiTypeError):
+ deserialized = self.deserialize(
+ MockResponse(data=json.dumps("test str")),
+ (number_with_validations.NumberWithValidations,),
+ True
+ )
+
+ # make sure that an exception is thrown on an invalid value
+ with self.assertRaises(ApiValueError):
+ deserialized = self.deserialize(
+ MockResponse(data=json.dumps(21.0)),
+ (number_with_validations.NumberWithValidations,),
+ True
+ )
+
+ # valid value works
+ number_val = 11.0
+ response = MockResponse(data=json.dumps(number_val))
+ number = self.deserialize(response,
+ (number_with_validations.NumberWithValidations,), True)
+ self.assertTrue(isinstance(number, number_with_validations.NumberWithValidations))
+ self.assertTrue(number.value == number_val)
+
+ def test_deserialize_file(self):
+ """Ensures that file deserialization works"""
+ response_types_mixed = (file_type,)
+
+ # sample from http://www.jtricks.com/download-text
+ HTTPResponse = namedtuple(
+ 'urllib3_response_HTTPResponse',
+ ['status', 'reason', 'data', 'getheaders', 'getheader']
+ )
+ headers = {'Content-Disposition': 'attachment; filename=content.txt'}
+ def get_headers():
+ return headers
+ def get_header(name, default=None):
+ return headers.get(name, default)
+ file_data = (
+ "You are reading text file that was supposed to be downloaded\r\n"
+ "to your hard disk. If your browser offered to save you the file,"
+ "\r\nthen it handled the Content-Disposition header correctly."
+ )
+ http_response = HTTPResponse(
+ status=200,
+ reason='OK',
+ data=file_data,
+ getheaders=get_headers,
+ getheader=get_header
+ )
+ # response which is deserialized to a file
+ mock_response = RESTResponse(http_response)
+ file_path = None
+ try:
+ file_object = self.deserialize(
+ mock_response, response_types_mixed, True)
+ self.assertTrue(isinstance(file_object, file_type))
+ file_path = file_object.name
+ self.assertFalse(file_object.closed)
+ file_object.close()
+ if six.PY3:
+ file_data = file_data.encode('utf-8')
+ with open(file_path, 'rb') as other_file_object:
+ self.assertEqual(other_file_object.read(), file_data)
+ finally:
+ os.unlink(file_path)
+
+ def test_deserialize_binary_to_str(self):
+ """Ensures that bytes deserialization works"""
+ response_types_mixed = (str,)
+
+ # sample from http://www.jtricks.com/download-text
+ HTTPResponse = namedtuple(
+ 'urllib3_response_HTTPResponse',
+ ['status', 'reason', 'data', 'getheaders', 'getheader']
+ )
+ headers = {}
+ def get_headers():
+ return headers
+ def get_header(name, default=None):
+ return headers.get(name, default)
+ data = "str"
+
+ http_response = HTTPResponse(
+ status=200,
+ reason='OK',
+ data=json.dumps(data).encode("utf-8") if six.PY3 else json.dumps(data),
+ getheaders=get_headers,
+ getheader=get_header
+ )
+
+ mock_response = RESTResponse(http_response)
+
+ result = self.deserialize(mock_response, response_types_mixed, True)
+ self.assertEqual(isinstance(result, str), True)
+ self.assertEqual(result, data)
+
+ def test_deserialize_string_boolean_map(self):
+ """
+ Ensures that string boolean (additional properties)
+ deserialization works
+ """
+ # make sure that an exception is thrown on an invalid type
+ with self.assertRaises(ApiTypeError):
+ deserialized = self.deserialize(
+ MockResponse(data=json.dumps("test str")),
+ (string_boolean_map.StringBooleanMap,),
+ True
+ )
+
+ # valid value works
+ item_val = {'some_key': True}
+ response = MockResponse(data=json.dumps(item_val))
+ model = string_boolean_map.StringBooleanMap(**item_val)
+ deserialized = self.deserialize(response,
+ (string_boolean_map.StringBooleanMap,), True)
+ self.assertTrue(isinstance(deserialized, string_boolean_map.StringBooleanMap))
+ self.assertTrue(deserialized['some_key'] == True)
+ self.assertTrue(deserialized == model)
+
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/tests/test_pet_api.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/tests/test_pet_api.py
new file mode 100644
index 00000000000..38d7a1cc0b8
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/tests/test_pet_api.py
@@ -0,0 +1,406 @@
+# coding: utf-8
+
+# flake8: noqa
+
+"""
+Run the tests.
+$ docker pull swaggerapi/petstore
+$ docker run -d -e SWAGGER_HOST=http://petstore.swagger.io -e SWAGGER_BASE_PATH=/v2 -p 80:8080 swaggerapi/petstore
+$ pip install nose (optional)
+$ cd petstore_api-python
+$ nosetests -v
+"""
+
+from collections import namedtuple
+import json
+import os
+import unittest
+
+import petstore_api
+from petstore_api import Configuration
+from petstore_api.rest import (
+ RESTClientObject,
+ RESTResponse
+)
+
+import six
+
+from petstore_api.exceptions import (
+ ApiException,
+ ApiValueError,
+ ApiTypeError,
+)
+from petstore_api.api.pet_api import PetApi
+from petstore_api.model import pet
+from .util import id_gen
+
+import urllib3
+
+if six.PY3:
+ from unittest.mock import patch
+else:
+ from mock import patch
+
+HOST = 'http://localhost/v2'
+
+
+class TimeoutWithEqual(urllib3.Timeout):
+ def __init__(self, *arg, **kwargs):
+ super(TimeoutWithEqual, self).__init__(*arg, **kwargs)
+
+ def __eq__(self, other):
+ return self._read == other._read and self._connect == other._connect and self.total == other.total
+
+
+class MockPoolManager(object):
+ def __init__(self, tc):
+ self._tc = tc
+ self._reqs = []
+
+ def expect_request(self, *args, **kwargs):
+ self._reqs.append((args, kwargs))
+
+ def request(self, *args, **kwargs):
+ self._tc.assertTrue(len(self._reqs) > 0)
+ r = self._reqs.pop(0)
+ self._tc.maxDiff = None
+ self._tc.assertEqual(r[0], args)
+ self._tc.assertEqual(r[1], kwargs)
+ return urllib3.HTTPResponse(status=200, body=b'test')
+
+
+class PetApiTests(unittest.TestCase):
+
+ def setUp(self):
+ config = Configuration()
+ config.host = HOST
+ config.access_token = 'ACCESS_TOKEN'
+ self.api_client = petstore_api.ApiClient(config)
+ self.pet_api = PetApi(self.api_client)
+ self.setUpModels()
+ self.setUpFiles()
+
+ def setUpModels(self):
+ from petstore_api.model import category, tag
+ self.category = category.Category()
+ self.category.id = id_gen()
+ self.category.name = "dog"
+ self.tag = tag.Tag()
+ self.tag.id = id_gen()
+ self.tag.name = "python-pet-tag"
+ self.pet = pet.Pet(name="hello kity", photo_urls=["http://foo.bar.com/1", "http://foo.bar.com/2"])
+ self.pet.id = id_gen()
+ self.pet.status = "sold"
+ self.pet.category = self.category
+ self.pet.tags = [self.tag]
+
+ def setUpFiles(self):
+ self.test_file_dir = os.path.join(os.path.dirname(__file__), "..", "testfiles")
+ self.test_file_dir = os.path.realpath(self.test_file_dir)
+
+ def test_preload_content_flag(self):
+ self.pet_api.add_pet(self.pet)
+
+ resp = self.pet_api.find_pets_by_status(status=[self.pet.status], _preload_content=False)
+
+ # return response should at least have read and close methods.
+ self.assertTrue(hasattr(resp, 'read'))
+ self.assertTrue(hasattr(resp, 'close'))
+
+ # Also we need to make sure we can release the connection to a pool (if exists) when we are done with it.
+ self.assertTrue(hasattr(resp, 'release_conn'))
+
+ # Right now, the client returns urllib3.HTTPResponse. If that changed in future, it is probably a breaking
+ # change, however supporting above methods should be enough for most usecases. Remove this test case if
+ # we followed the breaking change procedure for python client (e.g. increasing major version).
+ self.assertTrue(resp.__class__, 'urllib3.response.HTTPResponse')
+
+ resp.close()
+ resp.release_conn()
+
+ def test_config(self):
+ config = Configuration(host=HOST)
+ self.assertIsNotNone(config.get_host_settings())
+ self.assertEqual(config.get_basic_auth_token(),
+ urllib3.util.make_headers(basic_auth=":").get('authorization'))
+ # No authentication scheme has been configured at this point, so auth_settings()
+ # should return an empty list.
+ self.assertEqual(len(config.auth_settings()), 0)
+ # Configure OAuth2 access token and verify the auth_settings have OAuth2 parameters.
+ config.access_token = 'MY-ACCESS_TOKEN'
+ self.assertEqual(len(config.auth_settings()), 1)
+ self.assertIn("petstore_auth", config.auth_settings().keys())
+ config.username = "user"
+ config.password = "password"
+ self.assertEqual(
+ config.get_basic_auth_token(),
+ urllib3.util.make_headers(basic_auth="user:password").get('authorization'))
+ self.assertEqual(len(config.auth_settings()), 2)
+ self.assertIn("petstore_auth", config.auth_settings().keys())
+ self.assertIn("http_basic_test", config.auth_settings().keys())
+ config.username = None
+ config.password = None
+ self.assertEqual(len(config.auth_settings()), 1)
+ self.assertIn("petstore_auth", config.auth_settings().keys())
+
+ def test_timeout(self):
+ mock_pool = MockPoolManager(self)
+ self.api_client.rest_client.pool_manager = mock_pool
+
+ mock_pool.expect_request('POST', 'http://localhost/v2/pet',
+ body=json.dumps(self.api_client.sanitize_for_serialization(self.pet)),
+ headers={'Content-Type': 'application/json',
+ 'Authorization': 'Bearer ACCESS_TOKEN',
+ 'User-Agent': 'OpenAPI-Generator/1.0.0/python'},
+ preload_content=True, timeout=TimeoutWithEqual(total=5))
+ mock_pool.expect_request('POST', 'http://localhost/v2/pet',
+ body=json.dumps(self.api_client.sanitize_for_serialization(self.pet)),
+ headers={'Content-Type': 'application/json',
+ 'Authorization': 'Bearer ACCESS_TOKEN',
+ 'User-Agent': 'OpenAPI-Generator/1.0.0/python'},
+ preload_content=True, timeout=TimeoutWithEqual(connect=1, read=2))
+
+ self.pet_api.add_pet(self.pet, _request_timeout=5)
+ self.pet_api.add_pet(self.pet, _request_timeout=(1, 2))
+
+ def test_separate_default_client_instances(self):
+ pet_api = PetApi()
+ pet_api2 = PetApi()
+ self.assertNotEqual(pet_api.api_client, pet_api2.api_client)
+
+ pet_api.api_client.user_agent = 'api client 3'
+ pet_api2.api_client.user_agent = 'api client 4'
+
+ self.assertNotEqual(pet_api.api_client.user_agent, pet_api2.api_client.user_agent)
+
+ def test_separate_default_config_instances(self):
+ pet_api = PetApi()
+ pet_api2 = PetApi()
+ self.assertNotEqual(pet_api.api_client.configuration, pet_api2.api_client.configuration)
+
+ pet_api.api_client.configuration.host = 'somehost'
+ pet_api2.api_client.configuration.host = 'someotherhost'
+ self.assertNotEqual(pet_api.api_client.configuration.host, pet_api2.api_client.configuration.host)
+
+ def test_async_request(self):
+ thread = self.pet_api.add_pet(self.pet, async_req=True)
+ response = thread.get()
+ self.assertIsNone(response)
+
+ thread = self.pet_api.get_pet_by_id(self.pet.id, async_req=True)
+ result = thread.get()
+ self.assertIsInstance(result, pet.Pet)
+
+ def test_async_with_result(self):
+ self.pet_api.add_pet(self.pet, async_req=False)
+
+ thread = self.pet_api.get_pet_by_id(self.pet.id, async_req=True)
+ thread2 = self.pet_api.get_pet_by_id(self.pet.id, async_req=True)
+
+ response = thread.get()
+ response2 = thread2.get()
+
+ self.assertEqual(response.id, self.pet.id)
+ self.assertIsNotNone(response2.id, self.pet.id)
+
+ def test_async_with_http_info(self):
+ self.pet_api.add_pet(self.pet)
+
+ thread = self.pet_api.get_pet_by_id(self.pet.id, async_req=True,
+ _return_http_data_only=False)
+ data, status, headers = thread.get()
+
+ self.assertIsInstance(data, pet.Pet)
+ self.assertEqual(status, 200)
+
+ def test_async_exception(self):
+ self.pet_api.add_pet(self.pet)
+
+ thread = self.pet_api.get_pet_by_id(-9999999999999, async_req=True)
+
+ exception = None
+ try:
+ thread.get()
+ except ApiException as e:
+ exception = e
+
+ self.assertIsInstance(exception, ApiException)
+ self.assertEqual(exception.status, 404)
+
+ def test_add_pet_and_get_pet_by_id(self):
+ self.pet_api.add_pet(self.pet)
+
+ fetched = self.pet_api.get_pet_by_id(pet_id=self.pet.id)
+ self.assertIsNotNone(fetched)
+ self.assertEqual(self.pet.id, fetched.id)
+ self.assertIsNotNone(fetched.category)
+ self.assertEqual(self.pet.category.name, fetched.category.name)
+
+ def test_add_pet_and_get_pet_by_id_with_http_info(self):
+ self.pet_api.add_pet(self.pet)
+
+ fetched = self.pet_api.get_pet_by_id(
+ pet_id=self.pet.id,
+ _return_http_data_only=False
+ )
+ self.assertIsNotNone(fetched)
+ self.assertEqual(self.pet.id, fetched[0].id)
+ self.assertIsNotNone(fetched[0].category)
+ self.assertEqual(self.pet.category.name, fetched[0].category.name)
+
+ def test_update_pet(self):
+ self.pet.name = "hello kity with updated"
+ self.pet_api.update_pet(self.pet)
+
+ fetched = self.pet_api.get_pet_by_id(pet_id=self.pet.id)
+ self.assertIsNotNone(fetched)
+ self.assertEqual(self.pet.id, fetched.id)
+ self.assertEqual(self.pet.name, fetched.name)
+ self.assertIsNotNone(fetched.category)
+ self.assertEqual(fetched.category.name, self.pet.category.name)
+
+ def test_find_pets_by_status(self):
+ self.pet_api.add_pet(self.pet)
+
+ self.assertIn(
+ self.pet.id,
+ list(map(lambda x: getattr(x, 'id'), self.pet_api.find_pets_by_status(status=[self.pet.status])))
+ )
+
+ def test_find_pets_by_tags(self):
+ self.pet_api.add_pet(self.pet)
+
+ self.assertIn(
+ self.pet.id,
+ list(map(lambda x: getattr(x, 'id'), self.pet_api.find_pets_by_tags(tags=[self.tag.name])))
+ )
+
+ def test_update_pet_with_form(self):
+ self.pet_api.add_pet(self.pet)
+
+ name = "hello kity with form updated"
+ status = "pending"
+ self.pet_api.update_pet_with_form(pet_id=self.pet.id, name=name, status=status)
+
+ fetched = self.pet_api.get_pet_by_id(pet_id=self.pet.id)
+ self.assertEqual(self.pet.id, fetched.id)
+ self.assertEqual(name, fetched.name)
+ self.assertEqual(status, fetched.status)
+
+ def test_upload_file(self):
+ # upload file with form parameter
+ file_path1 = os.path.join(self.test_file_dir, "1px_pic1.png")
+ file_path2 = os.path.join(self.test_file_dir, "1px_pic2.png")
+ try:
+ file = open(file_path1, "rb")
+ additional_metadata = "special"
+ self.pet_api.upload_file(
+ pet_id=self.pet.id,
+ additional_metadata=additional_metadata,
+ file=file
+ )
+ except ApiException as e:
+ self.fail("upload_file() raised {0} unexpectedly".format(type(e)))
+ finally:
+ file.close()
+
+ # upload only one file
+ try:
+ file = open(file_path1, "rb")
+ self.pet_api.upload_file(pet_id=self.pet.id, file=file)
+ except ApiException as e:
+ self.fail("upload_file() raised {0} unexpectedly".format(type(e)))
+ finally:
+ file.close()
+
+ # upload multiple files
+ HTTPResponse = namedtuple(
+ 'urllib3_response_HTTPResponse',
+ ['status', 'reason', 'data', 'getheaders', 'getheader']
+ )
+ headers = {}
+ def get_headers():
+ return headers
+ def get_header(name, default=None):
+ return headers.get(name, default)
+ api_respponse = {
+ 'code': 200,
+ 'type': 'blah',
+ 'message': 'file upload succeeded'
+ }
+ http_response = HTTPResponse(
+ status=200,
+ reason='OK',
+ data=json.dumps(api_respponse).encode('utf-8'),
+ getheaders=get_headers,
+ getheader=get_header
+ )
+ mock_response = RESTResponse(http_response)
+ try:
+ file1 = open(file_path1, "rb")
+ file2 = open(file_path2, "rb")
+ with patch.object(RESTClientObject, 'request') as mock_method:
+ mock_method.return_value = mock_response
+ res = self.pet_api.upload_file(
+ pet_id=684696917, files=[file1, file2])
+ mock_method.assert_called_with(
+ 'POST',
+ 'http://localhost/v2/pet/684696917/uploadImage',
+ _preload_content=True,
+ _request_timeout=None,
+ body=None,
+ headers={
+ 'Accept': 'application/json',
+ 'Content-Type': 'multipart/form-data',
+ 'User-Agent': 'OpenAPI-Generator/1.0.0/python',
+ 'Authorization': 'Bearer ACCESS_TOKEN'
+ },
+ post_params=[
+ ('files', ('1px_pic1.png', b'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x01\x00\x00\x00\x01\x08\x00\x00\x00\x00:~\x9bU\x00\x00\x00\nIDATx\x9cc\xfa\x0f\x00\x01\x05\x01\x02\xcf\xa0.\xcd\x00\x00\x00\x00IEND\xaeB`\x82', 'image/png')),
+ ('files', ('1px_pic2.png', b'\x89PNG\r\n\x1a\n\x00\x00\x00\rIHDR\x00\x00\x00\x01\x00\x00\x00\x01\x08\x00\x00\x00\x00:~\x9bU\x00\x00\x00\nIDATx\x9cc\xfa\x0f\x00\x01\x05\x01\x02\xcf\xa0.\xcd\x00\x00\x00\x00IEND\xaeB`\x82', 'image/png'))
+ ],
+ query_params=[]
+ )
+ except ApiException as e:
+ self.fail("upload_file() raised {0} unexpectedly".format(type(e)))
+ finally:
+ file1.close()
+ file2.close()
+
+ # passing in an array of files to when file only allows one
+ # raises an exceptions
+ try:
+ file = open(file_path1, "rb")
+ with self.assertRaises(ApiTypeError) as exc:
+ self.pet_api.upload_file(pet_id=self.pet.id, file=[file])
+ finally:
+ file.close()
+
+ # passing in a single file when an array of file is required
+ # raises an exception
+ try:
+ file = open(file_path1, "rb")
+ with self.assertRaises(ApiTypeError) as exc:
+ self.pet_api.upload_file(pet_id=self.pet.id, files=file)
+ finally:
+ file.close()
+
+ # passing in a closed file raises an exception
+ with self.assertRaises(ApiValueError) as exc:
+ file = open(file_path1, "rb")
+ file.close()
+ self.pet_api.upload_file(pet_id=self.pet.id, file=file)
+
+
+ def test_delete_pet(self):
+ self.pet_api.add_pet(self.pet)
+ self.pet_api.delete_pet(pet_id=self.pet.id, api_key="special-key")
+
+ try:
+ self.pet_api.get_pet_by_id(pet_id=self.pet.id)
+ raise Exception("expected an error")
+ except ApiException as e:
+ self.assertEqual(404, e.status)
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/tests/test_serialization.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/tests/test_serialization.py
new file mode 100644
index 00000000000..1f718ecca6b
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/tests/test_serialization.py
@@ -0,0 +1,78 @@
+# coding: utf-8
+
+# flake8: noqa
+
+"""
+Run the tests.
+$ pip install nose (optional)
+$ cd OpenAPIPetstore-python
+$ nosetests -v
+"""
+from collections import namedtuple
+import json
+import os
+import time
+import unittest
+import datetime
+
+import six
+
+import petstore_api
+
+from petstore_api.exceptions import (
+ ApiTypeError,
+ ApiKeyError,
+ ApiValueError,
+)
+from petstore_api.model import (
+ enum_test,
+ pet,
+ animal,
+ dog,
+ parent_pet,
+ child_lizard,
+ category,
+ string_enum,
+ string_boolean_map,
+)
+from petstore_api.model_utils import (
+ file_type,
+ model_to_dict,
+)
+
+from petstore_api.rest import RESTResponse
+
+MockResponse = namedtuple('MockResponse', 'data')
+
+class SerializationTests(unittest.TestCase):
+
+ def setUp(self):
+ self.api_client = petstore_api.ApiClient()
+ self.serialize = self.api_client.sanitize_for_serialization
+
+ def test_enum_test(self):
+ """ serialize dict(str, Enum_Test) """
+ value = (
+ string_enum.StringEnum.allowed_values[('value',)]["PLACED"])
+ string_enum_val = string_enum.StringEnum(value)
+
+ source = enum_test.EnumTest(
+ enum_string="UPPER",
+ enum_string_required="lower",
+ enum_integer=1,
+ enum_number=1.1,
+ string_enum=string_enum_val
+ )
+
+ result = {
+ 'enum_test': {
+ "enum_string": "UPPER",
+ "enum_string_required": "lower",
+ "enum_integer": 1,
+ "enum_number": 1.1,
+ "stringEnum": "placed"
+ }
+ }
+ serialized = self.serialize({"enum_test": source})
+
+ self.assertEqual(result, serialized)
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/tests/test_store_api.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/tests/test_store_api.py
new file mode 100644
index 00000000000..a7c1d5dd667
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/tests/test_store_api.py
@@ -0,0 +1,32 @@
+# coding: utf-8
+
+# flake8: noqa
+
+"""
+Run the tests.
+$ pip install nose (optional)
+$ cd OpenAP/Petstore-python
+$ nosetests -v
+"""
+
+import os
+import time
+import unittest
+
+import petstore_api
+from petstore_api.api.store_api import StoreApi
+
+
+class StoreApiTests(unittest.TestCase):
+
+ def setUp(self):
+ self.store_api = StoreApi()
+
+ def tearDown(self):
+ # sleep 1 sec between two every 2 tests
+ time.sleep(1)
+
+ def test_get_inventory(self):
+ data = self.store_api.get_inventory()
+ self.assertIsNotNone(data)
+ self.assertTrue(isinstance(data, dict))
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/tests/util.py b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/tests/util.py
new file mode 100644
index 00000000000..113d7dcc547
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/tests/util.py
@@ -0,0 +1,8 @@
+# flake8: noqa
+
+import random
+
+
+def id_gen(bits=32):
+ """ Returns a n-bit randomly generated int """
+ return int(random.getrandbits(bits))
diff --git a/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/tox.ini b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/tox.ini
new file mode 100644
index 00000000000..8989fc3c4d9
--- /dev/null
+++ b/samples/client/petstore/python_disallowAdditionalPropertiesIfNotPresent/tox.ini
@@ -0,0 +1,9 @@
+[tox]
+envlist = py3
+
+[testenv]
+deps=-r{toxinidir}/requirements.txt
+ -r{toxinidir}/test-requirements.txt
+
+commands=
+ pytest --cov=petstore_api
diff --git a/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION b/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION
+++ b/samples/client/petstore/ruby-faraday/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore.rb b/samples/client/petstore/ruby-faraday/lib/petstore.rb
index 750c4b903cc..2634c4d132e 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb
index ce4ac8abfb0..6145ff7431c 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/another_fake_api.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb
index 0cac8c1d547..9d3dc978d09 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/default_api.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb
index 703f5be95bc..2155182abf5 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_api.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb
index bfd8f5f7d7a..fd68ab47773 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/fake_classname_tags123_api.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb
index aa43ca8995a..4754887194d 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/pet_api.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/store_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/store_api.rb
index c0485eb645f..3851c7b2ab6 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/api/store_api.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/store_api.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb
index 8ea4b4b0e97..73bca582e26 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/api/user_api.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb
index 598c32af2cd..c50394c22f2 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/api_client.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb b/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb
index 1d38fc1aca0..124c188d8d8 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/api_error.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb b/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb
index 1de0fcf41e4..9b2851dfaa0 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/configuration.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb
index 8b98afa53b4..01b2eb58d7f 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/additional_properties_class.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb
index 1a7dc7d3ed2..8e737d582c8 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/animal.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb
index 1bc05a75bbd..2bbfba46c3f 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/api_response.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb
index 755de673b07..057c5b787b6 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_array_of_number_only.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb
index be18224cb87..9585dd80a6b 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_of_number_only.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb
index 15f80037208..583ea424607 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/array_test.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb
index f36ec2ebde4..0d698fee60f 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/capitalization.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb
index 1f5c40a46a7..984aee85a08 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb
index a0c998e55b4..cca5e6828b3 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/cat_all_of.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb
index fa15320508a..3bdce1b83f3 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/category.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb
index f97739dde24..d185566668f 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/class_model.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb
index de38da9d835..7f6d0947223 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/client.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb
index ed52da3e9bd..9874575bd0b 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb
index 5e12984f123..62839a7cb13 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/dog_all_of.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb
index 6ffd8325e87..e281d2ddc46 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_arrays.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb
index 0e611fe2698..6c44023fb2b 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_class.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb
index daf17b6cde4..d3416f495ac 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/enum_test.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb
index c5b378b1153..76ee9955810 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/file.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb
index 5d9ddb6ad31..c07f1a43ea0 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/file_schema_test_class.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb
index a1d50615e29..54eb0760f5e 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/foo.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb
index ee5e962dab5..0c57d78ac25 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/format_test.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb
index de132288ac7..3fe1977ba7d 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/has_only_read_only.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb
index 07dac1b3702..aebfc27084e 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/health_check_result.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb
index d2db203c92e..2eb6b88a224 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/inline_response_default.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb
index 09cddbfab59..f04fceff81b 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/list.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb
index 251717f5ac7..552d9ae330a 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/map_test.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb
index 44cb070f172..bf90d3cd06f 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/mixed_properties_and_additional_properties_class.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb
index bbaf3e60bfd..bad3bfcce3a 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/model200_response.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb
index 9da6725291c..d33b1bf1dac 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/model_return.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb
index 50dd9118530..6a1777a426d 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/name.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb
index 10c24d4031e..3d0d81a7444 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/nullable_class.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb
index 200e60e7e77..7359f1b1115 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/number_only.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb
index a1bff1b538a..6778c4b97fb 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/order.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb
index b1ce3365bbc..b6d4bd88ace 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_composite.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb
index 039001bac65..92a7aac382b 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb
index 67ac727cfc3..7097f7d9fb9 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_default_value.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb
index 6a8eb37afca..30c26017cc7 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb
index 3b92319f0a9..a95eab63a6e 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_enum_integer_default_value.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_object_with_enum_property.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_object_with_enum_property.rb
index 03c36edddf9..6950269d997 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_object_with_enum_property.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/outer_object_with_enum_property.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb
index 446b3a2b77c..c810bf54845 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/pet.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb
index 15d4a7eb39a..53774ce12d4 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/read_only_first.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb
index 7c19a2802e3..06d53c68ff0 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/special_model_name.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb
index a6231b218d5..b9a14f57974 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/tag.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb b/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb
index 1753e0fdc62..c1f7816f475 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/models/user.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/lib/petstore/version.rb b/samples/client/petstore/ruby-faraday/lib/petstore/version.rb
index e3af89cab0a..ab3b0dfefbd 100644
--- a/samples/client/petstore/ruby-faraday/lib/petstore/version.rb
+++ b/samples/client/petstore/ruby-faraday/lib/petstore/version.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/petstore.gemspec b/samples/client/petstore/ruby-faraday/petstore.gemspec
index c2049891367..06a7eb1a52c 100644
--- a/samples/client/petstore/ruby-faraday/petstore.gemspec
+++ b/samples/client/petstore/ruby-faraday/petstore.gemspec
@@ -8,7 +8,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb b/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb
index 6636d136dc2..05a5580fd4d 100644
--- a/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb
+++ b/samples/client/petstore/ruby-faraday/spec/api_client_spec.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb b/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb
index e74a5700c11..10c9510b239 100644
--- a/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb
+++ b/samples/client/petstore/ruby-faraday/spec/configuration_spec.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby-faraday/spec/spec_helper.rb b/samples/client/petstore/ruby-faraday/spec/spec_helper.rb
index 10b289fbb9c..86d92cda2b9 100644
--- a/samples/client/petstore/ruby-faraday/spec/spec_helper.rb
+++ b/samples/client/petstore/ruby-faraday/spec/spec_helper.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/.openapi-generator/VERSION b/samples/client/petstore/ruby/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/ruby/.openapi-generator/VERSION
+++ b/samples/client/petstore/ruby/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/ruby/lib/petstore.rb b/samples/client/petstore/ruby/lib/petstore.rb
index 750c4b903cc..2634c4d132e 100644
--- a/samples/client/petstore/ruby/lib/petstore.rb
+++ b/samples/client/petstore/ruby/lib/petstore.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb
index ce4ac8abfb0..6145ff7431c 100644
--- a/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb
+++ b/samples/client/petstore/ruby/lib/petstore/api/another_fake_api.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/api/default_api.rb b/samples/client/petstore/ruby/lib/petstore/api/default_api.rb
index 0cac8c1d547..9d3dc978d09 100644
--- a/samples/client/petstore/ruby/lib/petstore/api/default_api.rb
+++ b/samples/client/petstore/ruby/lib/petstore/api/default_api.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb
index 703f5be95bc..2155182abf5 100644
--- a/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb
+++ b/samples/client/petstore/ruby/lib/petstore/api/fake_api.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb
index bfd8f5f7d7a..fd68ab47773 100644
--- a/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb
+++ b/samples/client/petstore/ruby/lib/petstore/api/fake_classname_tags123_api.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb
index 5d3469816c6..13b4b66578d 100644
--- a/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb
+++ b/samples/client/petstore/ruby/lib/petstore/api/pet_api.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb
index 410fc39481a..df456319b41 100644
--- a/samples/client/petstore/ruby/lib/petstore/api/store_api.rb
+++ b/samples/client/petstore/ruby/lib/petstore/api/store_api.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb
index b8ed9d8a55c..879e9eb4ad6 100644
--- a/samples/client/petstore/ruby/lib/petstore/api/user_api.rb
+++ b/samples/client/petstore/ruby/lib/petstore/api/user_api.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/api_client.rb b/samples/client/petstore/ruby/lib/petstore/api_client.rb
index df219df025a..3a1bf4bd35d 100644
--- a/samples/client/petstore/ruby/lib/petstore/api_client.rb
+++ b/samples/client/petstore/ruby/lib/petstore/api_client.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/api_error.rb b/samples/client/petstore/ruby/lib/petstore/api_error.rb
index 1d38fc1aca0..124c188d8d8 100644
--- a/samples/client/petstore/ruby/lib/petstore/api_error.rb
+++ b/samples/client/petstore/ruby/lib/petstore/api_error.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/configuration.rb b/samples/client/petstore/ruby/lib/petstore/configuration.rb
index ba6011b27cc..cc5e1929d67 100644
--- a/samples/client/petstore/ruby/lib/petstore/configuration.rb
+++ b/samples/client/petstore/ruby/lib/petstore/configuration.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb
index 8b98afa53b4..01b2eb58d7f 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/additional_properties_class.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/animal.rb b/samples/client/petstore/ruby/lib/petstore/models/animal.rb
index 1a7dc7d3ed2..8e737d582c8 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/animal.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/animal.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb
index 1bc05a75bbd..2bbfba46c3f 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/api_response.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/api_response.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb
index 755de673b07..057c5b787b6 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/array_of_array_of_number_only.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb
index be18224cb87..9585dd80a6b 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/array_of_number_only.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/array_test.rb b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb
index 15f80037208..583ea424607 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/array_test.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/array_test.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb b/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb
index f36ec2ebde4..0d698fee60f 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/capitalization.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/cat.rb b/samples/client/petstore/ruby/lib/petstore/models/cat.rb
index 1f5c40a46a7..984aee85a08 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/cat.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/cat.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb b/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb
index a0c998e55b4..cca5e6828b3 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/cat_all_of.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/category.rb b/samples/client/petstore/ruby/lib/petstore/models/category.rb
index fa15320508a..3bdce1b83f3 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/category.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/category.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/class_model.rb b/samples/client/petstore/ruby/lib/petstore/models/class_model.rb
index f97739dde24..d185566668f 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/class_model.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/class_model.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/client.rb b/samples/client/petstore/ruby/lib/petstore/models/client.rb
index de38da9d835..7f6d0947223 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/client.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/client.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/dog.rb b/samples/client/petstore/ruby/lib/petstore/models/dog.rb
index ed52da3e9bd..9874575bd0b 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/dog.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/dog.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb b/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb
index 5e12984f123..62839a7cb13 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/dog_all_of.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb
index 6ffd8325e87..e281d2ddc46 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/enum_arrays.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb
index 0e611fe2698..6c44023fb2b 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/enum_class.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb
index daf17b6cde4..d3416f495ac 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/enum_test.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/file.rb b/samples/client/petstore/ruby/lib/petstore/models/file.rb
index c5b378b1153..76ee9955810 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/file.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/file.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb b/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb
index 5d9ddb6ad31..c07f1a43ea0 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/file_schema_test_class.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/foo.rb b/samples/client/petstore/ruby/lib/petstore/models/foo.rb
index a1d50615e29..54eb0760f5e 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/foo.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/foo.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb
index ee5e962dab5..0c57d78ac25 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/format_test.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/format_test.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb b/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb
index de132288ac7..3fe1977ba7d 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/has_only_read_only.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb b/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb
index 07dac1b3702..aebfc27084e 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/health_check_result.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/inline_response_default.rb b/samples/client/petstore/ruby/lib/petstore/models/inline_response_default.rb
index d2db203c92e..2eb6b88a224 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/inline_response_default.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/inline_response_default.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/list.rb b/samples/client/petstore/ruby/lib/petstore/models/list.rb
index 09cddbfab59..f04fceff81b 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/list.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/list.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/map_test.rb b/samples/client/petstore/ruby/lib/petstore/models/map_test.rb
index 251717f5ac7..552d9ae330a 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/map_test.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/map_test.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb
index 44cb070f172..bf90d3cd06f 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/mixed_properties_and_additional_properties_class.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb b/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb
index bbaf3e60bfd..bad3bfcce3a 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/model200_response.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb
index 9da6725291c..d33b1bf1dac 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/model_return.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/model_return.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/name.rb b/samples/client/petstore/ruby/lib/petstore/models/name.rb
index 50dd9118530..6a1777a426d 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/name.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/name.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb b/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb
index 10c24d4031e..3d0d81a7444 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/nullable_class.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/number_only.rb b/samples/client/petstore/ruby/lib/petstore/models/number_only.rb
index 200e60e7e77..7359f1b1115 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/number_only.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/number_only.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/order.rb b/samples/client/petstore/ruby/lib/petstore/models/order.rb
index a1bff1b538a..6778c4b97fb 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/order.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/order.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb
index b1ce3365bbc..b6d4bd88ace 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/outer_composite.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb
index 039001bac65..92a7aac382b 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb
index 67ac727cfc3..7097f7d9fb9 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_default_value.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb
index 6a8eb37afca..30c26017cc7 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb
index 3b92319f0a9..a95eab63a6e 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/outer_enum_integer_default_value.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/outer_object_with_enum_property.rb b/samples/client/petstore/ruby/lib/petstore/models/outer_object_with_enum_property.rb
index 03c36edddf9..6950269d997 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/outer_object_with_enum_property.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/outer_object_with_enum_property.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/pet.rb b/samples/client/petstore/ruby/lib/petstore/models/pet.rb
index 446b3a2b77c..c810bf54845 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/pet.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/pet.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb
index 15d4a7eb39a..53774ce12d4 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/read_only_first.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb
index 7c19a2802e3..06d53c68ff0 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/special_model_name.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/tag.rb b/samples/client/petstore/ruby/lib/petstore/models/tag.rb
index a6231b218d5..b9a14f57974 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/tag.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/tag.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/models/user.rb b/samples/client/petstore/ruby/lib/petstore/models/user.rb
index 1753e0fdc62..c1f7816f475 100644
--- a/samples/client/petstore/ruby/lib/petstore/models/user.rb
+++ b/samples/client/petstore/ruby/lib/petstore/models/user.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/lib/petstore/version.rb b/samples/client/petstore/ruby/lib/petstore/version.rb
index e3af89cab0a..ab3b0dfefbd 100644
--- a/samples/client/petstore/ruby/lib/petstore/version.rb
+++ b/samples/client/petstore/ruby/lib/petstore/version.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/petstore.gemspec b/samples/client/petstore/ruby/petstore.gemspec
index ba5010c9ad3..fca963ec152 100644
--- a/samples/client/petstore/ruby/petstore.gemspec
+++ b/samples/client/petstore/ruby/petstore.gemspec
@@ -8,7 +8,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/spec/api_client_spec.rb b/samples/client/petstore/ruby/spec/api_client_spec.rb
index 84ddda3cd2f..663b8081006 100644
--- a/samples/client/petstore/ruby/spec/api_client_spec.rb
+++ b/samples/client/petstore/ruby/spec/api_client_spec.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/spec/configuration_spec.rb b/samples/client/petstore/ruby/spec/configuration_spec.rb
index e74a5700c11..10c9510b239 100644
--- a/samples/client/petstore/ruby/spec/configuration_spec.rb
+++ b/samples/client/petstore/ruby/spec/configuration_spec.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/ruby/spec/spec_helper.rb b/samples/client/petstore/ruby/spec/spec_helper.rb
index 10b289fbb9c..86d92cda2b9 100644
--- a/samples/client/petstore/ruby/spec/spec_helper.rb
+++ b/samples/client/petstore/ruby/spec/spec_helper.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION b/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION
+++ b/samples/client/petstore/rust/hyper/petstore/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION b/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION
+++ b/samples/client/petstore/rust/reqwest/petstore-async/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION b/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION
+++ b/samples/client/petstore/rust/reqwest/petstore/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/scala-akka/.openapi-generator/VERSION b/samples/client/petstore/scala-akka/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/scala-akka/.openapi-generator/VERSION
+++ b/samples/client/petstore/scala-akka/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/scala-sttp/.openapi-generator/VERSION b/samples/client/petstore/scala-sttp/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/scala-sttp/.openapi-generator/VERSION
+++ b/samples/client/petstore/scala-sttp/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/spring-cloud-async/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud-async/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/spring-cloud-async/.openapi-generator/VERSION
+++ b/samples/client/petstore/spring-cloud-async/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java
index f7833547f17..6dc5d09f0c8 100644
--- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java
index 68f629dced8..0c181e59ee3 100644
--- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java
index 2c98b5f9e6e..f62f460d121 100644
--- a/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/client/petstore/spring-cloud-async/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/spring-cloud-no-nullable/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud-no-nullable/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/spring-cloud-no-nullable/.openapi-generator/VERSION
+++ b/samples/client/petstore/spring-cloud-no-nullable/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/PetApi.java
index d1844b1b80e..f77fdf21de2 100644
--- a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/StoreApi.java
index 3d5a391e756..241a82690b1 100644
--- a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/UserApi.java
index 2c49c9711a0..ad21d7b8105 100644
--- a/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/client/petstore/spring-cloud-no-nullable/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION
+++ b/samples/client/petstore/spring-cloud-spring-pageable/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java
index 25b9d6c7bbf..8b6ead39e2c 100644
--- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java
index cc73031ff47..83d5530deb7 100644
--- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java
index 82598e85da9..683cff0ce64 100644
--- a/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/client/petstore/spring-cloud-spring-pageable/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/spring-cloud/.openapi-generator/VERSION b/samples/client/petstore/spring-cloud/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/spring-cloud/.openapi-generator/VERSION
+++ b/samples/client/petstore/spring-cloud/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java
index d1844b1b80e..f77fdf21de2 100644
--- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java
index 3d5a391e756..241a82690b1 100644
--- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java
index 2c49c9711a0..ad21d7b8105 100644
--- a/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/client/petstore/spring-cloud/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/spring-stubs/.openapi-generator/VERSION b/samples/client/petstore/spring-stubs/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/spring-stubs/.openapi-generator/VERSION
+++ b/samples/client/petstore/spring-stubs/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java
index e1326d3c156..08660cdaac3 100644
--- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java
index be1f97295c4..229a0ba4240 100644
--- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java
index c17e07317f1..e2d924590ee 100644
--- a/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/client/petstore/spring-stubs/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION
+++ b/samples/client/petstore/swift5/alamofireLibrary/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION
+++ b/samples/client/petstore/swift5/combineLibrary/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/swift5/default/.openapi-generator/VERSION b/samples/client/petstore/swift5/default/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/swift5/default/.openapi-generator/VERSION
+++ b/samples/client/petstore/swift5/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/swift5/deprecated/.openapi-generator/VERSION b/samples/client/petstore/swift5/deprecated/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/swift5/deprecated/.openapi-generator/VERSION
+++ b/samples/client/petstore/swift5/deprecated/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION b/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION
+++ b/samples/client/petstore/swift5/nonPublicApi/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION b/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION
+++ b/samples/client/petstore/swift5/objcCompatible/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION
+++ b/samples/client/petstore/swift5/promisekitLibrary/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/VERSION b/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/VERSION
+++ b/samples/client/petstore/swift5/readonlyProperties/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION
+++ b/samples/client/petstore/swift5/resultLibrary/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION
+++ b/samples/client/petstore/swift5/rxswiftLibrary/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION b/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION
+++ b/samples/client/petstore/swift5/urlsessionLibrary/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v10-provided-in-root/builds/with-npm/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v11-provided-in-root/builds/with-npm/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v6-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v6-provided-in-root/builds/with-npm/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v7-not-provided-in-root/builds/with-npm/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v7-provided-in-root/builds/with-npm/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/single-request-parameter/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-npm/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v8-provided-in-root/builds/with-prefixed-module-name/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v9-provided-in-any/builds/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-angular-v9-provided-in-root/builds/with-npm/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-aurelia/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-axios/builds/composed-schemas/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-axios/builds/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-axios/builds/es6-target/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-axios/builds/with-complex-headers/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-axios/builds/with-fake-endpoints-models-for-testing-with-http-signature/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-axios/builds/with-interfaces/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-axios/builds/with-npm-version-and-separate-models-and-api/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-axios/builds/with-npm-version/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-axios/builds/with-single-request-parameters/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-fetch/builds/default-v3.0/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-fetch/builds/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-fetch/builds/enum/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-fetch/builds/es6-target/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-fetch/builds/multiple-parameters/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-fetch/builds/prefix-parameter-interfaces/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-fetch/builds/typescript-three-plus/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-fetch/builds/with-interfaces/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-fetch/builds/with-npm-version/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-fetch/builds/without-runtime-checks/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION b/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-inversify/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-jquery/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-jquery/npm/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-nestjs-v6-provided-in-root/builds/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-node/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION b/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-node/npm/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-redux-query/builds/with-npm-version/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-rxjs/builds/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-rxjs/builds/es6-target/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-rxjs/builds/with-npm-version/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION
+++ b/samples/client/petstore/typescript-rxjs/builds/with-progress-subscriber/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/config/petstore/protobuf-schema/.openapi-generator/VERSION b/samples/config/petstore/protobuf-schema/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/config/petstore/protobuf-schema/.openapi-generator/VERSION
+++ b/samples/config/petstore/protobuf-schema/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/meta-codegen/lib/pom.xml b/samples/meta-codegen/lib/pom.xml
index 0d580d8d1e4..3132601fc90 100644
--- a/samples/meta-codegen/lib/pom.xml
+++ b/samples/meta-codegen/lib/pom.xml
@@ -121,7 +121,7 @@
UTF-8
- 5.1.1
+ 5.2.0-SNAPSHOT
1.0.0
4.8.1
diff --git a/samples/meta-codegen/usage/.openapi-generator/VERSION b/samples/meta-codegen/usage/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/meta-codegen/usage/.openapi-generator/VERSION
+++ b/samples/meta-codegen/usage/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/elm/.openapi-generator/VERSION b/samples/openapi3/client/elm/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/openapi3/client/elm/.openapi-generator/VERSION
+++ b/samples/openapi3/client/elm/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/.openapi-generator/VERSION b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/.openapi-generator/VERSION
+++ b/samples/openapi3/client/extensions/x-auth-id-alias/go-experimental/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/.openapi-generator/VERSION b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/.openapi-generator/VERSION
+++ b/samples/openapi3/client/extensions/x-auth-id-alias/java/jersey2-java8/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/python/.openapi-generator/VERSION b/samples/openapi3/client/extensions/x-auth-id-alias/python/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/openapi3/client/extensions/x-auth-id-alias/python/.openapi-generator/VERSION
+++ b/samples/openapi3/client/extensions/x-auth-id-alias/python/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/model_utils.py b/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/model_utils.py
index 55b99827e5e..9345e736905 100644
--- a/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/model_utils.py
+++ b/samples/openapi3/client/extensions/x-auth-id-alias/python/x_auth_id_alias/model_utils.py
@@ -434,27 +434,43 @@ class ModelComposed(OpenApiModel):
self.__dict__[name] = value
return
- # set the attribute on the correct instance
- model_instances = self._var_name_to_model_instances.get(
- name, self._additional_properties_model_instances)
- if model_instances:
- for model_instance in model_instances:
- if model_instance == self:
- self.set_attribute(name, value)
- else:
- setattr(model_instance, name, value)
- if name not in self._var_name_to_model_instances:
- # we assigned an additional property
- self.__dict__['_var_name_to_model_instances'][name] = (
- model_instance
- )
- return None
+ """
+ Use cases:
+ 1. additional_properties_type is None (additionalProperties == False in spec)
+ Check for property presence in self.openapi_types
+ if not present then throw an error
+ if present set in self, set attribute
+ always set on composed schemas
+ 2. additional_properties_type exists
+ set attribute on self
+ always set on composed schemas
+ """
+ if self.additional_properties_type is None:
+ """
+ For an attribute to exist on a composed schema it must:
+ - fulfill schema_requirements in the self composed schema not considering oneOf/anyOf/allOf schemas AND
+ - fulfill schema_requirements in each oneOf/anyOf/allOf schemas
- raise ApiAttributeError(
- "{0} has no attribute '{1}'".format(
- type(self).__name__, name),
- [e for e in [self._path_to_item, name] if e]
- )
+ schema_requirements:
+ For an attribute to exist on a schema it must:
+ - be present in properties at the schema OR
+ - have additionalProperties unset (defaults additionalProperties = any type) OR
+ - have additionalProperties set
+ """
+ if name not in self.openapi_types:
+ raise ApiAttributeError(
+ "{0} has no attribute '{1}'".format(
+ type(self).__name__, name),
+ [e for e in [self._path_to_item, name] if e]
+ )
+ # attribute must be set on self and composed instances
+ self.set_attribute(name, value)
+ for model_instance in self._composed_instances:
+ setattr(model_instance, name, value)
+ if name not in self._var_name_to_model_instances:
+ # we assigned an additional property
+ self.__dict__['_var_name_to_model_instances'][name] = self._composed_instances + [self]
+ return None
__unset_attribute_value__ = object()
@@ -464,13 +480,12 @@ class ModelComposed(OpenApiModel):
return self.__dict__[name]
# get the attribute from the correct instance
- model_instances = self._var_name_to_model_instances.get(
- name, self._additional_properties_model_instances)
+ model_instances = self._var_name_to_model_instances.get(name)
values = []
- # A composed model stores child (oneof/anyOf/allOf) models under
- # self._var_name_to_model_instances. A named property can exist in
- # multiple child models. If the property is present in more than one
- # child model, the value must be the same across all the child models.
+ # A composed model stores self and child (oneof/anyOf/allOf) models under
+ # self._var_name_to_model_instances.
+ # Any property must exist in self and all model instances
+ # The value stored in all model instances must be the same
if model_instances:
for model_instance in model_instances:
if name in model_instance._data_store:
@@ -1584,8 +1599,13 @@ def get_allof_instances(self, model_args, constant_args):
self: the class we are handling
model_args (dict): var_name to var_value
used to make instances
- constant_args (dict): var_name to var_value
- used to make instances
+ constant_args (dict):
+ metadata arguments:
+ _check_type
+ _path_to_item
+ _spec_property_naming
+ _configuration
+ _visited_composed_classes
Returns
composed_instances (list)
@@ -1593,20 +1613,8 @@ def get_allof_instances(self, model_args, constant_args):
composed_instances = []
for allof_class in self._composed_schemas['allOf']:
- # no need to handle changing js keys to python because
- # for composed schemas, allof parameters are included in the
- # composed schema and were changed to python keys in __new__
- # extract a dict of only required keys from fixed_model_args
- kwargs = {}
- var_names = set(allof_class.openapi_types.keys())
- for var_name in var_names:
- if var_name in model_args:
- kwargs[var_name] = model_args[var_name]
-
- # and use it to make the instance
- kwargs.update(constant_args)
try:
- allof_instance = allof_class(**kwargs)
+ allof_instance = allof_class(**model_args, **constant_args)
composed_instances.append(allof_instance)
except Exception as ex:
raise ApiValueError(
@@ -1666,31 +1674,9 @@ def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None):
single_value_input = allows_single_value_input(oneof_class)
- if not single_value_input:
- # transform js keys from input data to python keys in fixed_model_args
- fixed_model_args = change_keys_js_to_python(
- model_kwargs, oneof_class)
-
- # Extract a dict with the properties that are declared in the oneOf schema.
- # Undeclared properties (e.g. properties that are allowed because of the
- # additionalProperties attribute in the OAS document) are not added to
- # the dict.
- kwargs = {}
- var_names = set(oneof_class.openapi_types.keys())
- for var_name in var_names:
- if var_name in fixed_model_args:
- kwargs[var_name] = fixed_model_args[var_name]
-
- # do not try to make a model with no input args
- if len(kwargs) == 0:
- continue
-
- # and use it to make the instance
- kwargs.update(constant_kwargs)
-
try:
if not single_value_input:
- oneof_instance = oneof_class(**kwargs)
+ oneof_instance = oneof_class(**model_kwargs, **constant_kwargs)
else:
if issubclass(oneof_class, ModelSimple):
oneof_instance = oneof_class(model_arg, **constant_kwargs)
@@ -1747,24 +1733,8 @@ def get_anyof_instances(self, model_args, constant_args):
# none_type deserialization is handled in the __new__ method
continue
- # transform js keys to python keys in fixed_model_args
- fixed_model_args = change_keys_js_to_python(model_args, anyof_class)
-
- # extract a dict of only required keys from these_model_vars
- kwargs = {}
- var_names = set(anyof_class.openapi_types.keys())
- for var_name in var_names:
- if var_name in fixed_model_args:
- kwargs[var_name] = fixed_model_args[var_name]
-
- # do not try to make a model with no input args
- if len(kwargs) == 0:
- continue
-
- # and use it to make the instance
- kwargs.update(constant_args)
try:
- anyof_instance = anyof_class(**kwargs)
+ anyof_instance = anyof_class(**model_args, **constant_args)
anyof_instances.append(anyof_instance)
except Exception:
pass
@@ -1777,47 +1747,34 @@ def get_anyof_instances(self, model_args, constant_args):
return anyof_instances
-def get_additional_properties_model_instances(
- composed_instances, self):
- additional_properties_model_instances = []
- all_instances = [self]
- all_instances.extend(composed_instances)
- for instance in all_instances:
- if instance.additional_properties_type is not None:
- additional_properties_model_instances.append(instance)
- return additional_properties_model_instances
-
-
-def get_var_name_to_model_instances(self, composed_instances):
- var_name_to_model_instances = {}
- all_instances = [self]
- all_instances.extend(composed_instances)
- for instance in all_instances:
- for var_name in instance.openapi_types:
- if var_name not in var_name_to_model_instances:
- var_name_to_model_instances[var_name] = [instance]
- else:
- var_name_to_model_instances[var_name].append(instance)
- return var_name_to_model_instances
-
-
-def get_unused_args(self, composed_instances, model_args):
- unused_args = dict(model_args)
- # arguments apssed to self were already converted to python names
+def get_discarded_args(self, composed_instances, model_args):
+ """
+ Gathers the args that were discarded by configuration.discard_unknown_keys
+ """
+ model_arg_keys = model_args.keys()
+ discarded_args = set()
+ # arguments passed to self were already converted to python names
# before __init__ was called
- for var_name_py in self.attribute_map:
- if var_name_py in unused_args:
- del unused_args[var_name_py]
for instance in composed_instances:
if instance.__class__ in self._composed_schemas['allOf']:
- for var_name_py in instance.attribute_map:
- if var_name_py in unused_args:
- del unused_args[var_name_py]
+ try:
+ keys = instance.to_dict().keys()
+ discarded_keys = model_args - keys
+ discarded_args.update(discarded_keys)
+ except Exception:
+ # allOf integer schema will throw exception
+ pass
else:
- for var_name_js in instance.attribute_map.values():
- if var_name_js in unused_args:
- del unused_args[var_name_js]
- return unused_args
+ try:
+ all_keys = set(model_to_dict(instance, serialize=False).keys())
+ js_keys = model_to_dict(instance, serialize=True).keys()
+ all_keys.update(js_keys)
+ discarded_keys = model_arg_keys - all_keys
+ discarded_args.update(discarded_keys)
+ except Exception:
+ # allOf integer schema will throw exception
+ pass
+ return discarded_args
def validate_get_composed_info(constant_args, model_args, self):
@@ -1861,36 +1818,42 @@ def validate_get_composed_info(constant_args, model_args, self):
composed_instances.append(oneof_instance)
anyof_instances = get_anyof_instances(self, model_args, constant_args)
composed_instances.extend(anyof_instances)
+ """
+ set additional_properties_model_instances
+ additional properties must be evaluated at the schema level
+ so self's additional properties are most important
+ If self is a composed schema with:
+ - no properties defined in self
+ - additionalProperties: False
+ Then for object payloads every property is an additional property
+ and they are not allowed, so only empty dict is allowed
+
+ Properties must be set on all matching schemas
+ so when a property is assigned toa composed instance, it must be set on all
+ composed instances regardless of additionalProperties presence
+ keeping it to prevent breaking changes in v5.0.1
+ TODO remove cls._additional_properties_model_instances in 6.0.0
+ """
+ additional_properties_model_instances = []
+ if self.additional_properties_type is not None:
+ additional_properties_model_instances = [self]
+
+ """
+ no need to set properties on self in here, they will be set in __init__
+ By here all composed schema oneOf/anyOf/allOf instances have their properties set using
+ model_args
+ """
+ discarded_args = get_discarded_args(self, composed_instances, model_args)
# map variable names to composed_instances
- var_name_to_model_instances = get_var_name_to_model_instances(
- self, composed_instances)
-
- # set additional_properties_model_instances
- additional_properties_model_instances = (
- get_additional_properties_model_instances(composed_instances, self)
- )
-
- # set any remaining values
- unused_args = get_unused_args(self, composed_instances, model_args)
- if len(unused_args) > 0 and \
- len(additional_properties_model_instances) == 0 and \
- (self._configuration is None or
- not self._configuration.discard_unknown_keys):
- raise ApiValueError(
- "Invalid input arguments input when making an instance of "
- "class %s. Not all inputs were used. The unused input data "
- "is %s" % (self.__class__.__name__, unused_args)
- )
-
- # no need to add additional_properties to var_name_to_model_instances here
- # because additional_properties_model_instances will direct us to that
- # instance when we use getattr or setattr
- # and we update var_name_to_model_instances in setattr
+ var_name_to_model_instances = {}
+ for prop_name in model_args:
+ if prop_name not in discarded_args:
+ var_name_to_model_instances[prop_name] = [self] + composed_instances
return [
composed_instances,
var_name_to_model_instances,
additional_properties_model_instances,
- unused_args
+ discarded_args
]
diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.openapi-generator/VERSION b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.openapi-generator/VERSION
+++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias.rb
index 5d62d9e01b7..e0d70e377a4 100644
--- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias.rb
+++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api/usage_api.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api/usage_api.rb
index f8ae35b13c2..e150a0f673f 100644
--- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api/usage_api.rb
+++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api/usage_api.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_client.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_client.rb
index 99e9438cb20..dceb19bdb22 100644
--- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_client.rb
+++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_client.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_error.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_error.rb
index 7369c821c63..3984528e045 100644
--- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_error.rb
+++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/api_error.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb
index fd115585132..65f2cfea56a 100644
--- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb
+++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/configuration.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/version.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/version.rb
index bec887f3ba3..80e58dd211a 100644
--- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/version.rb
+++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/lib/x_auth_id_alias/version.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/api_client_spec.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/api_client_spec.rb
index 7939be4d57a..0b4502a11c8 100644
--- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/api_client_spec.rb
+++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/api_client_spec.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/configuration_spec.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/configuration_spec.rb
index 54976687720..df8bb818aa7 100644
--- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/configuration_spec.rb
+++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/configuration_spec.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/spec_helper.rb b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/spec_helper.rb
index b0ecb1bc2af..ae5d77411e2 100644
--- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/spec_helper.rb
+++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/spec/spec_helper.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/x_auth_id_alias.gemspec b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/x_auth_id_alias.gemspec
index ad8a2136d24..0b5caba0e8b 100644
--- a/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/x_auth_id_alias.gemspec
+++ b/samples/openapi3/client/extensions/x-auth-id-alias/ruby-client/x_auth_id_alias.gemspec
@@ -8,7 +8,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/VERSION b/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/VERSION
+++ b/samples/openapi3/client/features/dynamic-servers/python/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/model_utils.py b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/model_utils.py
index fb914b5b8f2..bb9ec1c821a 100644
--- a/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/model_utils.py
+++ b/samples/openapi3/client/features/dynamic-servers/python/dynamic_servers/model_utils.py
@@ -434,27 +434,43 @@ class ModelComposed(OpenApiModel):
self.__dict__[name] = value
return
- # set the attribute on the correct instance
- model_instances = self._var_name_to_model_instances.get(
- name, self._additional_properties_model_instances)
- if model_instances:
- for model_instance in model_instances:
- if model_instance == self:
- self.set_attribute(name, value)
- else:
- setattr(model_instance, name, value)
- if name not in self._var_name_to_model_instances:
- # we assigned an additional property
- self.__dict__['_var_name_to_model_instances'][name] = (
- model_instance
- )
- return None
+ """
+ Use cases:
+ 1. additional_properties_type is None (additionalProperties == False in spec)
+ Check for property presence in self.openapi_types
+ if not present then throw an error
+ if present set in self, set attribute
+ always set on composed schemas
+ 2. additional_properties_type exists
+ set attribute on self
+ always set on composed schemas
+ """
+ if self.additional_properties_type is None:
+ """
+ For an attribute to exist on a composed schema it must:
+ - fulfill schema_requirements in the self composed schema not considering oneOf/anyOf/allOf schemas AND
+ - fulfill schema_requirements in each oneOf/anyOf/allOf schemas
- raise ApiAttributeError(
- "{0} has no attribute '{1}'".format(
- type(self).__name__, name),
- [e for e in [self._path_to_item, name] if e]
- )
+ schema_requirements:
+ For an attribute to exist on a schema it must:
+ - be present in properties at the schema OR
+ - have additionalProperties unset (defaults additionalProperties = any type) OR
+ - have additionalProperties set
+ """
+ if name not in self.openapi_types:
+ raise ApiAttributeError(
+ "{0} has no attribute '{1}'".format(
+ type(self).__name__, name),
+ [e for e in [self._path_to_item, name] if e]
+ )
+ # attribute must be set on self and composed instances
+ self.set_attribute(name, value)
+ for model_instance in self._composed_instances:
+ setattr(model_instance, name, value)
+ if name not in self._var_name_to_model_instances:
+ # we assigned an additional property
+ self.__dict__['_var_name_to_model_instances'][name] = self._composed_instances + [self]
+ return None
__unset_attribute_value__ = object()
@@ -464,13 +480,12 @@ class ModelComposed(OpenApiModel):
return self.__dict__[name]
# get the attribute from the correct instance
- model_instances = self._var_name_to_model_instances.get(
- name, self._additional_properties_model_instances)
+ model_instances = self._var_name_to_model_instances.get(name)
values = []
- # A composed model stores child (oneof/anyOf/allOf) models under
- # self._var_name_to_model_instances. A named property can exist in
- # multiple child models. If the property is present in more than one
- # child model, the value must be the same across all the child models.
+ # A composed model stores self and child (oneof/anyOf/allOf) models under
+ # self._var_name_to_model_instances.
+ # Any property must exist in self and all model instances
+ # The value stored in all model instances must be the same
if model_instances:
for model_instance in model_instances:
if name in model_instance._data_store:
@@ -1584,8 +1599,13 @@ def get_allof_instances(self, model_args, constant_args):
self: the class we are handling
model_args (dict): var_name to var_value
used to make instances
- constant_args (dict): var_name to var_value
- used to make instances
+ constant_args (dict):
+ metadata arguments:
+ _check_type
+ _path_to_item
+ _spec_property_naming
+ _configuration
+ _visited_composed_classes
Returns
composed_instances (list)
@@ -1593,20 +1613,8 @@ def get_allof_instances(self, model_args, constant_args):
composed_instances = []
for allof_class in self._composed_schemas['allOf']:
- # no need to handle changing js keys to python because
- # for composed schemas, allof parameters are included in the
- # composed schema and were changed to python keys in __new__
- # extract a dict of only required keys from fixed_model_args
- kwargs = {}
- var_names = set(allof_class.openapi_types.keys())
- for var_name in var_names:
- if var_name in model_args:
- kwargs[var_name] = model_args[var_name]
-
- # and use it to make the instance
- kwargs.update(constant_args)
try:
- allof_instance = allof_class(**kwargs)
+ allof_instance = allof_class(**model_args, **constant_args)
composed_instances.append(allof_instance)
except Exception as ex:
raise ApiValueError(
@@ -1666,31 +1674,9 @@ def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None):
single_value_input = allows_single_value_input(oneof_class)
- if not single_value_input:
- # transform js keys from input data to python keys in fixed_model_args
- fixed_model_args = change_keys_js_to_python(
- model_kwargs, oneof_class)
-
- # Extract a dict with the properties that are declared in the oneOf schema.
- # Undeclared properties (e.g. properties that are allowed because of the
- # additionalProperties attribute in the OAS document) are not added to
- # the dict.
- kwargs = {}
- var_names = set(oneof_class.openapi_types.keys())
- for var_name in var_names:
- if var_name in fixed_model_args:
- kwargs[var_name] = fixed_model_args[var_name]
-
- # do not try to make a model with no input args
- if len(kwargs) == 0:
- continue
-
- # and use it to make the instance
- kwargs.update(constant_kwargs)
-
try:
if not single_value_input:
- oneof_instance = oneof_class(**kwargs)
+ oneof_instance = oneof_class(**model_kwargs, **constant_kwargs)
else:
if issubclass(oneof_class, ModelSimple):
oneof_instance = oneof_class(model_arg, **constant_kwargs)
@@ -1747,24 +1733,8 @@ def get_anyof_instances(self, model_args, constant_args):
# none_type deserialization is handled in the __new__ method
continue
- # transform js keys to python keys in fixed_model_args
- fixed_model_args = change_keys_js_to_python(model_args, anyof_class)
-
- # extract a dict of only required keys from these_model_vars
- kwargs = {}
- var_names = set(anyof_class.openapi_types.keys())
- for var_name in var_names:
- if var_name in fixed_model_args:
- kwargs[var_name] = fixed_model_args[var_name]
-
- # do not try to make a model with no input args
- if len(kwargs) == 0:
- continue
-
- # and use it to make the instance
- kwargs.update(constant_args)
try:
- anyof_instance = anyof_class(**kwargs)
+ anyof_instance = anyof_class(**model_args, **constant_args)
anyof_instances.append(anyof_instance)
except Exception:
pass
@@ -1777,47 +1747,34 @@ def get_anyof_instances(self, model_args, constant_args):
return anyof_instances
-def get_additional_properties_model_instances(
- composed_instances, self):
- additional_properties_model_instances = []
- all_instances = [self]
- all_instances.extend(composed_instances)
- for instance in all_instances:
- if instance.additional_properties_type is not None:
- additional_properties_model_instances.append(instance)
- return additional_properties_model_instances
-
-
-def get_var_name_to_model_instances(self, composed_instances):
- var_name_to_model_instances = {}
- all_instances = [self]
- all_instances.extend(composed_instances)
- for instance in all_instances:
- for var_name in instance.openapi_types:
- if var_name not in var_name_to_model_instances:
- var_name_to_model_instances[var_name] = [instance]
- else:
- var_name_to_model_instances[var_name].append(instance)
- return var_name_to_model_instances
-
-
-def get_unused_args(self, composed_instances, model_args):
- unused_args = dict(model_args)
- # arguments apssed to self were already converted to python names
+def get_discarded_args(self, composed_instances, model_args):
+ """
+ Gathers the args that were discarded by configuration.discard_unknown_keys
+ """
+ model_arg_keys = model_args.keys()
+ discarded_args = set()
+ # arguments passed to self were already converted to python names
# before __init__ was called
- for var_name_py in self.attribute_map:
- if var_name_py in unused_args:
- del unused_args[var_name_py]
for instance in composed_instances:
if instance.__class__ in self._composed_schemas['allOf']:
- for var_name_py in instance.attribute_map:
- if var_name_py in unused_args:
- del unused_args[var_name_py]
+ try:
+ keys = instance.to_dict().keys()
+ discarded_keys = model_args - keys
+ discarded_args.update(discarded_keys)
+ except Exception:
+ # allOf integer schema will throw exception
+ pass
else:
- for var_name_js in instance.attribute_map.values():
- if var_name_js in unused_args:
- del unused_args[var_name_js]
- return unused_args
+ try:
+ all_keys = set(model_to_dict(instance, serialize=False).keys())
+ js_keys = model_to_dict(instance, serialize=True).keys()
+ all_keys.update(js_keys)
+ discarded_keys = model_arg_keys - all_keys
+ discarded_args.update(discarded_keys)
+ except Exception:
+ # allOf integer schema will throw exception
+ pass
+ return discarded_args
def validate_get_composed_info(constant_args, model_args, self):
@@ -1861,36 +1818,42 @@ def validate_get_composed_info(constant_args, model_args, self):
composed_instances.append(oneof_instance)
anyof_instances = get_anyof_instances(self, model_args, constant_args)
composed_instances.extend(anyof_instances)
+ """
+ set additional_properties_model_instances
+ additional properties must be evaluated at the schema level
+ so self's additional properties are most important
+ If self is a composed schema with:
+ - no properties defined in self
+ - additionalProperties: False
+ Then for object payloads every property is an additional property
+ and they are not allowed, so only empty dict is allowed
+
+ Properties must be set on all matching schemas
+ so when a property is assigned toa composed instance, it must be set on all
+ composed instances regardless of additionalProperties presence
+ keeping it to prevent breaking changes in v5.0.1
+ TODO remove cls._additional_properties_model_instances in 6.0.0
+ """
+ additional_properties_model_instances = []
+ if self.additional_properties_type is not None:
+ additional_properties_model_instances = [self]
+
+ """
+ no need to set properties on self in here, they will be set in __init__
+ By here all composed schema oneOf/anyOf/allOf instances have their properties set using
+ model_args
+ """
+ discarded_args = get_discarded_args(self, composed_instances, model_args)
# map variable names to composed_instances
- var_name_to_model_instances = get_var_name_to_model_instances(
- self, composed_instances)
-
- # set additional_properties_model_instances
- additional_properties_model_instances = (
- get_additional_properties_model_instances(composed_instances, self)
- )
-
- # set any remaining values
- unused_args = get_unused_args(self, composed_instances, model_args)
- if len(unused_args) > 0 and \
- len(additional_properties_model_instances) == 0 and \
- (self._configuration is None or
- not self._configuration.discard_unknown_keys):
- raise ApiValueError(
- "Invalid input arguments input when making an instance of "
- "class %s. Not all inputs were used. The unused input data "
- "is %s" % (self.__class__.__name__, unused_args)
- )
-
- # no need to add additional_properties to var_name_to_model_instances here
- # because additional_properties_model_instances will direct us to that
- # instance when we use getattr or setattr
- # and we update var_name_to_model_instances in setattr
+ var_name_to_model_instances = {}
+ for prop_name in model_args:
+ if prop_name not in discarded_args:
+ var_name_to_model_instances[prop_name] = [self] + composed_instances
return [
composed_instances,
var_name_to_model_instances,
additional_properties_model_instances,
- unused_args
+ discarded_args
]
diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/.openapi-generator/VERSION b/samples/openapi3/client/features/dynamic-servers/ruby/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/openapi3/client/features/dynamic-servers/ruby/.openapi-generator/VERSION
+++ b/samples/openapi3/client/features/dynamic-servers/ruby/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/dynamic_servers.gemspec b/samples/openapi3/client/features/dynamic-servers/ruby/dynamic_servers.gemspec
index 4e4be0666e6..bfaeacb1aed 100644
--- a/samples/openapi3/client/features/dynamic-servers/ruby/dynamic_servers.gemspec
+++ b/samples/openapi3/client/features/dynamic-servers/ruby/dynamic_servers.gemspec
@@ -8,7 +8,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers.rb
index 5e12502a252..2fdd66b4145 100644
--- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers.rb
+++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb
index a0f39841825..1fdb9e468f0 100644
--- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb
+++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api/usage_api.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb
index 3c7ba751340..5e236ccddd9 100644
--- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb
+++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_client.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_error.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_error.rb
index 19c2c33c8d1..fbb07fa1c4d 100644
--- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_error.rb
+++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/api_error.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb
index 610ae1ee391..9ae58b4a33a 100644
--- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb
+++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/configuration.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/version.rb b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/version.rb
index 49140869527..6c7f7ac27d9 100644
--- a/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/version.rb
+++ b/samples/openapi3/client/features/dynamic-servers/ruby/lib/dynamic_servers/version.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/spec/api_client_spec.rb b/samples/openapi3/client/features/dynamic-servers/ruby/spec/api_client_spec.rb
index f58f4fe7abd..685f1ee26c8 100644
--- a/samples/openapi3/client/features/dynamic-servers/ruby/spec/api_client_spec.rb
+++ b/samples/openapi3/client/features/dynamic-servers/ruby/spec/api_client_spec.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/spec/configuration_spec.rb b/samples/openapi3/client/features/dynamic-servers/ruby/spec/configuration_spec.rb
index 5b481489806..adc964496e4 100644
--- a/samples/openapi3/client/features/dynamic-servers/ruby/spec/configuration_spec.rb
+++ b/samples/openapi3/client/features/dynamic-servers/ruby/spec/configuration_spec.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/openapi3/client/features/dynamic-servers/ruby/spec/spec_helper.rb b/samples/openapi3/client/features/dynamic-servers/ruby/spec/spec_helper.rb
index 8d86c5fcb46..68368b2e587 100644
--- a/samples/openapi3/client/features/dynamic-servers/ruby/spec/spec_helper.rb
+++ b/samples/openapi3/client/features/dynamic-servers/ruby/spec/spec_helper.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.openapi-generator/VERSION b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.openapi-generator/VERSION
+++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore.rb
index 094621b8f13..dedc2a733be 100644
--- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore.rb
+++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api/usage_api.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api/usage_api.rb
index 5e7cc93fe24..355c78dd797 100644
--- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api/usage_api.rb
+++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api/usage_api.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb
index 77737db9da5..02e0f300d10 100644
--- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb
+++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_client.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_error.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_error.rb
index b03431e318d..921981794eb 100644
--- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_error.rb
+++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/api_error.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb
index b060d134d00..20bb2cf0269 100644
--- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb
+++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/configuration.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb
index 40705ae7172..b9f03227ba9 100644
--- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb
+++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/array_alias.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb
index 45a136dfc17..6cac74ac13e 100644
--- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb
+++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/models/map_alias.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/version.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/version.rb
index 6108550a509..787763a66f3 100644
--- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/version.rb
+++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/lib/petstore/version.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/petstore.gemspec b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/petstore.gemspec
index 9f5fc118958..af450c8fe8d 100644
--- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/petstore.gemspec
+++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/petstore.gemspec
@@ -8,7 +8,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/api_client_spec.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/api_client_spec.rb
index de0ecf55bbb..495e376a094 100644
--- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/api_client_spec.rb
+++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/api_client_spec.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/configuration_spec.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/configuration_spec.rb
index 31ffae2b67d..55ca88de58b 100644
--- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/configuration_spec.rb
+++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/configuration_spec.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/spec_helper.rb b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/spec_helper.rb
index 4b6f23b312a..9ab6dba6ba0 100644
--- a/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/spec_helper.rb
+++ b/samples/openapi3/client/features/generate-alias-as-model/ruby-client/spec/spec_helper.rb
@@ -6,7 +6,7 @@
The version of the OpenAPI document: 1.0.0
Generated by: https://openapi-generator.tech
-OpenAPI Generator version: 5.1.1
+OpenAPI Generator version: 5.2.0-SNAPSHOT
=end
diff --git a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/dart-dio-next/petstore_client_lib_fake/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/dart-dio/petstore_client_lib_fake/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/openapi3/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/dart2/petstore_client_lib_fake/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/.openapi-generator/VERSION b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/dart2/petstore_json_serializable_client_lib_fake/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION b/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/go/go-petstore/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/VERSION b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/java/jersey2-java8-special-characters/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/VERSION b/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/java/jersey2-java8/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/java/native/.openapi-generator/VERSION b/samples/openapi3/client/petstore/java/native/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/openapi3/client/petstore/java/native/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/java/native/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/python-experimental/.coverage b/samples/openapi3/client/petstore/python-experimental/.coverage
new file mode 100644
index 00000000000..9e8563e1345
Binary files /dev/null and b/samples/openapi3/client/petstore/python-experimental/.coverage differ
diff --git a/samples/openapi3/client/petstore/python-legacy/.openapi-generator/VERSION b/samples/openapi3/client/petstore/python-legacy/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100755
--- a/samples/openapi3/client/petstore/python-legacy/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/python-legacy/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/python-legacy/pom.xml b/samples/openapi3/client/petstore/python-legacy/pom.xml
index 98955483eb8..3a9cf727306 100755
--- a/samples/openapi3/client/petstore/python-legacy/pom.xml
+++ b/samples/openapi3/client/petstore/python-legacy/pom.xml
@@ -1,7 +1,7 @@
4.0.0
org.openapitools
- PythonOAS3PetstoreTests
+ PythonLegacyOAS3PetstoreTests
pom
1.0-SNAPSHOT
Python OpenAPI3 Petstore Client
diff --git a/samples/openapi3/client/petstore/python/.openapi-generator/FILES b/samples/openapi3/client/petstore/python/.openapi-generator/FILES
index e3b9c0feabb..175fdaa0919 100644
--- a/samples/openapi3/client/petstore/python/.openapi-generator/FILES
+++ b/samples/openapi3/client/petstore/python/.openapi-generator/FILES
@@ -28,6 +28,7 @@ docs/ClassModel.md
docs/Client.md
docs/ComplexQuadrilateral.md
docs/ComposedOneOfNumberWithValidations.md
+docs/ComposedSchemaWithPropsAndNoAddProps.md
docs/DanishPig.md
docs/DefaultApi.md
docs/Dog.md
@@ -139,6 +140,7 @@ petstore_api/model/class_model.py
petstore_api/model/client.py
petstore_api/model/complex_quadrilateral.py
petstore_api/model/composed_one_of_number_with_validations.py
+petstore_api/model/composed_schema_with_props_and_no_add_props.py
petstore_api/model/danish_pig.py
petstore_api/model/dog.py
petstore_api/model/dog_all_of.py
diff --git a/samples/openapi3/client/petstore/python/.openapi-generator/VERSION b/samples/openapi3/client/petstore/python/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/openapi3/client/petstore/python/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/python/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/python/README.md b/samples/openapi3/client/petstore/python/README.md
index 2fc4c6b58bd..ce718fd4a46 100644
--- a/samples/openapi3/client/petstore/python/README.md
+++ b/samples/openapi3/client/petstore/python/README.md
@@ -159,6 +159,7 @@ Class | Method | HTTP request | Description
- [Client](docs/Client.md)
- [ComplexQuadrilateral](docs/ComplexQuadrilateral.md)
- [ComposedOneOfNumberWithValidations](docs/ComposedOneOfNumberWithValidations.md)
+ - [ComposedSchemaWithPropsAndNoAddProps](docs/ComposedSchemaWithPropsAndNoAddProps.md)
- [DanishPig](docs/DanishPig.md)
- [Dog](docs/Dog.md)
- [DogAllOf](docs/DogAllOf.md)
diff --git a/samples/openapi3/client/petstore/python/docs/AdditionalPropertiesClass.md b/samples/openapi3/client/petstore/python/docs/AdditionalPropertiesClass.md
index 460813c1223..b8d54e3c9bf 100644
--- a/samples/openapi3/client/petstore/python/docs/AdditionalPropertiesClass.md
+++ b/samples/openapi3/client/petstore/python/docs/AdditionalPropertiesClass.md
@@ -10,8 +10,9 @@ Name | Type | Description | Notes
**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]
+**empty_map** | **dict** | 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]
+**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/docs/AdditionalPropertiesWithArrayOfEnums.md b/samples/openapi3/client/petstore/python/docs/AdditionalPropertiesWithArrayOfEnums.md
index 49ca7b3d754..5cdb2f4c922 100644
--- a/samples/openapi3/client/petstore/python/docs/AdditionalPropertiesWithArrayOfEnums.md
+++ b/samples/openapi3/client/petstore/python/docs/AdditionalPropertiesWithArrayOfEnums.md
@@ -4,7 +4,7 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**any string name** | **[EnumClass]** | any string name can be used but the value must be the correct type | [optional]
+**any string name** | [**[EnumClass]**](EnumClass.md) | 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/docs/Animal.md b/samples/openapi3/client/petstore/python/docs/Animal.md
index 1d1c77c01ab..d36c66a5d88 100644
--- a/samples/openapi3/client/petstore/python/docs/Animal.md
+++ b/samples/openapi3/client/petstore/python/docs/Animal.md
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**class_name** | **str** | |
**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/docs/AnimalFarm.md b/samples/openapi3/client/petstore/python/docs/AnimalFarm.md
index fc299cf27d3..fb3b33c9c9c 100644
--- a/samples/openapi3/client/petstore/python/docs/AnimalFarm.md
+++ b/samples/openapi3/client/petstore/python/docs/AnimalFarm.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**value** | [**[Animal]**](Animal.md) | |
+**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/docs/ApiResponse.md b/samples/openapi3/client/petstore/python/docs/ApiResponse.md
index 81a7d0d8522..bedefea9a9c 100644
--- a/samples/openapi3/client/petstore/python/docs/ApiResponse.md
+++ b/samples/openapi3/client/petstore/python/docs/ApiResponse.md
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
**code** | **int** | | [optional]
**type** | **str** | | [optional]
**message** | **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/docs/Apple.md b/samples/openapi3/client/petstore/python/docs/Apple.md
index d8ba5ec0711..d7634278906 100644
--- a/samples/openapi3/client/petstore/python/docs/Apple.md
+++ b/samples/openapi3/client/petstore/python/docs/Apple.md
@@ -4,8 +4,9 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**cultivar** | **str** | | [optional]
+**cultivar** | **str** | |
**origin** | **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/docs/ArrayOfArrayOfNumberOnly.md b/samples/openapi3/client/petstore/python/docs/ArrayOfArrayOfNumberOnly.md
index 6ab77963788..11cd25c98ee 100644
--- a/samples/openapi3/client/petstore/python/docs/ArrayOfArrayOfNumberOnly.md
+++ b/samples/openapi3/client/petstore/python/docs/ArrayOfArrayOfNumberOnly.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**array_array_number** | **[[float]]** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/openapi3/client/petstore/python/docs/ArrayOfEnums.md b/samples/openapi3/client/petstore/python/docs/ArrayOfEnums.md
index d2f8ea80a3d..f1593c10afd 100644
--- a/samples/openapi3/client/petstore/python/docs/ArrayOfEnums.md
+++ b/samples/openapi3/client/petstore/python/docs/ArrayOfEnums.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**value** | [**[StringEnum]**](StringEnum.md) | |
+**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/docs/ArrayOfNumberOnly.md b/samples/openapi3/client/petstore/python/docs/ArrayOfNumberOnly.md
index ebc65a54ba7..1e9bb12e4e8 100644
--- a/samples/openapi3/client/petstore/python/docs/ArrayOfNumberOnly.md
+++ b/samples/openapi3/client/petstore/python/docs/ArrayOfNumberOnly.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**array_number** | **[float]** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/openapi3/client/petstore/python/docs/ArrayTest.md b/samples/openapi3/client/petstore/python/docs/ArrayTest.md
index 4e1bda8fc3a..9eac1f8874c 100644
--- a/samples/openapi3/client/petstore/python/docs/ArrayTest.md
+++ b/samples/openapi3/client/petstore/python/docs/ArrayTest.md
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
**array_of_string** | **[str]** | | [optional]
**array_array_of_integer** | **[[int]]** | | [optional]
**array_array_of_model** | [**[[ReadOnlyFirst]]**](ReadOnlyFirst.md) | | [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/docs/Banana.md b/samples/openapi3/client/petstore/python/docs/Banana.md
index 54e06a1de59..2e38614e0f8 100644
--- a/samples/openapi3/client/petstore/python/docs/Banana.md
+++ b/samples/openapi3/client/petstore/python/docs/Banana.md
@@ -4,7 +4,8 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
-**length_cm** | **float** | | [optional]
+**length_cm** | **float** | |
+**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/docs/BasquePig.md b/samples/openapi3/client/petstore/python/docs/BasquePig.md
index 6c583c5bc9f..0d92ecbe02b 100644
--- a/samples/openapi3/client/petstore/python/docs/BasquePig.md
+++ b/samples/openapi3/client/petstore/python/docs/BasquePig.md
@@ -5,6 +5,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/docs/Capitalization.md b/samples/openapi3/client/petstore/python/docs/Capitalization.md
index 1ddeadeb3f4..df9989f8db5 100644
--- a/samples/openapi3/client/petstore/python/docs/Capitalization.md
+++ b/samples/openapi3/client/petstore/python/docs/Capitalization.md
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
**capital_snake** | **str** | | [optional]
**sca_eth_flow_points** | **str** | | [optional]
**att_name** | **str** | Name of the pet | [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/docs/CatAllOf.md b/samples/openapi3/client/petstore/python/docs/CatAllOf.md
index 0ff7809a99a..6fd1390a749 100644
--- a/samples/openapi3/client/petstore/python/docs/CatAllOf.md
+++ b/samples/openapi3/client/petstore/python/docs/CatAllOf.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**declawed** | **bool** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/openapi3/client/petstore/python/docs/Category.md b/samples/openapi3/client/petstore/python/docs/Category.md
index 940f6a45e64..7650eccafba 100644
--- a/samples/openapi3/client/petstore/python/docs/Category.md
+++ b/samples/openapi3/client/petstore/python/docs/Category.md
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **str** | | defaults to "default-name"
**id** | **int** | | [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/docs/ChildCatAllOf.md b/samples/openapi3/client/petstore/python/docs/ChildCatAllOf.md
index c5883b9a87c..c5b2f58f28c 100644
--- a/samples/openapi3/client/petstore/python/docs/ChildCatAllOf.md
+++ b/samples/openapi3/client/petstore/python/docs/ChildCatAllOf.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**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/docs/ClassModel.md b/samples/openapi3/client/petstore/python/docs/ClassModel.md
index 48ed7cbf2ff..6605a16d74a 100644
--- a/samples/openapi3/client/petstore/python/docs/ClassModel.md
+++ b/samples/openapi3/client/petstore/python/docs/ClassModel.md
@@ -6,6 +6,7 @@ Model for testing model with \"_class\" property
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**_class** | **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/docs/Client.md b/samples/openapi3/client/petstore/python/docs/Client.md
index c3986008d6c..1b293140f34 100644
--- a/samples/openapi3/client/petstore/python/docs/Client.md
+++ b/samples/openapi3/client/petstore/python/docs/Client.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**client** | **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/docs/ComposedSchemaWithPropsAndNoAddProps.md b/samples/openapi3/client/petstore/python/docs/ComposedSchemaWithPropsAndNoAddProps.md
new file mode 100644
index 00000000000..5930b762b0c
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/docs/ComposedSchemaWithPropsAndNoAddProps.md
@@ -0,0 +1,13 @@
+# ComposedSchemaWithPropsAndNoAddProps
+
+
+## Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**color** | **str** | | [optional]
+**id** | **int** | | [optional]
+**name** | **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/docs/DanishPig.md b/samples/openapi3/client/petstore/python/docs/DanishPig.md
index dd7fe16ea4a..4d1ebe4f68a 100644
--- a/samples/openapi3/client/petstore/python/docs/DanishPig.md
+++ b/samples/openapi3/client/petstore/python/docs/DanishPig.md
@@ -5,6 +5,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/docs/DogAllOf.md b/samples/openapi3/client/petstore/python/docs/DogAllOf.md
index 6382bbd8067..2907a9fd5c4 100644
--- a/samples/openapi3/client/petstore/python/docs/DogAllOf.md
+++ b/samples/openapi3/client/petstore/python/docs/DogAllOf.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**breed** | **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/docs/Drawing.md b/samples/openapi3/client/petstore/python/docs/Drawing.md
index 0f0390a3f72..a4fc4830562 100644
--- a/samples/openapi3/client/petstore/python/docs/Drawing.md
+++ b/samples/openapi3/client/petstore/python/docs/Drawing.md
@@ -8,7 +8,7 @@ Name | Type | Description | Notes
**shape_or_null** | [**ShapeOrNull**](ShapeOrNull.md) | | [optional]
**nullable_shape** | [**NullableShape**](NullableShape.md) | | [optional]
**shapes** | [**[Shape]**](Shape.md) | | [optional]
-**any string name** | **Fruit** | any string name can be used but the value must be the correct type | [optional]
+**any string name** | [**Fruit**](Fruit.md) | 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/docs/EnumArrays.md b/samples/openapi3/client/petstore/python/docs/EnumArrays.md
index 9be5c645a80..ad4e9d2fcb7 100644
--- a/samples/openapi3/client/petstore/python/docs/EnumArrays.md
+++ b/samples/openapi3/client/petstore/python/docs/EnumArrays.md
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**just_symbol** | **str** | | [optional]
**array_enum** | **[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/docs/EnumClass.md b/samples/openapi3/client/petstore/python/docs/EnumClass.md
index a1f9aae5819..39bb0e1644c 100644
--- a/samples/openapi3/client/petstore/python/docs/EnumClass.md
+++ b/samples/openapi3/client/petstore/python/docs/EnumClass.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**value** | **str** | | defaults to "-efg", must be one of ["_abc", "-efg", "(xyz)", ]
+**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/docs/EnumTest.md b/samples/openapi3/client/petstore/python/docs/EnumTest.md
index b9181858434..27b6997e695 100644
--- a/samples/openapi3/client/petstore/python/docs/EnumTest.md
+++ b/samples/openapi3/client/petstore/python/docs/EnumTest.md
@@ -15,6 +15,7 @@ Name | Type | Description | Notes
**integer_enum_one_value** | [**IntegerEnumOneValue**](IntegerEnumOneValue.md) | | [optional]
**inline_array_of_str_enum** | [**[StringEnum]**](StringEnum.md) | | [optional]
**array_of_str_enum** | [**ArrayOfEnums**](ArrayOfEnums.md) | | [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/docs/FakeGetInlineAdditionalPropertiesPayloadArrayData.md b/samples/openapi3/client/petstore/python/docs/FakeGetInlineAdditionalPropertiesPayloadArrayData.md
index 0ba4e3b8e5a..6c3418d8c07 100644
--- a/samples/openapi3/client/petstore/python/docs/FakeGetInlineAdditionalPropertiesPayloadArrayData.md
+++ b/samples/openapi3/client/petstore/python/docs/FakeGetInlineAdditionalPropertiesPayloadArrayData.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**labels** | **[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]
[[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/docs/File.md b/samples/openapi3/client/petstore/python/docs/File.md
index 63b1d1a6518..f84547d1933 100644
--- a/samples/openapi3/client/petstore/python/docs/File.md
+++ b/samples/openapi3/client/petstore/python/docs/File.md
@@ -6,6 +6,7 @@ Must be named `File` for test.
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**source_uri** | **str** | Test capitalization | [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/docs/FileSchemaTestClass.md b/samples/openapi3/client/petstore/python/docs/FileSchemaTestClass.md
index caf2440821d..4572aa0905b 100644
--- a/samples/openapi3/client/petstore/python/docs/FileSchemaTestClass.md
+++ b/samples/openapi3/client/petstore/python/docs/FileSchemaTestClass.md
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**file** | [**File**](File.md) | | [optional]
**files** | [**[File]**](File.md) | | [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/docs/Foo.md b/samples/openapi3/client/petstore/python/docs/Foo.md
index 23fb5e1678e..c9c54d1ee40 100644
--- a/samples/openapi3/client/petstore/python/docs/Foo.md
+++ b/samples/openapi3/client/petstore/python/docs/Foo.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bar** | **str** | | [optional] if omitted the server will use the default value of "bar"
+**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/docs/FormatTest.md b/samples/openapi3/client/petstore/python/docs/FormatTest.md
index 4fcec135190..3c8cc8697c1 100644
--- a/samples/openapi3/client/petstore/python/docs/FormatTest.md
+++ b/samples/openapi3/client/petstore/python/docs/FormatTest.md
@@ -20,6 +20,7 @@ Name | Type | Description | Notes
**uuid_no_example** | **str** | | [optional]
**pattern_with_digits** | **str** | A string that is a 10 digit number. Can have leading zeros. | [optional]
**pattern_with_digits_and_delimiter** | **str** | A string starting with 'image_' (case insensitive) and one to three digits following i.e. Image_01. | [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/docs/Fruit.md b/samples/openapi3/client/petstore/python/docs/Fruit.md
index 92700e79e08..d65f4cb14b4 100644
--- a/samples/openapi3/client/petstore/python/docs/Fruit.md
+++ b/samples/openapi3/client/petstore/python/docs/Fruit.md
@@ -1,13 +1,15 @@
# Fruit
+a schema that tests oneOf and includes a schema level property
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
+**cultivar** | **str** | |
+**length_cm** | **float** | |
**color** | **str** | | [optional]
-**cultivar** | **str** | | [optional]
**origin** | **str** | | [optional]
-**length_cm** | **float** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/openapi3/client/petstore/python/docs/FruitReq.md b/samples/openapi3/client/petstore/python/docs/FruitReq.md
index 7ff54d6ae02..096dde57309 100644
--- a/samples/openapi3/client/petstore/python/docs/FruitReq.md
+++ b/samples/openapi3/client/petstore/python/docs/FruitReq.md
@@ -1,5 +1,6 @@
# FruitReq
+a schema where additionalProperties is on in the composed schema and off in the oneOf object schemas also, this schem accepts null as a value
## Properties
Name | Type | Description | Notes
@@ -8,6 +9,7 @@ Name | Type | Description | Notes
**sweet** | **bool** | | [optional]
**cultivar** | **str** | | [optional]
**length_cm** | **float** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/openapi3/client/petstore/python/docs/GmFruit.md b/samples/openapi3/client/petstore/python/docs/GmFruit.md
index f2af2abe5ce..4da4dd53ad4 100644
--- a/samples/openapi3/client/petstore/python/docs/GmFruit.md
+++ b/samples/openapi3/client/petstore/python/docs/GmFruit.md
@@ -4,10 +4,11 @@
## Properties
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
+**cultivar** | **str** | |
+**length_cm** | **float** | |
**color** | **str** | | [optional]
-**cultivar** | **str** | | [optional]
**origin** | **str** | | [optional]
-**length_cm** | **float** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/openapi3/client/petstore/python/docs/GrandparentAnimal.md b/samples/openapi3/client/petstore/python/docs/GrandparentAnimal.md
index 15db0708bb1..a1c34037810 100644
--- a/samples/openapi3/client/petstore/python/docs/GrandparentAnimal.md
+++ b/samples/openapi3/client/petstore/python/docs/GrandparentAnimal.md
@@ -5,6 +5,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/docs/HasOnlyReadOnly.md b/samples/openapi3/client/petstore/python/docs/HasOnlyReadOnly.md
index 0e1334519a8..88bc03d4ff5 100644
--- a/samples/openapi3/client/petstore/python/docs/HasOnlyReadOnly.md
+++ b/samples/openapi3/client/petstore/python/docs/HasOnlyReadOnly.md
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bar** | **str** | | [optional] [readonly]
**foo** | **str** | | [optional] [readonly]
+**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/docs/HealthCheckResult.md b/samples/openapi3/client/petstore/python/docs/HealthCheckResult.md
index ab8b660e667..e20455fb377 100644
--- a/samples/openapi3/client/petstore/python/docs/HealthCheckResult.md
+++ b/samples/openapi3/client/petstore/python/docs/HealthCheckResult.md
@@ -6,6 +6,7 @@ Just a string to inform instance is up and running. Make it nullable in hope to
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**nullable_message** | **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]
[[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/docs/InlineAdditionalPropertiesRefPayload.md b/samples/openapi3/client/petstore/python/docs/InlineAdditionalPropertiesRefPayload.md
index 130320d1daa..5922fc61f1a 100644
--- a/samples/openapi3/client/petstore/python/docs/InlineAdditionalPropertiesRefPayload.md
+++ b/samples/openapi3/client/petstore/python/docs/InlineAdditionalPropertiesRefPayload.md
@@ -6,6 +6,7 @@ this payload is used for verification that some model_to_dict issues are fixed
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**array_data** | [**[FakeGetInlineAdditionalPropertiesPayloadArrayData], none_type**](FakeGetInlineAdditionalPropertiesPayloadArrayData.md) | | [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/docs/InlineObject6.md b/samples/openapi3/client/petstore/python/docs/InlineObject6.md
index 6e4975b3542..fc83501c154 100644
--- a/samples/openapi3/client/petstore/python/docs/InlineObject6.md
+++ b/samples/openapi3/client/petstore/python/docs/InlineObject6.md
@@ -6,6 +6,7 @@ this payload is used for verification that some model_to_dict issues are fixed
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**array_data** | [**[FakeGetInlineAdditionalPropertiesPayloadArrayData], none_type**](FakeGetInlineAdditionalPropertiesPayloadArrayData.md) | | [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/docs/InlineResponseDefault.md b/samples/openapi3/client/petstore/python/docs/InlineResponseDefault.md
index f0a52bc4639..b8823d383ba 100644
--- a/samples/openapi3/client/petstore/python/docs/InlineResponseDefault.md
+++ b/samples/openapi3/client/petstore/python/docs/InlineResponseDefault.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**string** | [**Foo**](Foo.md) | | [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/docs/IntegerEnum.md b/samples/openapi3/client/petstore/python/docs/IntegerEnum.md
index 9567a76cc2e..a5b38556bf8 100644
--- a/samples/openapi3/client/petstore/python/docs/IntegerEnum.md
+++ b/samples/openapi3/client/petstore/python/docs/IntegerEnum.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**value** | **int** | | must be one of [0, 1, 2, ]
+**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/docs/IntegerEnumOneValue.md b/samples/openapi3/client/petstore/python/docs/IntegerEnumOneValue.md
index 99dcaa7a4ec..d92f3080973 100644
--- a/samples/openapi3/client/petstore/python/docs/IntegerEnumOneValue.md
+++ b/samples/openapi3/client/petstore/python/docs/IntegerEnumOneValue.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**value** | **int** | | defaults to 0, must be one of [0, ]
+**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/docs/IntegerEnumWithDefaultValue.md b/samples/openapi3/client/petstore/python/docs/IntegerEnumWithDefaultValue.md
index 4b8e39d9cad..2fd432edc69 100644
--- a/samples/openapi3/client/petstore/python/docs/IntegerEnumWithDefaultValue.md
+++ b/samples/openapi3/client/petstore/python/docs/IntegerEnumWithDefaultValue.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**value** | **int** | | defaults to 0, must be one of [0, 1, 2, ]
+**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/docs/IsoscelesTriangle.md b/samples/openapi3/client/petstore/python/docs/IsoscelesTriangle.md
index e7fffa3be03..57cfa6d12ad 100644
--- a/samples/openapi3/client/petstore/python/docs/IsoscelesTriangle.md
+++ b/samples/openapi3/client/petstore/python/docs/IsoscelesTriangle.md
@@ -6,6 +6,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/docs/List.md b/samples/openapi3/client/petstore/python/docs/List.md
index 4b60956971a..13f2694de35 100644
--- a/samples/openapi3/client/petstore/python/docs/List.md
+++ b/samples/openapi3/client/petstore/python/docs/List.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**_123_list** | **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/docs/MapTest.md b/samples/openapi3/client/petstore/python/docs/MapTest.md
index 15228ee1f28..e6584f3811e 100644
--- a/samples/openapi3/client/petstore/python/docs/MapTest.md
+++ b/samples/openapi3/client/petstore/python/docs/MapTest.md
@@ -8,6 +8,7 @@ Name | Type | Description | Notes
**map_of_enum_string** | **{str: (str,)}** | | [optional]
**direct_map** | **{str: (bool,)}** | | [optional]
**indirect_map** | [**StringBooleanMap**](StringBooleanMap.md) | | [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/docs/MixedPropertiesAndAdditionalPropertiesClass.md b/samples/openapi3/client/petstore/python/docs/MixedPropertiesAndAdditionalPropertiesClass.md
index f489944a20a..f32c4e04134 100644
--- a/samples/openapi3/client/petstore/python/docs/MixedPropertiesAndAdditionalPropertiesClass.md
+++ b/samples/openapi3/client/petstore/python/docs/MixedPropertiesAndAdditionalPropertiesClass.md
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
**uuid** | **str** | | [optional]
**date_time** | **datetime** | | [optional]
**map** | [**{str: (Animal,)}**](Animal.md) | | [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/docs/Model200Response.md b/samples/openapi3/client/petstore/python/docs/Model200Response.md
index c958bd4b33f..f7ef7d79acf 100644
--- a/samples/openapi3/client/petstore/python/docs/Model200Response.md
+++ b/samples/openapi3/client/petstore/python/docs/Model200Response.md
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**name** | **int** | | [optional]
**_class** | **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/docs/ModelReturn.md b/samples/openapi3/client/petstore/python/docs/ModelReturn.md
index 043e9d466fa..75fb39a8869 100644
--- a/samples/openapi3/client/petstore/python/docs/ModelReturn.md
+++ b/samples/openapi3/client/petstore/python/docs/ModelReturn.md
@@ -6,6 +6,7 @@ Model for testing reserved words
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**_return** | **int** | | [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/docs/Name.md b/samples/openapi3/client/petstore/python/docs/Name.md
index 3be719cdbfb..6e58fae6d0b 100644
--- a/samples/openapi3/client/petstore/python/docs/Name.md
+++ b/samples/openapi3/client/petstore/python/docs/Name.md
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
**snake_case** | **int** | | [optional] [readonly]
**_property** | **str** | | [optional]
**_123_number** | **int** | | [optional] [readonly]
+**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/docs/NullableClass.md b/samples/openapi3/client/petstore/python/docs/NullableClass.md
index 863e93ddfbb..48a27469f6c 100644
--- a/samples/openapi3/client/petstore/python/docs/NullableClass.md
+++ b/samples/openapi3/client/petstore/python/docs/NullableClass.md
@@ -13,10 +13,11 @@ Name | Type | Description | Notes
**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** | **{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]
+**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/docs/NumberOnly.md b/samples/openapi3/client/petstore/python/docs/NumberOnly.md
index 37195c5d899..172e86163a4 100644
--- a/samples/openapi3/client/petstore/python/docs/NumberOnly.md
+++ b/samples/openapi3/client/petstore/python/docs/NumberOnly.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**just_number** | **float** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/openapi3/client/petstore/python/docs/NumberWithValidations.md b/samples/openapi3/client/petstore/python/docs/NumberWithValidations.md
index 119e0f67823..cc6f77c152c 100644
--- a/samples/openapi3/client/petstore/python/docs/NumberWithValidations.md
+++ b/samples/openapi3/client/petstore/python/docs/NumberWithValidations.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**value** | **float** | |
+**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/docs/ObjectModelWithRefProps.md b/samples/openapi3/client/petstore/python/docs/ObjectModelWithRefProps.md
index a046561314c..60fe997afa0 100644
--- a/samples/openapi3/client/petstore/python/docs/ObjectModelWithRefProps.md
+++ b/samples/openapi3/client/petstore/python/docs/ObjectModelWithRefProps.md
@@ -9,6 +9,7 @@ Name | Type | Description | Notes
**my_readonly** | [**Readonly**](Readonly.md) | | [optional]
**my_string** | **str** | | [optional]
**my_boolean** | **bool** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/openapi3/client/petstore/python/docs/Order.md b/samples/openapi3/client/petstore/python/docs/Order.md
index d29e1a381de..0423082932d 100644
--- a/samples/openapi3/client/petstore/python/docs/Order.md
+++ b/samples/openapi3/client/petstore/python/docs/Order.md
@@ -10,6 +10,7 @@ Name | Type | Description | Notes
**ship_date** | **datetime** | | [optional]
**status** | **str** | Order Status | [optional]
**complete** | **bool** | | [optional] if omitted the server will use the default value of False
+**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/docs/Pet.md b/samples/openapi3/client/petstore/python/docs/Pet.md
index ea4abdeb13d..bb6e8d344e6 100644
--- a/samples/openapi3/client/petstore/python/docs/Pet.md
+++ b/samples/openapi3/client/petstore/python/docs/Pet.md
@@ -11,6 +11,7 @@ Name | Type | Description | Notes
**category** | [**Category**](Category.md) | | [optional]
**tags** | [**[Tag]**](Tag.md) | | [optional]
**status** | **str** | pet status in the store | [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/docs/QuadrilateralInterface.md b/samples/openapi3/client/petstore/python/docs/QuadrilateralInterface.md
index 3b9c39d2230..05573544bd7 100644
--- a/samples/openapi3/client/petstore/python/docs/QuadrilateralInterface.md
+++ b/samples/openapi3/client/petstore/python/docs/QuadrilateralInterface.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**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/docs/ReadOnlyFirst.md b/samples/openapi3/client/petstore/python/docs/ReadOnlyFirst.md
index 53b4c61d844..ba39ec3d04e 100644
--- a/samples/openapi3/client/petstore/python/docs/ReadOnlyFirst.md
+++ b/samples/openapi3/client/petstore/python/docs/ReadOnlyFirst.md
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**bar** | **str** | | [optional] [readonly]
**baz** | **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/docs/Readonly.md b/samples/openapi3/client/petstore/python/docs/Readonly.md
index 4f4ba8ede25..e94598c9d38 100644
--- a/samples/openapi3/client/petstore/python/docs/Readonly.md
+++ b/samples/openapi3/client/petstore/python/docs/Readonly.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**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/docs/ShapeInterface.md b/samples/openapi3/client/petstore/python/docs/ShapeInterface.md
index 4d094158fab..012d4a0cdd8 100644
--- a/samples/openapi3/client/petstore/python/docs/ShapeInterface.md
+++ b/samples/openapi3/client/petstore/python/docs/ShapeInterface.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**shape_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/docs/SomeObjectWithSelfAttr.md b/samples/openapi3/client/petstore/python/docs/SomeObjectWithSelfAttr.md
index ee0aeb17ce1..6704f480eb3 100644
--- a/samples/openapi3/client/petstore/python/docs/SomeObjectWithSelfAttr.md
+++ b/samples/openapi3/client/petstore/python/docs/SomeObjectWithSelfAttr.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**_self** | **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/docs/SpecialModelName.md b/samples/openapi3/client/petstore/python/docs/SpecialModelName.md
index 268e1134192..4a1c86ff4de 100644
--- a/samples/openapi3/client/petstore/python/docs/SpecialModelName.md
+++ b/samples/openapi3/client/petstore/python/docs/SpecialModelName.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**special_property_name** | **int** | | [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/docs/StringEnum.md b/samples/openapi3/client/petstore/python/docs/StringEnum.md
index b03f3b1e6c6..29e160a9b07 100644
--- a/samples/openapi3/client/petstore/python/docs/StringEnum.md
+++ b/samples/openapi3/client/petstore/python/docs/StringEnum.md
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
**value** | **str** | | must be one of ["placed", "approved", "delivered", "single quoted", '''multiple
lines''', '''double quote
with newline''', ]
+**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/docs/StringEnumWithDefaultValue.md b/samples/openapi3/client/petstore/python/docs/StringEnumWithDefaultValue.md
index 7799b93d822..700a2caf3b8 100644
--- a/samples/openapi3/client/petstore/python/docs/StringEnumWithDefaultValue.md
+++ b/samples/openapi3/client/petstore/python/docs/StringEnumWithDefaultValue.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**value** | **str** | | defaults to "placed", must be one of ["placed", "approved", "delivered", ]
+**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/docs/Tag.md b/samples/openapi3/client/petstore/python/docs/Tag.md
index 4ccac4949af..8a95090c036 100644
--- a/samples/openapi3/client/petstore/python/docs/Tag.md
+++ b/samples/openapi3/client/petstore/python/docs/Tag.md
@@ -6,6 +6,7 @@ Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**id** | **int** | | [optional]
**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/docs/TriangleInterface.md b/samples/openapi3/client/petstore/python/docs/TriangleInterface.md
index 494c224cd31..9f8411eabdf 100644
--- a/samples/openapi3/client/petstore/python/docs/TriangleInterface.md
+++ b/samples/openapi3/client/petstore/python/docs/TriangleInterface.md
@@ -5,6 +5,7 @@
Name | Type | Description | Notes
------------ | ------------- | ------------- | -------------
**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/docs/User.md b/samples/openapi3/client/petstore/python/docs/User.md
index a4cb117e63a..4d2da357adb 100644
--- a/samples/openapi3/client/petstore/python/docs/User.md
+++ b/samples/openapi3/client/petstore/python/docs/User.md
@@ -16,6 +16,7 @@ Name | Type | Description | Notes
**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]
+**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/docs/Whale.md b/samples/openapi3/client/petstore/python/docs/Whale.md
index ea48bff6bc3..500786012ea 100644
--- a/samples/openapi3/client/petstore/python/docs/Whale.md
+++ b/samples/openapi3/client/petstore/python/docs/Whale.md
@@ -7,6 +7,7 @@ Name | Type | Description | Notes
**class_name** | **str** | |
**has_baleen** | **bool** | | [optional]
**has_teeth** | **bool** | | [optional]
+**any string name** | **bool, date, datetime, dict, float, int, list, str, none_type** | any string name can be used but the value must be the correct type | [optional]
[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_class.py b/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_class.py
index 3b526cd54e3..82aca2a9ca8 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_class.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/additional_properties_class.py
@@ -57,7 +57,13 @@ class AdditionalPropertiesClass(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
@@ -78,7 +84,7 @@ class AdditionalPropertiesClass(ModelNormal):
'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
+ 'empty_map': (dict,), # noqa: E501
'map_with_undeclared_properties_string': ({str: (str,)},), # noqa: E501
}
@@ -150,7 +156,7 @@ class AdditionalPropertiesClass(ModelNormal):
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
+ empty_map (dict): 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
"""
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/animal.py b/samples/openapi3/client/petstore/python/petstore_api/model/animal.py
index a3d48b6ea97..c53b1e1ad28 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/animal.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/animal.py
@@ -63,7 +63,14 @@ class Animal(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/animal_farm.py b/samples/openapi3/client/petstore/python/petstore_api/model/animal_farm.py
index 838b18a1297..fb58224ebd4 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/animal_farm.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/animal_farm.py
@@ -57,7 +57,14 @@ class AnimalFarm(ModelSimple):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/api_response.py b/samples/openapi3/client/petstore/python/petstore_api/model/api_response.py
index 01e2175b800..53adb5aba12 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/api_response.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/api_response.py
@@ -57,7 +57,13 @@ class ApiResponse(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/apple.py b/samples/openapi3/client/petstore/python/petstore_api/model/apple.py
index 29d34a1efe8..4068d2488e5 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/apple.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/apple.py
@@ -68,7 +68,13 @@ class Apple(ModelNormal):
},
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = True
@@ -109,9 +115,12 @@ class Apple(ModelNormal):
])
@convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
+ def __init__(self, cultivar, *args, **kwargs): # noqa: E501
"""Apple - a model defined in OpenAPI
+ Args:
+ cultivar (str):
+
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
@@ -143,7 +152,6 @@ class Apple(ModelNormal):
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
- cultivar (str): [optional] # noqa: E501
origin (str): [optional] # noqa: E501
"""
@@ -170,6 +178,7 @@ class Apple(ModelNormal):
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+ self.cultivar = cultivar
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_array_of_number_only.py
index 008b74dd42a..8b6a2c42d0e 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_array_of_number_only.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_array_of_number_only.py
@@ -57,7 +57,13 @@ class ArrayOfArrayOfNumberOnly(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_enums.py b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_enums.py
index a3dc283969a..8d9962152ed 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_enums.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_enums.py
@@ -57,7 +57,14 @@ class ArrayOfEnums(ModelSimple):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_number_only.py b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_number_only.py
index f2e080bc258..7b754dc283e 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/array_of_number_only.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/array_of_number_only.py
@@ -57,7 +57,13 @@ class ArrayOfNumberOnly(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/array_test.py b/samples/openapi3/client/petstore/python/petstore_api/model/array_test.py
index ac42b07b93c..9691a1e6037 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/array_test.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/array_test.py
@@ -61,7 +61,14 @@ class ArrayTest(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/banana.py b/samples/openapi3/client/petstore/python/petstore_api/model/banana.py
index 513bd6bf06b..24ad257e6d2 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/banana.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/banana.py
@@ -57,7 +57,13 @@ class Banana(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
@@ -96,9 +102,12 @@ class Banana(ModelNormal):
])
@convert_js_args_to_python_args
- def __init__(self, *args, **kwargs): # noqa: E501
+ def __init__(self, length_cm, *args, **kwargs): # noqa: E501
"""Banana - a model defined in OpenAPI
+ Args:
+ length_cm (float):
+
Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
@@ -130,7 +139,6 @@ class Banana(ModelNormal):
Animal class but this time we won't travel
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
- length_cm (float): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
@@ -156,6 +164,7 @@ class Banana(ModelNormal):
self._configuration = _configuration
self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+ self.length_cm = length_cm
for var_name, var_value in kwargs.items():
if var_name not in self.attribute_map and \
self._configuration is not None and \
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/basque_pig.py b/samples/openapi3/client/petstore/python/petstore_api/model/basque_pig.py
index 603f7761867..25b336460bc 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/basque_pig.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/basque_pig.py
@@ -57,7 +57,13 @@ class BasquePig(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/capitalization.py b/samples/openapi3/client/petstore/python/petstore_api/model/capitalization.py
index 710c17e51a5..6d939535cee 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/capitalization.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/capitalization.py
@@ -57,7 +57,13 @@ class Capitalization(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/cat.py b/samples/openapi3/client/petstore/python/petstore_api/model/cat.py
index 1d62177c6c2..eeea79359fc 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/cat.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/cat.py
@@ -27,10 +27,8 @@ from petstore_api.model_utils import ( # noqa: F401
)
def lazy_import():
- from petstore_api.model.address import Address
from petstore_api.model.animal import Animal
from petstore_api.model.cat_all_of import CatAllOf
- globals()['Address'] = Address
globals()['Animal'] = Animal
globals()['CatAllOf'] = CatAllOf
@@ -120,13 +118,11 @@ class Cat(ModelComposed):
])
@convert_js_args_to_python_args
- def __init__(self, class_name, *args, **kwargs): # noqa: E501
+ def __init__(self, *args, **kwargs): # noqa: E501
"""Cat - a model defined in OpenAPI
- Args:
- class_name (str):
-
Keyword Args:
+ class_name (str):
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
@@ -191,26 +187,18 @@ class Cat(ModelComposed):
'_configuration': _configuration,
'_visited_composed_classes': self._visited_composed_classes,
}
- required_args = {
- 'class_name': class_name,
- }
- model_args = {}
- model_args.update(required_args)
- model_args.update(kwargs)
composed_info = validate_get_composed_info(
- constant_args, model_args, self)
+ constant_args, kwargs, self)
self._composed_instances = composed_info[0]
self._var_name_to_model_instances = composed_info[1]
self._additional_properties_model_instances = composed_info[2]
- unused_args = composed_info[3]
+ discarded_args = composed_info[3]
- for var_name, var_value in required_args.items():
- setattr(self, var_name, var_value)
for var_name, var_value in kwargs.items():
- if var_name in unused_args and \
+ if var_name in discarded_args and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
- not self._additional_properties_model_instances:
+ self._additional_properties_model_instances:
# discard variable.
continue
setattr(self, var_name, var_value)
@@ -229,7 +217,6 @@ class Cat(ModelComposed):
'anyOf': [
],
'allOf': [
- Address,
Animal,
CatAllOf,
],
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/cat_all_of.py b/samples/openapi3/client/petstore/python/petstore_api/model/cat_all_of.py
index 50b046510df..7efba680b4d 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/cat_all_of.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/cat_all_of.py
@@ -57,7 +57,13 @@ class CatAllOf(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/category.py b/samples/openapi3/client/petstore/python/petstore_api/model/category.py
index ed167471d35..4936b4f0e44 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/category.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/category.py
@@ -57,7 +57,13 @@ class Category(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/child_cat.py b/samples/openapi3/client/petstore/python/petstore_api/model/child_cat.py
index e1869c917cd..d054cb7a97a 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/child_cat.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/child_cat.py
@@ -116,13 +116,11 @@ class ChildCat(ModelComposed):
])
@convert_js_args_to_python_args
- def __init__(self, pet_type, *args, **kwargs): # noqa: E501
+ def __init__(self, *args, **kwargs): # noqa: E501
"""ChildCat - a model defined in OpenAPI
- Args:
- pet_type (str):
-
Keyword Args:
+ pet_type (str):
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
@@ -186,26 +184,18 @@ class ChildCat(ModelComposed):
'_configuration': _configuration,
'_visited_composed_classes': self._visited_composed_classes,
}
- required_args = {
- 'pet_type': pet_type,
- }
- model_args = {}
- model_args.update(required_args)
- model_args.update(kwargs)
composed_info = validate_get_composed_info(
- constant_args, model_args, self)
+ constant_args, kwargs, self)
self._composed_instances = composed_info[0]
self._var_name_to_model_instances = composed_info[1]
self._additional_properties_model_instances = composed_info[2]
- unused_args = composed_info[3]
+ discarded_args = composed_info[3]
- for var_name, var_value in required_args.items():
- setattr(self, var_name, var_value)
for var_name, var_value in kwargs.items():
- if var_name in unused_args and \
+ if var_name in discarded_args and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
- not self._additional_properties_model_instances:
+ self._additional_properties_model_instances:
# discard variable.
continue
setattr(self, var_name, var_value)
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/child_cat_all_of.py b/samples/openapi3/client/petstore/python/petstore_api/model/child_cat_all_of.py
index f0f1a1ae6bd..3d732d085fb 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/child_cat_all_of.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/child_cat_all_of.py
@@ -57,7 +57,13 @@ class ChildCatAllOf(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/class_model.py b/samples/openapi3/client/petstore/python/petstore_api/model/class_model.py
index 18c16f89f90..9e65a937365 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/class_model.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/class_model.py
@@ -57,7 +57,13 @@ class ClassModel(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/client.py b/samples/openapi3/client/petstore/python/petstore_api/model/client.py
index da615c54773..6218de1e19e 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/client.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/client.py
@@ -57,7 +57,13 @@ class Client(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/complex_quadrilateral.py b/samples/openapi3/client/petstore/python/petstore_api/model/complex_quadrilateral.py
index 56853f5f34f..e461673adbd 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/complex_quadrilateral.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/complex_quadrilateral.py
@@ -113,14 +113,12 @@ class ComplexQuadrilateral(ModelComposed):
])
@convert_js_args_to_python_args
- def __init__(self, shape_type, quadrilateral_type, *args, **kwargs): # noqa: E501
+ def __init__(self, *args, **kwargs): # noqa: E501
"""ComplexQuadrilateral - a model defined in OpenAPI
- Args:
+ Keyword Args:
shape_type (str):
quadrilateral_type (str):
-
- Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
@@ -183,27 +181,18 @@ class ComplexQuadrilateral(ModelComposed):
'_configuration': _configuration,
'_visited_composed_classes': self._visited_composed_classes,
}
- required_args = {
- 'shape_type': shape_type,
- 'quadrilateral_type': quadrilateral_type,
- }
- model_args = {}
- model_args.update(required_args)
- model_args.update(kwargs)
composed_info = validate_get_composed_info(
- constant_args, model_args, self)
+ constant_args, kwargs, self)
self._composed_instances = composed_info[0]
self._var_name_to_model_instances = composed_info[1]
self._additional_properties_model_instances = composed_info[2]
- unused_args = composed_info[3]
+ discarded_args = composed_info[3]
- for var_name, var_value in required_args.items():
- setattr(self, var_name, var_value)
for var_name, var_value in kwargs.items():
- if var_name in unused_args and \
+ if var_name in discarded_args and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
- not self._additional_properties_model_instances:
+ self._additional_properties_model_instances:
# discard variable.
continue
setattr(self, var_name, var_value)
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_one_of_number_with_validations.py b/samples/openapi3/client/petstore/python/petstore_api/model/composed_one_of_number_with_validations.py
index 4a1129432f5..299c866cf8f 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/composed_one_of_number_with_validations.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/composed_one_of_number_with_validations.py
@@ -181,25 +181,18 @@ class ComposedOneOfNumberWithValidations(ModelComposed):
'_configuration': _configuration,
'_visited_composed_classes': self._visited_composed_classes,
}
- required_args = {
- }
- model_args = {}
- model_args.update(required_args)
- model_args.update(kwargs)
composed_info = validate_get_composed_info(
- constant_args, model_args, self)
+ constant_args, kwargs, self)
self._composed_instances = composed_info[0]
self._var_name_to_model_instances = composed_info[1]
self._additional_properties_model_instances = composed_info[2]
- unused_args = composed_info[3]
+ discarded_args = composed_info[3]
- for var_name, var_value in required_args.items():
- setattr(self, var_name, var_value)
for var_name, var_value in kwargs.items():
- if var_name in unused_args and \
+ if var_name in discarded_args and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
- not self._additional_properties_model_instances:
+ self._additional_properties_model_instances:
# discard variable.
continue
setattr(self, var_name, var_value)
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/composed_schema_with_props_and_no_add_props.py b/samples/openapi3/client/petstore/python/petstore_api/model/composed_schema_with_props_and_no_add_props.py
new file mode 100644
index 00000000000..518f4774b55
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/composed_schema_with_props_and_no_add_props.py
@@ -0,0 +1,212 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import re # noqa: F401
+import sys # noqa: F401
+
+from petstore_api.model_utils import ( # noqa: F401
+ ApiTypeError,
+ ModelComposed,
+ ModelNormal,
+ ModelSimple,
+ cached_property,
+ change_keys_js_to_python,
+ convert_js_args_to_python_args,
+ date,
+ datetime,
+ file_type,
+ none_type,
+ validate_get_composed_info,
+)
+
+def lazy_import():
+ from petstore_api.model.tag import Tag
+ globals()['Tag'] = Tag
+
+
+class ComposedSchemaWithPropsAndNoAddProps(ModelComposed):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+
+ Attributes:
+ allowed_values (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ with a capitalized key describing the allowed value and an allowed
+ value. These dicts store the allowed enum values.
+ attribute_map (dict): The key is attribute name
+ and the value is json key in definition.
+ discriminator_value_class_map (dict): A dict to go from the discriminator
+ variable value to the discriminator class name.
+ validations (dict): The key is the tuple path to the attribute
+ and the for var_name this is (var_name,). The value is a dict
+ that stores validations for max_length, min_length, max_items,
+ min_items, exclusive_maximum, inclusive_maximum, exclusive_minimum,
+ inclusive_minimum, and regex.
+ additional_properties_type (tuple): A tuple of classes accepted
+ as additional properties values.
+ """
+
+ allowed_values = {
+ }
+
+ validations = {
+ }
+
+ additional_properties_type = None
+
+ _nullable = False
+
+ @cached_property
+ def openapi_types():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+
+ Returns
+ openapi_types (dict): The key is attribute name
+ and the value is attribute type.
+ """
+ lazy_import()
+ return {
+ 'color': (str,), # noqa: E501
+ 'id': (int,), # noqa: E501
+ 'name': (str,), # noqa: E501
+ }
+
+ @cached_property
+ def discriminator():
+ return None
+
+
+ attribute_map = {
+ 'color': 'color', # noqa: E501
+ 'id': 'id', # noqa: E501
+ 'name': 'name', # noqa: E501
+ }
+
+ required_properties = set([
+ '_data_store',
+ '_check_type',
+ '_spec_property_naming',
+ '_path_to_item',
+ '_configuration',
+ '_visited_composed_classes',
+ '_composed_instances',
+ '_var_name_to_model_instances',
+ '_additional_properties_model_instances',
+ ])
+
+ @convert_js_args_to_python_args
+ def __init__(self, *args, **kwargs): # noqa: E501
+ """ComposedSchemaWithPropsAndNoAddProps - a model defined in OpenAPI
+
+ Keyword Args:
+ _check_type (bool): if True, values for parameters in openapi_types
+ will be type checked and a TypeError will be
+ raised if the wrong type is input.
+ Defaults to True
+ _path_to_item (tuple/list): This is a list of keys or values to
+ drill down to the model in received_data
+ when deserializing a response
+ _spec_property_naming (bool): True if the variable names in the input data
+ are serialized names, as specified in the OpenAPI document.
+ False if the variable names in the input data
+ are pythonic names, e.g. snake case (default)
+ _configuration (Configuration): the instance to use when
+ deserializing a file_type parameter.
+ If passed, type conversion is attempted
+ If omitted no type conversion is done.
+ _visited_composed_classes (tuple): This stores a tuple of
+ classes that we have traveled through so that
+ if we see that class again we will not use its
+ discriminator again.
+ When traveling through a discriminator, the
+ composed schema that is
+ is traveled through is added to this set.
+ For example if Animal has a discriminator
+ petType and we pass in "Dog", and the class Dog
+ allOf includes Animal, we move through Animal
+ once using the discriminator, and pick Dog.
+ Then in Dog, we will make an instance of the
+ Animal class but this time we won't travel
+ through its discriminator because we passed in
+ _visited_composed_classes = (Animal,)
+ color (str): [optional] # noqa: E501
+ id (int): [optional] # noqa: E501
+ 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
+ self._path_to_item = _path_to_item
+ self._configuration = _configuration
+ self._visited_composed_classes = _visited_composed_classes + (self.__class__,)
+
+ constant_args = {
+ '_check_type': _check_type,
+ '_path_to_item': _path_to_item,
+ '_spec_property_naming': _spec_property_naming,
+ '_configuration': _configuration,
+ '_visited_composed_classes': self._visited_composed_classes,
+ }
+ composed_info = validate_get_composed_info(
+ constant_args, kwargs, self)
+ self._composed_instances = composed_info[0]
+ self._var_name_to_model_instances = composed_info[1]
+ self._additional_properties_model_instances = composed_info[2]
+ discarded_args = composed_info[3]
+
+ for var_name, var_value in kwargs.items():
+ if var_name in discarded_args and \
+ self._configuration is not None and \
+ self._configuration.discard_unknown_keys and \
+ self._additional_properties_model_instances:
+ # discard variable.
+ continue
+ setattr(self, var_name, var_value)
+
+ @cached_property
+ def _composed_schemas():
+ # we need this here to make our import statements work
+ # we must store _composed_schemas in here so the code is only run
+ # when we invoke this method. If we kept this at the class
+ # level we would get an error beause the class level
+ # code would be run when this module is imported, and these composed
+ # classes don't exist yet because their module has not finished
+ # loading
+ lazy_import()
+ return {
+ 'anyOf': [
+ ],
+ 'allOf': [
+ Tag,
+ ],
+ 'oneOf': [
+ ],
+ }
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/danish_pig.py b/samples/openapi3/client/petstore/python/petstore_api/model/danish_pig.py
index 5a6e424a4ec..82215915e84 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/danish_pig.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/danish_pig.py
@@ -57,7 +57,13 @@ class DanishPig(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/dog.py b/samples/openapi3/client/petstore/python/petstore_api/model/dog.py
index 8bf6d8fd3ad..3452f0d040a 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/dog.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/dog.py
@@ -118,13 +118,11 @@ class Dog(ModelComposed):
])
@convert_js_args_to_python_args
- def __init__(self, class_name, *args, **kwargs): # noqa: E501
+ def __init__(self, *args, **kwargs): # noqa: E501
"""Dog - a model defined in OpenAPI
- Args:
- class_name (str):
-
Keyword Args:
+ class_name (str):
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
@@ -189,26 +187,18 @@ class Dog(ModelComposed):
'_configuration': _configuration,
'_visited_composed_classes': self._visited_composed_classes,
}
- required_args = {
- 'class_name': class_name,
- }
- model_args = {}
- model_args.update(required_args)
- model_args.update(kwargs)
composed_info = validate_get_composed_info(
- constant_args, model_args, self)
+ constant_args, kwargs, self)
self._composed_instances = composed_info[0]
self._var_name_to_model_instances = composed_info[1]
self._additional_properties_model_instances = composed_info[2]
- unused_args = composed_info[3]
+ discarded_args = composed_info[3]
- for var_name, var_value in required_args.items():
- setattr(self, var_name, var_value)
for var_name, var_value in kwargs.items():
- if var_name in unused_args and \
+ if var_name in discarded_args and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
- not self._additional_properties_model_instances:
+ self._additional_properties_model_instances:
# discard variable.
continue
setattr(self, var_name, var_value)
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/dog_all_of.py b/samples/openapi3/client/petstore/python/petstore_api/model/dog_all_of.py
index b7b2e7db66d..962903d3a38 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/dog_all_of.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/dog_all_of.py
@@ -57,7 +57,13 @@ class DogAllOf(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/enum_arrays.py b/samples/openapi3/client/petstore/python/petstore_api/model/enum_arrays.py
index 43ebac57de3..db56838d7e4 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/enum_arrays.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/enum_arrays.py
@@ -65,7 +65,13 @@ class EnumArrays(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/enum_class.py b/samples/openapi3/client/petstore/python/petstore_api/model/enum_class.py
index 14188ca31d2..63be703c38e 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/enum_class.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/enum_class.py
@@ -58,7 +58,13 @@ class EnumClass(ModelSimple):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/enum_test.py b/samples/openapi3/client/petstore/python/petstore_api/model/enum_test.py
index c0284b371a9..23ddbcf9a2c 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/enum_test.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/enum_test.py
@@ -89,7 +89,14 @@ class EnumTest(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/equilateral_triangle.py b/samples/openapi3/client/petstore/python/petstore_api/model/equilateral_triangle.py
index a536701d701..e5e4104bd02 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/equilateral_triangle.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/equilateral_triangle.py
@@ -113,14 +113,12 @@ class EquilateralTriangle(ModelComposed):
])
@convert_js_args_to_python_args
- def __init__(self, shape_type, triangle_type, *args, **kwargs): # noqa: E501
+ def __init__(self, *args, **kwargs): # noqa: E501
"""EquilateralTriangle - a model defined in OpenAPI
- Args:
+ Keyword Args:
shape_type (str):
triangle_type (str):
-
- Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
@@ -183,27 +181,18 @@ class EquilateralTriangle(ModelComposed):
'_configuration': _configuration,
'_visited_composed_classes': self._visited_composed_classes,
}
- required_args = {
- 'shape_type': shape_type,
- 'triangle_type': triangle_type,
- }
- model_args = {}
- model_args.update(required_args)
- model_args.update(kwargs)
composed_info = validate_get_composed_info(
- constant_args, model_args, self)
+ constant_args, kwargs, self)
self._composed_instances = composed_info[0]
self._var_name_to_model_instances = composed_info[1]
self._additional_properties_model_instances = composed_info[2]
- unused_args = composed_info[3]
+ discarded_args = composed_info[3]
- for var_name, var_value in required_args.items():
- setattr(self, var_name, var_value)
for var_name, var_value in kwargs.items():
- if var_name in unused_args and \
+ if var_name in discarded_args and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
- not self._additional_properties_model_instances:
+ self._additional_properties_model_instances:
# discard variable.
continue
setattr(self, var_name, var_value)
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/fake_get_inline_additional_properties_payload_array_data.py b/samples/openapi3/client/petstore/python/petstore_api/model/fake_get_inline_additional_properties_payload_array_data.py
index bbbc449b429..833bbdd8261 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/fake_get_inline_additional_properties_payload_array_data.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/fake_get_inline_additional_properties_payload_array_data.py
@@ -57,7 +57,13 @@ class FakeGetInlineAdditionalPropertiesPayloadArrayData(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/file.py b/samples/openapi3/client/petstore/python/petstore_api/model/file.py
index a38cccacc6a..137d0026324 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/file.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/file.py
@@ -57,7 +57,13 @@ class File(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/file_schema_test_class.py b/samples/openapi3/client/petstore/python/petstore_api/model/file_schema_test_class.py
index b8c519ed9c7..3722125ae48 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/file_schema_test_class.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/file_schema_test_class.py
@@ -61,7 +61,14 @@ class FileSchemaTestClass(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/foo.py b/samples/openapi3/client/petstore/python/petstore_api/model/foo.py
index ebbb09adf91..7c319dc9995 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/foo.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/foo.py
@@ -57,7 +57,13 @@ class Foo(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/format_test.py b/samples/openapi3/client/petstore/python/petstore_api/model/format_test.py
index b232da04b45..cce7f7f0981 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/format_test.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/format_test.py
@@ -100,7 +100,13 @@ class FormatTest(ModelNormal):
},
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/fruit.py b/samples/openapi3/client/petstore/python/petstore_api/model/fruit.py
index 15ea987edf5..c7283f99d0c 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/fruit.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/fruit.py
@@ -74,7 +74,14 @@ class Fruit(ModelComposed):
},
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
@@ -90,10 +97,10 @@ class Fruit(ModelComposed):
"""
lazy_import()
return {
- 'color': (str,), # noqa: E501
'cultivar': (str,), # noqa: E501
- 'origin': (str,), # noqa: E501
'length_cm': (float,), # noqa: E501
+ 'color': (str,), # noqa: E501
+ 'origin': (str,), # noqa: E501
}
@cached_property
@@ -102,10 +109,10 @@ class Fruit(ModelComposed):
attribute_map = {
- 'color': 'color', # noqa: E501
'cultivar': 'cultivar', # noqa: E501
- 'origin': 'origin', # noqa: E501
'length_cm': 'lengthCm', # noqa: E501
+ 'color': 'color', # noqa: E501
+ 'origin': 'origin', # noqa: E501
}
required_properties = set([
@@ -125,6 +132,8 @@ class Fruit(ModelComposed):
"""Fruit - a model defined in OpenAPI
Keyword Args:
+ cultivar (str):
+ length_cm (float):
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
@@ -156,9 +165,7 @@ class Fruit(ModelComposed):
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
color (str): [optional] # noqa: E501
- cultivar (str): [optional] # noqa: E501
origin (str): [optional] # noqa: E501
- length_cm (float): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
@@ -191,25 +198,18 @@ class Fruit(ModelComposed):
'_configuration': _configuration,
'_visited_composed_classes': self._visited_composed_classes,
}
- required_args = {
- }
- model_args = {}
- model_args.update(required_args)
- model_args.update(kwargs)
composed_info = validate_get_composed_info(
- constant_args, model_args, self)
+ constant_args, kwargs, self)
self._composed_instances = composed_info[0]
self._var_name_to_model_instances = composed_info[1]
self._additional_properties_model_instances = composed_info[2]
- unused_args = composed_info[3]
+ discarded_args = composed_info[3]
- for var_name, var_value in required_args.items():
- setattr(self, var_name, var_value)
for var_name, var_value in kwargs.items():
- if var_name in unused_args and \
+ if var_name in discarded_args and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
- not self._additional_properties_model_instances:
+ self._additional_properties_model_instances:
# discard variable.
continue
setattr(self, var_name, var_value)
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/fruit_req.py b/samples/openapi3/client/petstore/python/petstore_api/model/fruit_req.py
index 13c4d6424a5..519aa6d20eb 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/fruit_req.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/fruit_req.py
@@ -63,7 +63,14 @@ class FruitReq(ModelComposed):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
@@ -180,25 +187,18 @@ class FruitReq(ModelComposed):
'_configuration': _configuration,
'_visited_composed_classes': self._visited_composed_classes,
}
- required_args = {
- }
- model_args = {}
- model_args.update(required_args)
- model_args.update(kwargs)
composed_info = validate_get_composed_info(
- constant_args, model_args, self)
+ constant_args, kwargs, self)
self._composed_instances = composed_info[0]
self._var_name_to_model_instances = composed_info[1]
self._additional_properties_model_instances = composed_info[2]
- unused_args = composed_info[3]
+ discarded_args = composed_info[3]
- for var_name, var_value in required_args.items():
- setattr(self, var_name, var_value)
for var_name, var_value in kwargs.items():
- if var_name in unused_args and \
+ if var_name in discarded_args and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
- not self._additional_properties_model_instances:
+ self._additional_properties_model_instances:
# discard variable.
continue
setattr(self, var_name, var_value)
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/gm_fruit.py b/samples/openapi3/client/petstore/python/petstore_api/model/gm_fruit.py
index f3ad29beb4c..dc9299c2a1b 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/gm_fruit.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/gm_fruit.py
@@ -74,7 +74,14 @@ class GmFruit(ModelComposed):
},
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
@@ -90,10 +97,10 @@ class GmFruit(ModelComposed):
"""
lazy_import()
return {
- 'color': (str,), # noqa: E501
'cultivar': (str,), # noqa: E501
- 'origin': (str,), # noqa: E501
'length_cm': (float,), # noqa: E501
+ 'color': (str,), # noqa: E501
+ 'origin': (str,), # noqa: E501
}
@cached_property
@@ -102,10 +109,10 @@ class GmFruit(ModelComposed):
attribute_map = {
- 'color': 'color', # noqa: E501
'cultivar': 'cultivar', # noqa: E501
- 'origin': 'origin', # noqa: E501
'length_cm': 'lengthCm', # noqa: E501
+ 'color': 'color', # noqa: E501
+ 'origin': 'origin', # noqa: E501
}
required_properties = set([
@@ -125,6 +132,8 @@ class GmFruit(ModelComposed):
"""GmFruit - a model defined in OpenAPI
Keyword Args:
+ cultivar (str):
+ length_cm (float):
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
@@ -156,9 +165,7 @@ class GmFruit(ModelComposed):
through its discriminator because we passed in
_visited_composed_classes = (Animal,)
color (str): [optional] # noqa: E501
- cultivar (str): [optional] # noqa: E501
origin (str): [optional] # noqa: E501
- length_cm (float): [optional] # noqa: E501
"""
_check_type = kwargs.pop('_check_type', True)
@@ -191,25 +198,18 @@ class GmFruit(ModelComposed):
'_configuration': _configuration,
'_visited_composed_classes': self._visited_composed_classes,
}
- required_args = {
- }
- model_args = {}
- model_args.update(required_args)
- model_args.update(kwargs)
composed_info = validate_get_composed_info(
- constant_args, model_args, self)
+ constant_args, kwargs, self)
self._composed_instances = composed_info[0]
self._var_name_to_model_instances = composed_info[1]
self._additional_properties_model_instances = composed_info[2]
- unused_args = composed_info[3]
+ discarded_args = composed_info[3]
- for var_name, var_value in required_args.items():
- setattr(self, var_name, var_value)
for var_name, var_value in kwargs.items():
- if var_name in unused_args and \
+ if var_name in discarded_args and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
- not self._additional_properties_model_instances:
+ self._additional_properties_model_instances:
# discard variable.
continue
setattr(self, var_name, var_value)
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/grandparent_animal.py b/samples/openapi3/client/petstore/python/petstore_api/model/grandparent_animal.py
index f7c417562ec..70523affd89 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/grandparent_animal.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/grandparent_animal.py
@@ -63,7 +63,14 @@ class GrandparentAnimal(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/has_only_read_only.py b/samples/openapi3/client/petstore/python/petstore_api/model/has_only_read_only.py
index c94781ae2c4..4ea0bb08721 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/has_only_read_only.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/has_only_read_only.py
@@ -57,7 +57,13 @@ class HasOnlyReadOnly(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/health_check_result.py b/samples/openapi3/client/petstore/python/petstore_api/model/health_check_result.py
index 3c0cd37dfad..356ddea3cb1 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/health_check_result.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/health_check_result.py
@@ -57,7 +57,13 @@ class HealthCheckResult(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/inline_additional_properties_ref_payload.py b/samples/openapi3/client/petstore/python/petstore_api/model/inline_additional_properties_ref_payload.py
index 4d8e8aecff3..9c78998902a 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/inline_additional_properties_ref_payload.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/inline_additional_properties_ref_payload.py
@@ -61,7 +61,14 @@ class InlineAdditionalPropertiesRefPayload(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/inline_object6.py b/samples/openapi3/client/petstore/python/petstore_api/model/inline_object6.py
index d60fec5fa68..ee93b74eac9 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/inline_object6.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/inline_object6.py
@@ -61,7 +61,14 @@ class InlineObject6(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/inline_response_default.py b/samples/openapi3/client/petstore/python/petstore_api/model/inline_response_default.py
index 8e814cf4383..cb7b9985ea8 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/inline_response_default.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/inline_response_default.py
@@ -61,7 +61,14 @@ class InlineResponseDefault(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum.py b/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum.py
index a01fc614922..a31cd7c5695 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum.py
@@ -58,7 +58,13 @@ class IntegerEnum(ModelSimple):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_one_value.py b/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_one_value.py
index 0d69cd535b3..f8fc86bfba7 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_one_value.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_one_value.py
@@ -56,7 +56,13 @@ class IntegerEnumOneValue(ModelSimple):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_with_default_value.py b/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_with_default_value.py
index 958b2ad2e39..3c56da865f6 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_with_default_value.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/integer_enum_with_default_value.py
@@ -58,7 +58,13 @@ class IntegerEnumWithDefaultValue(ModelSimple):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/isosceles_triangle.py b/samples/openapi3/client/petstore/python/petstore_api/model/isosceles_triangle.py
index 27197f5a235..b1f64bcb0db 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/isosceles_triangle.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/isosceles_triangle.py
@@ -63,7 +63,14 @@ class IsoscelesTriangle(ModelComposed):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
@@ -106,14 +113,12 @@ class IsoscelesTriangle(ModelComposed):
])
@convert_js_args_to_python_args
- def __init__(self, shape_type, triangle_type, *args, **kwargs): # noqa: E501
+ def __init__(self, *args, **kwargs): # noqa: E501
"""IsoscelesTriangle - a model defined in OpenAPI
- Args:
+ Keyword Args:
shape_type (str):
triangle_type (str):
-
- Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
@@ -176,27 +181,18 @@ class IsoscelesTriangle(ModelComposed):
'_configuration': _configuration,
'_visited_composed_classes': self._visited_composed_classes,
}
- required_args = {
- 'shape_type': shape_type,
- 'triangle_type': triangle_type,
- }
- model_args = {}
- model_args.update(required_args)
- model_args.update(kwargs)
composed_info = validate_get_composed_info(
- constant_args, model_args, self)
+ constant_args, kwargs, self)
self._composed_instances = composed_info[0]
self._var_name_to_model_instances = composed_info[1]
self._additional_properties_model_instances = composed_info[2]
- unused_args = composed_info[3]
+ discarded_args = composed_info[3]
- for var_name, var_value in required_args.items():
- setattr(self, var_name, var_value)
for var_name, var_value in kwargs.items():
- if var_name in unused_args and \
+ if var_name in discarded_args and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
- not self._additional_properties_model_instances:
+ self._additional_properties_model_instances:
# discard variable.
continue
setattr(self, var_name, var_value)
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/list.py b/samples/openapi3/client/petstore/python/petstore_api/model/list.py
index 09c762d6a79..11b46f10b56 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/list.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/list.py
@@ -57,7 +57,13 @@ class List(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/mammal.py b/samples/openapi3/client/petstore/python/petstore_api/model/mammal.py
index 067adf79350..234933fe1a8 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/mammal.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/mammal.py
@@ -131,13 +131,11 @@ class Mammal(ModelComposed):
])
@convert_js_args_to_python_args
- def __init__(self, class_name, *args, **kwargs): # noqa: E501
+ def __init__(self, *args, **kwargs): # noqa: E501
"""Mammal - a model defined in OpenAPI
- Args:
- class_name (str):
-
Keyword Args:
+ class_name (str):
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
@@ -203,26 +201,18 @@ class Mammal(ModelComposed):
'_configuration': _configuration,
'_visited_composed_classes': self._visited_composed_classes,
}
- required_args = {
- 'class_name': class_name,
- }
- model_args = {}
- model_args.update(required_args)
- model_args.update(kwargs)
composed_info = validate_get_composed_info(
- constant_args, model_args, self)
+ constant_args, kwargs, self)
self._composed_instances = composed_info[0]
self._var_name_to_model_instances = composed_info[1]
self._additional_properties_model_instances = composed_info[2]
- unused_args = composed_info[3]
+ discarded_args = composed_info[3]
- for var_name, var_value in required_args.items():
- setattr(self, var_name, var_value)
for var_name, var_value in kwargs.items():
- if var_name in unused_args and \
+ if var_name in discarded_args and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
- not self._additional_properties_model_instances:
+ self._additional_properties_model_instances:
# discard variable.
continue
setattr(self, var_name, var_value)
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/map_test.py b/samples/openapi3/client/petstore/python/petstore_api/model/map_test.py
index 169fb9d88ee..a5418b39e73 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/map_test.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/map_test.py
@@ -65,7 +65,14 @@ class MapTest(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.py
index 01df80d9d62..67b3f79d9e5 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/mixed_properties_and_additional_properties_class.py
@@ -61,7 +61,14 @@ class MixedPropertiesAndAdditionalPropertiesClass(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/model200_response.py b/samples/openapi3/client/petstore/python/petstore_api/model/model200_response.py
index 46b155b6523..056f4c56ad3 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/model200_response.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/model200_response.py
@@ -57,7 +57,13 @@ class Model200Response(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/model_return.py b/samples/openapi3/client/petstore/python/petstore_api/model/model_return.py
index 377b3507a8b..5f34582cdb4 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/model_return.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/model_return.py
@@ -57,7 +57,13 @@ class ModelReturn(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/name.py b/samples/openapi3/client/petstore/python/petstore_api/model/name.py
index 1432e185ad6..06b387ce9bf 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/name.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/name.py
@@ -57,7 +57,13 @@ class Name(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_class.py b/samples/openapi3/client/petstore/python/petstore_api/model/nullable_class.py
index a117dfa6916..f2c2cb7642e 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_class.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/nullable_class.py
@@ -63,7 +63,7 @@ class NullableClass(ModelNormal):
This must be a method because a model may have properties that are
of type self, this must run after the class is loaded
"""
- return ({str: (bool, date, datetime, dict, float, int, list, str, none_type)}, none_type,) # noqa: E501
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
@@ -87,6 +87,7 @@ class NullableClass(ModelNormal):
'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': ({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
@@ -107,6 +108,7 @@ class NullableClass(ModelNormal):
'array_nullable_prop': 'array_nullable_prop', # noqa: E501
'array_and_items_nullable_prop': 'array_and_items_nullable_prop', # noqa: E501
'array_items_nullable': 'array_items_nullable', # noqa: E501
+ 'object_nullable': 'object_nullable', # noqa: E501
'object_nullable_prop': 'object_nullable_prop', # noqa: E501
'object_and_items_nullable_prop': 'object_and_items_nullable_prop', # noqa: E501
'object_items_nullable': 'object_items_nullable', # noqa: E501
@@ -167,6 +169,7 @@ class NullableClass(ModelNormal):
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 ({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
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_shape.py b/samples/openapi3/client/petstore/python/petstore_api/model/nullable_shape.py
index fcd20ddfbc1..a2cf17e3e7b 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/nullable_shape.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/nullable_shape.py
@@ -121,13 +121,11 @@ class NullableShape(ModelComposed):
])
@convert_js_args_to_python_args
- def __init__(self, shape_type, *args, **kwargs): # noqa: E501
+ def __init__(self, *args, **kwargs): # noqa: E501
"""NullableShape - a model defined in OpenAPI
- Args:
- shape_type (str):
-
Keyword Args:
+ shape_type (str):
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
@@ -192,26 +190,18 @@ class NullableShape(ModelComposed):
'_configuration': _configuration,
'_visited_composed_classes': self._visited_composed_classes,
}
- required_args = {
- 'shape_type': shape_type,
- }
- model_args = {}
- model_args.update(required_args)
- model_args.update(kwargs)
composed_info = validate_get_composed_info(
- constant_args, model_args, self)
+ constant_args, kwargs, self)
self._composed_instances = composed_info[0]
self._var_name_to_model_instances = composed_info[1]
self._additional_properties_model_instances = composed_info[2]
- unused_args = composed_info[3]
+ discarded_args = composed_info[3]
- for var_name, var_value in required_args.items():
- setattr(self, var_name, var_value)
for var_name, var_value in kwargs.items():
- if var_name in unused_args and \
+ if var_name in discarded_args and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
- not self._additional_properties_model_instances:
+ self._additional_properties_model_instances:
# discard variable.
continue
setattr(self, var_name, var_value)
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/number_only.py b/samples/openapi3/client/petstore/python/petstore_api/model/number_only.py
index d4892dbede5..cb2c9e2ad52 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/number_only.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/number_only.py
@@ -57,7 +57,13 @@ class NumberOnly(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/number_with_validations.py b/samples/openapi3/client/petstore/python/petstore_api/model/number_with_validations.py
index ffa5e9cf462..a3b2746c22b 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/number_with_validations.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/number_with_validations.py
@@ -57,7 +57,13 @@ class NumberWithValidations(ModelSimple):
},
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_ref_props.py b/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_ref_props.py
index ee3613c4444..11db10a6128 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_ref_props.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/object_model_with_ref_props.py
@@ -63,7 +63,14 @@ class ObjectModelWithRefProps(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/order.py b/samples/openapi3/client/petstore/python/petstore_api/model/order.py
index b42f066848a..48207e4560e 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/order.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/order.py
@@ -62,7 +62,13 @@ class Order(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/parent_pet.py b/samples/openapi3/client/petstore/python/petstore_api/model/parent_pet.py
index 16099236da3..bda9c277996 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/parent_pet.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/parent_pet.py
@@ -116,13 +116,11 @@ class ParentPet(ModelComposed):
])
@convert_js_args_to_python_args
- def __init__(self, pet_type, *args, **kwargs): # noqa: E501
+ def __init__(self, *args, **kwargs): # noqa: E501
"""ParentPet - a model defined in OpenAPI
- Args:
- pet_type (str):
-
Keyword Args:
+ pet_type (str):
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
@@ -185,26 +183,18 @@ class ParentPet(ModelComposed):
'_configuration': _configuration,
'_visited_composed_classes': self._visited_composed_classes,
}
- required_args = {
- 'pet_type': pet_type,
- }
- model_args = {}
- model_args.update(required_args)
- model_args.update(kwargs)
composed_info = validate_get_composed_info(
- constant_args, model_args, self)
+ constant_args, kwargs, self)
self._composed_instances = composed_info[0]
self._var_name_to_model_instances = composed_info[1]
self._additional_properties_model_instances = composed_info[2]
- unused_args = composed_info[3]
+ discarded_args = composed_info[3]
- for var_name, var_value in required_args.items():
- setattr(self, var_name, var_value)
for var_name, var_value in kwargs.items():
- if var_name in unused_args and \
+ if var_name in discarded_args and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
- not self._additional_properties_model_instances:
+ self._additional_properties_model_instances:
# discard variable.
continue
setattr(self, var_name, var_value)
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/pet.py b/samples/openapi3/client/petstore/python/petstore_api/model/pet.py
index e9f1e30a319..b0c8b08607d 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/pet.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/pet.py
@@ -68,7 +68,14 @@ class Pet(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ lazy_import()
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/pig.py b/samples/openapi3/client/petstore/python/petstore_api/model/pig.py
index 4a6f200f6ff..21f61c65de0 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/pig.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/pig.py
@@ -117,13 +117,11 @@ class Pig(ModelComposed):
])
@convert_js_args_to_python_args
- def __init__(self, class_name, *args, **kwargs): # noqa: E501
+ def __init__(self, *args, **kwargs): # noqa: E501
"""Pig - a model defined in OpenAPI
- Args:
- class_name (str):
-
Keyword Args:
+ class_name (str):
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
@@ -186,26 +184,18 @@ class Pig(ModelComposed):
'_configuration': _configuration,
'_visited_composed_classes': self._visited_composed_classes,
}
- required_args = {
- 'class_name': class_name,
- }
- model_args = {}
- model_args.update(required_args)
- model_args.update(kwargs)
composed_info = validate_get_composed_info(
- constant_args, model_args, self)
+ constant_args, kwargs, self)
self._composed_instances = composed_info[0]
self._var_name_to_model_instances = composed_info[1]
self._additional_properties_model_instances = composed_info[2]
- unused_args = composed_info[3]
+ discarded_args = composed_info[3]
- for var_name, var_value in required_args.items():
- setattr(self, var_name, var_value)
for var_name, var_value in kwargs.items():
- if var_name in unused_args and \
+ if var_name in discarded_args and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
- not self._additional_properties_model_instances:
+ self._additional_properties_model_instances:
# discard variable.
continue
setattr(self, var_name, var_value)
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral.py b/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral.py
index 4e28ac0d238..d15d37cdbca 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral.py
@@ -119,13 +119,11 @@ class Quadrilateral(ModelComposed):
])
@convert_js_args_to_python_args
- def __init__(self, quadrilateral_type, *args, **kwargs): # noqa: E501
+ def __init__(self, *args, **kwargs): # noqa: E501
"""Quadrilateral - a model defined in OpenAPI
- Args:
- quadrilateral_type (str):
-
Keyword Args:
+ quadrilateral_type (str):
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
@@ -189,26 +187,18 @@ class Quadrilateral(ModelComposed):
'_configuration': _configuration,
'_visited_composed_classes': self._visited_composed_classes,
}
- required_args = {
- 'quadrilateral_type': quadrilateral_type,
- }
- model_args = {}
- model_args.update(required_args)
- model_args.update(kwargs)
composed_info = validate_get_composed_info(
- constant_args, model_args, self)
+ constant_args, kwargs, self)
self._composed_instances = composed_info[0]
self._var_name_to_model_instances = composed_info[1]
self._additional_properties_model_instances = composed_info[2]
- unused_args = composed_info[3]
+ discarded_args = composed_info[3]
- for var_name, var_value in required_args.items():
- setattr(self, var_name, var_value)
for var_name, var_value in kwargs.items():
- if var_name in unused_args and \
+ if var_name in discarded_args and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
- not self._additional_properties_model_instances:
+ self._additional_properties_model_instances:
# discard variable.
continue
setattr(self, var_name, var_value)
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral_interface.py b/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral_interface.py
index 124d9128bc5..872608885ac 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral_interface.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/quadrilateral_interface.py
@@ -57,7 +57,13 @@ class QuadrilateralInterface(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/read_only_first.py b/samples/openapi3/client/petstore/python/petstore_api/model/read_only_first.py
index 5c68eab91ea..0302bf96a7e 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/read_only_first.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/read_only_first.py
@@ -57,7 +57,13 @@ class ReadOnlyFirst(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/readonly.py b/samples/openapi3/client/petstore/python/petstore_api/model/readonly.py
index b5d137b467d..7d038917bb4 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/readonly.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/readonly.py
@@ -57,7 +57,13 @@ class Readonly(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/scalene_triangle.py b/samples/openapi3/client/petstore/python/petstore_api/model/scalene_triangle.py
index 1e3893627da..86fc0a4f495 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/scalene_triangle.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/scalene_triangle.py
@@ -113,14 +113,12 @@ class ScaleneTriangle(ModelComposed):
])
@convert_js_args_to_python_args
- def __init__(self, shape_type, triangle_type, *args, **kwargs): # noqa: E501
+ def __init__(self, *args, **kwargs): # noqa: E501
"""ScaleneTriangle - a model defined in OpenAPI
- Args:
+ Keyword Args:
shape_type (str):
triangle_type (str):
-
- Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
@@ -183,27 +181,18 @@ class ScaleneTriangle(ModelComposed):
'_configuration': _configuration,
'_visited_composed_classes': self._visited_composed_classes,
}
- required_args = {
- 'shape_type': shape_type,
- 'triangle_type': triangle_type,
- }
- model_args = {}
- model_args.update(required_args)
- model_args.update(kwargs)
composed_info = validate_get_composed_info(
- constant_args, model_args, self)
+ constant_args, kwargs, self)
self._composed_instances = composed_info[0]
self._var_name_to_model_instances = composed_info[1]
self._additional_properties_model_instances = composed_info[2]
- unused_args = composed_info[3]
+ discarded_args = composed_info[3]
- for var_name, var_value in required_args.items():
- setattr(self, var_name, var_value)
for var_name, var_value in kwargs.items():
- if var_name in unused_args and \
+ if var_name in discarded_args and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
- not self._additional_properties_model_instances:
+ self._additional_properties_model_instances:
# discard variable.
continue
setattr(self, var_name, var_value)
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/shape.py b/samples/openapi3/client/petstore/python/petstore_api/model/shape.py
index f5e3c142b91..763a7aa362b 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/shape.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/shape.py
@@ -121,13 +121,11 @@ class Shape(ModelComposed):
])
@convert_js_args_to_python_args
- def __init__(self, shape_type, *args, **kwargs): # noqa: E501
+ def __init__(self, *args, **kwargs): # noqa: E501
"""Shape - a model defined in OpenAPI
- Args:
- shape_type (str):
-
Keyword Args:
+ shape_type (str):
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
@@ -192,26 +190,18 @@ class Shape(ModelComposed):
'_configuration': _configuration,
'_visited_composed_classes': self._visited_composed_classes,
}
- required_args = {
- 'shape_type': shape_type,
- }
- model_args = {}
- model_args.update(required_args)
- model_args.update(kwargs)
composed_info = validate_get_composed_info(
- constant_args, model_args, self)
+ constant_args, kwargs, self)
self._composed_instances = composed_info[0]
self._var_name_to_model_instances = composed_info[1]
self._additional_properties_model_instances = composed_info[2]
- unused_args = composed_info[3]
+ discarded_args = composed_info[3]
- for var_name, var_value in required_args.items():
- setattr(self, var_name, var_value)
for var_name, var_value in kwargs.items():
- if var_name in unused_args and \
+ if var_name in discarded_args and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
- not self._additional_properties_model_instances:
+ self._additional_properties_model_instances:
# discard variable.
continue
setattr(self, var_name, var_value)
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/shape_interface.py b/samples/openapi3/client/petstore/python/petstore_api/model/shape_interface.py
index 8a3c52088be..b8ab31fc31c 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/shape_interface.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/shape_interface.py
@@ -57,7 +57,13 @@ class ShapeInterface(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/shape_or_null.py b/samples/openapi3/client/petstore/python/petstore_api/model/shape_or_null.py
index 480fa5bd5d6..403449e0c9c 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/shape_or_null.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/shape_or_null.py
@@ -121,13 +121,11 @@ class ShapeOrNull(ModelComposed):
])
@convert_js_args_to_python_args
- def __init__(self, shape_type, *args, **kwargs): # noqa: E501
+ def __init__(self, *args, **kwargs): # noqa: E501
"""ShapeOrNull - a model defined in OpenAPI
- Args:
- shape_type (str):
-
Keyword Args:
+ shape_type (str):
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
@@ -192,26 +190,18 @@ class ShapeOrNull(ModelComposed):
'_configuration': _configuration,
'_visited_composed_classes': self._visited_composed_classes,
}
- required_args = {
- 'shape_type': shape_type,
- }
- model_args = {}
- model_args.update(required_args)
- model_args.update(kwargs)
composed_info = validate_get_composed_info(
- constant_args, model_args, self)
+ constant_args, kwargs, self)
self._composed_instances = composed_info[0]
self._var_name_to_model_instances = composed_info[1]
self._additional_properties_model_instances = composed_info[2]
- unused_args = composed_info[3]
+ discarded_args = composed_info[3]
- for var_name, var_value in required_args.items():
- setattr(self, var_name, var_value)
for var_name, var_value in kwargs.items():
- if var_name in unused_args and \
+ if var_name in discarded_args and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
- not self._additional_properties_model_instances:
+ self._additional_properties_model_instances:
# discard variable.
continue
setattr(self, var_name, var_value)
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/simple_quadrilateral.py b/samples/openapi3/client/petstore/python/petstore_api/model/simple_quadrilateral.py
index f2f0a61acbd..d68f1d3b5cb 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/simple_quadrilateral.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/simple_quadrilateral.py
@@ -113,14 +113,12 @@ class SimpleQuadrilateral(ModelComposed):
])
@convert_js_args_to_python_args
- def __init__(self, shape_type, quadrilateral_type, *args, **kwargs): # noqa: E501
+ def __init__(self, *args, **kwargs): # noqa: E501
"""SimpleQuadrilateral - a model defined in OpenAPI
- Args:
+ Keyword Args:
shape_type (str):
quadrilateral_type (str):
-
- Keyword Args:
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
@@ -183,27 +181,18 @@ class SimpleQuadrilateral(ModelComposed):
'_configuration': _configuration,
'_visited_composed_classes': self._visited_composed_classes,
}
- required_args = {
- 'shape_type': shape_type,
- 'quadrilateral_type': quadrilateral_type,
- }
- model_args = {}
- model_args.update(required_args)
- model_args.update(kwargs)
composed_info = validate_get_composed_info(
- constant_args, model_args, self)
+ constant_args, kwargs, self)
self._composed_instances = composed_info[0]
self._var_name_to_model_instances = composed_info[1]
self._additional_properties_model_instances = composed_info[2]
- unused_args = composed_info[3]
+ discarded_args = composed_info[3]
- for var_name, var_value in required_args.items():
- setattr(self, var_name, var_value)
for var_name, var_value in kwargs.items():
- if var_name in unused_args and \
+ if var_name in discarded_args and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
- not self._additional_properties_model_instances:
+ self._additional_properties_model_instances:
# discard variable.
continue
setattr(self, var_name, var_value)
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/some_object.py b/samples/openapi3/client/petstore/python/petstore_api/model/some_object.py
index 683d1794293..72687c02ab6 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/some_object.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/some_object.py
@@ -173,25 +173,18 @@ class SomeObject(ModelComposed):
'_configuration': _configuration,
'_visited_composed_classes': self._visited_composed_classes,
}
- required_args = {
- }
- model_args = {}
- model_args.update(required_args)
- model_args.update(kwargs)
composed_info = validate_get_composed_info(
- constant_args, model_args, self)
+ constant_args, kwargs, self)
self._composed_instances = composed_info[0]
self._var_name_to_model_instances = composed_info[1]
self._additional_properties_model_instances = composed_info[2]
- unused_args = composed_info[3]
+ discarded_args = composed_info[3]
- for var_name, var_value in required_args.items():
- setattr(self, var_name, var_value)
for var_name, var_value in kwargs.items():
- if var_name in unused_args and \
+ if var_name in discarded_args and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
- not self._additional_properties_model_instances:
+ self._additional_properties_model_instances:
# discard variable.
continue
setattr(self, var_name, var_value)
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/some_object_with_self_attr.py b/samples/openapi3/client/petstore/python/petstore_api/model/some_object_with_self_attr.py
index 343122b65f3..3fba94014b5 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/some_object_with_self_attr.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/some_object_with_self_attr.py
@@ -57,7 +57,13 @@ class SomeObjectWithSelfAttr(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/special_model_name.py b/samples/openapi3/client/petstore/python/petstore_api/model/special_model_name.py
index 823e7759663..cfaedbc7881 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/special_model_name.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/special_model_name.py
@@ -57,7 +57,13 @@ class SpecialModelName(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/string_enum.py b/samples/openapi3/client/petstore/python/petstore_api/model/string_enum.py
index a6d2fbee08f..1e48fdecbf4 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/string_enum.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/string_enum.py
@@ -64,7 +64,13 @@ lines''',
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = True
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/string_enum_with_default_value.py b/samples/openapi3/client/petstore/python/petstore_api/model/string_enum_with_default_value.py
index 4dfc426446c..1417d0ff0fc 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/string_enum_with_default_value.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/string_enum_with_default_value.py
@@ -58,7 +58,13 @@ class StringEnumWithDefaultValue(ModelSimple):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/tag.py b/samples/openapi3/client/petstore/python/petstore_api/model/tag.py
index e5fc749d514..0e7427effa6 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/tag.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/tag.py
@@ -57,7 +57,13 @@ class Tag(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/triangle.py b/samples/openapi3/client/petstore/python/petstore_api/model/triangle.py
index 83d6e52e886..b1112e24892 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/triangle.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/triangle.py
@@ -122,13 +122,11 @@ class Triangle(ModelComposed):
])
@convert_js_args_to_python_args
- def __init__(self, triangle_type, *args, **kwargs): # noqa: E501
+ def __init__(self, *args, **kwargs): # noqa: E501
"""Triangle - a model defined in OpenAPI
- Args:
- triangle_type (str):
-
Keyword Args:
+ triangle_type (str):
_check_type (bool): if True, values for parameters in openapi_types
will be type checked and a TypeError will be
raised if the wrong type is input.
@@ -192,26 +190,18 @@ class Triangle(ModelComposed):
'_configuration': _configuration,
'_visited_composed_classes': self._visited_composed_classes,
}
- required_args = {
- 'triangle_type': triangle_type,
- }
- model_args = {}
- model_args.update(required_args)
- model_args.update(kwargs)
composed_info = validate_get_composed_info(
- constant_args, model_args, self)
+ constant_args, kwargs, self)
self._composed_instances = composed_info[0]
self._var_name_to_model_instances = composed_info[1]
self._additional_properties_model_instances = composed_info[2]
- unused_args = composed_info[3]
+ discarded_args = composed_info[3]
- for var_name, var_value in required_args.items():
- setattr(self, var_name, var_value)
for var_name, var_value in kwargs.items():
- if var_name in unused_args and \
+ if var_name in discarded_args and \
self._configuration is not None and \
self._configuration.discard_unknown_keys and \
- not self._additional_properties_model_instances:
+ self._additional_properties_model_instances:
# discard variable.
continue
setattr(self, var_name, var_value)
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/triangle_interface.py b/samples/openapi3/client/petstore/python/petstore_api/model/triangle_interface.py
index c54bd081172..f31e3dba135 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/triangle_interface.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/triangle_interface.py
@@ -57,7 +57,13 @@ class TriangleInterface(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/user.py b/samples/openapi3/client/petstore/python/petstore_api/model/user.py
index 7613ac7dc26..2271e3e37e5 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/user.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/user.py
@@ -57,7 +57,13 @@ class User(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model/whale.py b/samples/openapi3/client/petstore/python/petstore_api/model/whale.py
index e6400ea34fc..c3e1c40b4e5 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model/whale.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model/whale.py
@@ -57,7 +57,13 @@ class Whale(ModelNormal):
validations = {
}
- additional_properties_type = None
+ @cached_property
+ def additional_properties_type():
+ """
+ This must be a method because a model may have properties that are
+ of type self, this must run after the class is loaded
+ """
+ return (bool, date, datetime, dict, float, int, list, str, none_type,) # noqa: E501
_nullable = False
diff --git a/samples/openapi3/client/petstore/python/petstore_api/model_utils.py b/samples/openapi3/client/petstore/python/petstore_api/model_utils.py
index f73278f35cc..3a555f0a88c 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/model_utils.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/model_utils.py
@@ -434,27 +434,43 @@ class ModelComposed(OpenApiModel):
self.__dict__[name] = value
return
- # set the attribute on the correct instance
- model_instances = self._var_name_to_model_instances.get(
- name, self._additional_properties_model_instances)
- if model_instances:
- for model_instance in model_instances:
- if model_instance == self:
- self.set_attribute(name, value)
- else:
- setattr(model_instance, name, value)
- if name not in self._var_name_to_model_instances:
- # we assigned an additional property
- self.__dict__['_var_name_to_model_instances'][name] = (
- model_instance
- )
- return None
+ """
+ Use cases:
+ 1. additional_properties_type is None (additionalProperties == False in spec)
+ Check for property presence in self.openapi_types
+ if not present then throw an error
+ if present set in self, set attribute
+ always set on composed schemas
+ 2. additional_properties_type exists
+ set attribute on self
+ always set on composed schemas
+ """
+ if self.additional_properties_type is None:
+ """
+ For an attribute to exist on a composed schema it must:
+ - fulfill schema_requirements in the self composed schema not considering oneOf/anyOf/allOf schemas AND
+ - fulfill schema_requirements in each oneOf/anyOf/allOf schemas
- raise ApiAttributeError(
- "{0} has no attribute '{1}'".format(
- type(self).__name__, name),
- [e for e in [self._path_to_item, name] if e]
- )
+ schema_requirements:
+ For an attribute to exist on a schema it must:
+ - be present in properties at the schema OR
+ - have additionalProperties unset (defaults additionalProperties = any type) OR
+ - have additionalProperties set
+ """
+ if name not in self.openapi_types:
+ raise ApiAttributeError(
+ "{0} has no attribute '{1}'".format(
+ type(self).__name__, name),
+ [e for e in [self._path_to_item, name] if e]
+ )
+ # attribute must be set on self and composed instances
+ self.set_attribute(name, value)
+ for model_instance in self._composed_instances:
+ setattr(model_instance, name, value)
+ if name not in self._var_name_to_model_instances:
+ # we assigned an additional property
+ self.__dict__['_var_name_to_model_instances'][name] = self._composed_instances + [self]
+ return None
__unset_attribute_value__ = object()
@@ -464,13 +480,12 @@ class ModelComposed(OpenApiModel):
return self.__dict__[name]
# get the attribute from the correct instance
- model_instances = self._var_name_to_model_instances.get(
- name, self._additional_properties_model_instances)
+ model_instances = self._var_name_to_model_instances.get(name)
values = []
- # A composed model stores child (oneof/anyOf/allOf) models under
- # self._var_name_to_model_instances. A named property can exist in
- # multiple child models. If the property is present in more than one
- # child model, the value must be the same across all the child models.
+ # A composed model stores self and child (oneof/anyOf/allOf) models under
+ # self._var_name_to_model_instances.
+ # Any property must exist in self and all model instances
+ # The value stored in all model instances must be the same
if model_instances:
for model_instance in model_instances:
if name in model_instance._data_store:
@@ -1584,8 +1599,13 @@ def get_allof_instances(self, model_args, constant_args):
self: the class we are handling
model_args (dict): var_name to var_value
used to make instances
- constant_args (dict): var_name to var_value
- used to make instances
+ constant_args (dict):
+ metadata arguments:
+ _check_type
+ _path_to_item
+ _spec_property_naming
+ _configuration
+ _visited_composed_classes
Returns
composed_instances (list)
@@ -1593,20 +1613,8 @@ def get_allof_instances(self, model_args, constant_args):
composed_instances = []
for allof_class in self._composed_schemas['allOf']:
- # no need to handle changing js keys to python because
- # for composed schemas, allof parameters are included in the
- # composed schema and were changed to python keys in __new__
- # extract a dict of only required keys from fixed_model_args
- kwargs = {}
- var_names = set(allof_class.openapi_types.keys())
- for var_name in var_names:
- if var_name in model_args:
- kwargs[var_name] = model_args[var_name]
-
- # and use it to make the instance
- kwargs.update(constant_args)
try:
- allof_instance = allof_class(**kwargs)
+ allof_instance = allof_class(**model_args, **constant_args)
composed_instances.append(allof_instance)
except Exception as ex:
raise ApiValueError(
@@ -1666,31 +1674,9 @@ def get_oneof_instance(cls, model_kwargs, constant_kwargs, model_arg=None):
single_value_input = allows_single_value_input(oneof_class)
- if not single_value_input:
- # transform js keys from input data to python keys in fixed_model_args
- fixed_model_args = change_keys_js_to_python(
- model_kwargs, oneof_class)
-
- # Extract a dict with the properties that are declared in the oneOf schema.
- # Undeclared properties (e.g. properties that are allowed because of the
- # additionalProperties attribute in the OAS document) are not added to
- # the dict.
- kwargs = {}
- var_names = set(oneof_class.openapi_types.keys())
- for var_name in var_names:
- if var_name in fixed_model_args:
- kwargs[var_name] = fixed_model_args[var_name]
-
- # do not try to make a model with no input args
- if len(kwargs) == 0:
- continue
-
- # and use it to make the instance
- kwargs.update(constant_kwargs)
-
try:
if not single_value_input:
- oneof_instance = oneof_class(**kwargs)
+ oneof_instance = oneof_class(**model_kwargs, **constant_kwargs)
else:
if issubclass(oneof_class, ModelSimple):
oneof_instance = oneof_class(model_arg, **constant_kwargs)
@@ -1747,24 +1733,8 @@ def get_anyof_instances(self, model_args, constant_args):
# none_type deserialization is handled in the __new__ method
continue
- # transform js keys to python keys in fixed_model_args
- fixed_model_args = change_keys_js_to_python(model_args, anyof_class)
-
- # extract a dict of only required keys from these_model_vars
- kwargs = {}
- var_names = set(anyof_class.openapi_types.keys())
- for var_name in var_names:
- if var_name in fixed_model_args:
- kwargs[var_name] = fixed_model_args[var_name]
-
- # do not try to make a model with no input args
- if len(kwargs) == 0:
- continue
-
- # and use it to make the instance
- kwargs.update(constant_args)
try:
- anyof_instance = anyof_class(**kwargs)
+ anyof_instance = anyof_class(**model_args, **constant_args)
anyof_instances.append(anyof_instance)
except Exception:
pass
@@ -1777,47 +1747,34 @@ def get_anyof_instances(self, model_args, constant_args):
return anyof_instances
-def get_additional_properties_model_instances(
- composed_instances, self):
- additional_properties_model_instances = []
- all_instances = [self]
- all_instances.extend(composed_instances)
- for instance in all_instances:
- if instance.additional_properties_type is not None:
- additional_properties_model_instances.append(instance)
- return additional_properties_model_instances
-
-
-def get_var_name_to_model_instances(self, composed_instances):
- var_name_to_model_instances = {}
- all_instances = [self]
- all_instances.extend(composed_instances)
- for instance in all_instances:
- for var_name in instance.openapi_types:
- if var_name not in var_name_to_model_instances:
- var_name_to_model_instances[var_name] = [instance]
- else:
- var_name_to_model_instances[var_name].append(instance)
- return var_name_to_model_instances
-
-
-def get_unused_args(self, composed_instances, model_args):
- unused_args = dict(model_args)
- # arguments apssed to self were already converted to python names
+def get_discarded_args(self, composed_instances, model_args):
+ """
+ Gathers the args that were discarded by configuration.discard_unknown_keys
+ """
+ model_arg_keys = model_args.keys()
+ discarded_args = set()
+ # arguments passed to self were already converted to python names
# before __init__ was called
- for var_name_py in self.attribute_map:
- if var_name_py in unused_args:
- del unused_args[var_name_py]
for instance in composed_instances:
if instance.__class__ in self._composed_schemas['allOf']:
- for var_name_py in instance.attribute_map:
- if var_name_py in unused_args:
- del unused_args[var_name_py]
+ try:
+ keys = instance.to_dict().keys()
+ discarded_keys = model_args - keys
+ discarded_args.update(discarded_keys)
+ except Exception:
+ # allOf integer schema will throw exception
+ pass
else:
- for var_name_js in instance.attribute_map.values():
- if var_name_js in unused_args:
- del unused_args[var_name_js]
- return unused_args
+ try:
+ all_keys = set(model_to_dict(instance, serialize=False).keys())
+ js_keys = model_to_dict(instance, serialize=True).keys()
+ all_keys.update(js_keys)
+ discarded_keys = model_arg_keys - all_keys
+ discarded_args.update(discarded_keys)
+ except Exception:
+ # allOf integer schema will throw exception
+ pass
+ return discarded_args
def validate_get_composed_info(constant_args, model_args, self):
@@ -1861,36 +1818,42 @@ def validate_get_composed_info(constant_args, model_args, self):
composed_instances.append(oneof_instance)
anyof_instances = get_anyof_instances(self, model_args, constant_args)
composed_instances.extend(anyof_instances)
+ """
+ set additional_properties_model_instances
+ additional properties must be evaluated at the schema level
+ so self's additional properties are most important
+ If self is a composed schema with:
+ - no properties defined in self
+ - additionalProperties: False
+ Then for object payloads every property is an additional property
+ and they are not allowed, so only empty dict is allowed
+
+ Properties must be set on all matching schemas
+ so when a property is assigned toa composed instance, it must be set on all
+ composed instances regardless of additionalProperties presence
+ keeping it to prevent breaking changes in v5.0.1
+ TODO remove cls._additional_properties_model_instances in 6.0.0
+ """
+ additional_properties_model_instances = []
+ if self.additional_properties_type is not None:
+ additional_properties_model_instances = [self]
+
+ """
+ no need to set properties on self in here, they will be set in __init__
+ By here all composed schema oneOf/anyOf/allOf instances have their properties set using
+ model_args
+ """
+ discarded_args = get_discarded_args(self, composed_instances, model_args)
# map variable names to composed_instances
- var_name_to_model_instances = get_var_name_to_model_instances(
- self, composed_instances)
-
- # set additional_properties_model_instances
- additional_properties_model_instances = (
- get_additional_properties_model_instances(composed_instances, self)
- )
-
- # set any remaining values
- unused_args = get_unused_args(self, composed_instances, model_args)
- if len(unused_args) > 0 and \
- len(additional_properties_model_instances) == 0 and \
- (self._configuration is None or
- not self._configuration.discard_unknown_keys):
- raise ApiValueError(
- "Invalid input arguments input when making an instance of "
- "class %s. Not all inputs were used. The unused input data "
- "is %s" % (self.__class__.__name__, unused_args)
- )
-
- # no need to add additional_properties to var_name_to_model_instances here
- # because additional_properties_model_instances will direct us to that
- # instance when we use getattr or setattr
- # and we update var_name_to_model_instances in setattr
+ var_name_to_model_instances = {}
+ for prop_name in model_args:
+ if prop_name not in discarded_args:
+ var_name_to_model_instances[prop_name] = [self] + composed_instances
return [
composed_instances,
var_name_to_model_instances,
additional_properties_model_instances,
- unused_args
+ discarded_args
]
diff --git a/samples/openapi3/client/petstore/python/petstore_api/models/__init__.py b/samples/openapi3/client/petstore/python/petstore_api/models/__init__.py
index 12f8d86da03..ef47f62075b 100644
--- a/samples/openapi3/client/petstore/python/petstore_api/models/__init__.py
+++ b/samples/openapi3/client/petstore/python/petstore_api/models/__init__.py
@@ -34,6 +34,7 @@ from petstore_api.model.class_model import ClassModel
from petstore_api.model.client import Client
from petstore_api.model.complex_quadrilateral import ComplexQuadrilateral
from petstore_api.model.composed_one_of_number_with_validations import ComposedOneOfNumberWithValidations
+from petstore_api.model.composed_schema_with_props_and_no_add_props import ComposedSchemaWithPropsAndNoAddProps
from petstore_api.model.danish_pig import DanishPig
from petstore_api.model.dog import Dog
from petstore_api.model.dog_all_of import DogAllOf
diff --git a/samples/openapi3/client/petstore/python/pom.xml b/samples/openapi3/client/petstore/python/pom.xml
index c2364c74482..e7d7d9caf13 100644
--- a/samples/openapi3/client/petstore/python/pom.xml
+++ b/samples/openapi3/client/petstore/python/pom.xml
@@ -1,10 +1,10 @@
4.0.0
org.openapitools
- PythonExperimentalOAS3PetstoreTests
+ PythonOAS3PetstoreTests
pom
1.0-SNAPSHOT
- Python-Experimental OpenAPI3 Petstore Client
+ Python OpenAPI3 Petstore Client
diff --git a/samples/openapi3/client/petstore/python/test/test_composed_schema_with_props_and_no_add_props.py b/samples/openapi3/client/petstore/python/test/test_composed_schema_with_props_and_no_add_props.py
new file mode 100644
index 00000000000..7e7ac901ca6
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/test/test_composed_schema_with_props_and_no_add_props.py
@@ -0,0 +1,37 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.tag import Tag
+globals()['Tag'] = Tag
+from petstore_api.model.composed_schema_with_props_and_no_add_props import ComposedSchemaWithPropsAndNoAddProps
+
+
+class TestComposedSchemaWithPropsAndNoAddProps(unittest.TestCase):
+ """ComposedSchemaWithPropsAndNoAddProps unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testComposedSchemaWithPropsAndNoAddProps(self):
+ """Test ComposedSchemaWithPropsAndNoAddProps"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = ComposedSchemaWithPropsAndNoAddProps() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_composed_schema_with_props_and_no_add_props.py b/samples/openapi3/client/petstore/python/tests_manual/test_composed_schema_with_props_and_no_add_props.py
new file mode 100644
index 00000000000..d219a4e4b8a
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/tests_manual/test_composed_schema_with_props_and_no_add_props.py
@@ -0,0 +1,45 @@
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.tag import Tag
+globals()['Tag'] = Tag
+from petstore_api.model.composed_schema_with_props_and_no_add_props import ComposedSchemaWithPropsAndNoAddProps
+
+
+class TestComposedSchemaWithPropsAndNoAddProps(unittest.TestCase):
+ """ComposedSchemaWithPropsAndNoAddProps unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def testComposedSchemaWithPropsAndNoAddProps(self):
+ """Test ComposedSchemaWithPropsAndNoAddProps"""
+
+ inst = ComposedSchemaWithPropsAndNoAddProps(color='red')
+
+ # ComposedSchemaWithPropsAndNoAddProps should only allow in the color property
+ # once https://github.com/OpenAPITools/openapi-generator/pull/8816 lands
+ # this will no longer work
+ # TODO update the test then
+ inst = ComposedSchemaWithPropsAndNoAddProps(color='red', id=1, name='foo')
+
+ with self.assertRaises(petstore_api.ApiAttributeError):
+ inst = ComposedSchemaWithPropsAndNoAddProps(color='red', id=1, name='foo', additional=5)
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_deserialization.py b/samples/openapi3/client/petstore/python/tests_manual/test_deserialization.py
index 37e0943273a..93538160f9a 100644
--- a/samples/openapi3/client/petstore/python/tests_manual/test_deserialization.py
+++ b/samples/openapi3/client/petstore/python/tests_manual/test_deserialization.py
@@ -118,12 +118,7 @@ class DeserializationTests(unittest.TestCase):
)
assert isinstance(inst, apple.Apple)
- inst = apple.Apple(
- origin="cHiLe"
- )
- assert isinstance(inst, apple.Apple)
-
- # Test with invalid regex pattern.
+ # Test with invalid regex pattern in cultivar
err_msg = ("Invalid value for `{}`, must match regular expression `{}`$")
with self.assertRaisesRegex(
petstore_api.ApiValueError,
@@ -133,12 +128,14 @@ class DeserializationTests(unittest.TestCase):
cultivar="!@#%@$#Akane"
)
+ # Test with invalid regex pattern in origin
err_msg = ("Invalid value for `{}`, must match regular expression `{}` with flags")
with self.assertRaisesRegex(
petstore_api.ApiValueError,
err_msg.format("origin", "[^`]*")
):
inst = apple.Apple(
+ cultivar="Akane",
origin="!@#%@$#Chile"
)
diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_discard_unknown_properties.py b/samples/openapi3/client/petstore/python/tests_manual/test_discard_unknown_properties.py
index d8b71e44353..ed1ca736d4b 100644
--- a/samples/openapi3/client/petstore/python/tests_manual/test_discard_unknown_properties.py
+++ b/samples/openapi3/client/petstore/python/tests_manual/test_discard_unknown_properties.py
@@ -16,7 +16,7 @@ import re
import unittest
import petstore_api
-from petstore_api.model import cat, dog, isosceles_triangle, banana_req
+from petstore_api.model import cat, dog, isosceles_triangle, banana_req, fruit_req
from petstore_api import Configuration, signing
from petstore_api.model_utils import (
@@ -54,17 +54,17 @@ class DiscardUnknownPropertiesTests(unittest.TestCase):
'Exception message: {0}'.format(str(cm.exception)))
- def test_deserialize_isosceles_triangle_do_not_discard_unknown_properties(self):
+ def test_deserialize_fruit_req_do_not_discard_unknown_properties(self):
"""
- deserialize IsoscelesTriangle with unknown properties.
+ deserialize FruitReq 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',
+ '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 schema (additionalProperties: false).
@@ -74,10 +74,29 @@ class DiscardUnknownPropertiesTests(unittest.TestCase):
# 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, ((isosceles_triangle.IsoscelesTriangle),), True)
- self.assertTrue(re.match('.*Not all inputs were used.*unknown_property.*', str(cm.exception)),
- 'Exception message: {0}'.format(str(cm.exception)))
+ with self.assertRaisesRegex(petstore_api.ApiValueError, "Invalid inputs given to generate an instance of FruitReq. None of the oneOf schemas matched the input data."):
+ deserialized = api_client.deserialize(response, ((fruit_req.FruitReq),), True)
+
+
+ def test_deserialize_fruit_req_discard_unknown_properties(self):
+ """
+ deserialize FruitReq with unknown properties.
+ Strict validation is enabled.
+ Composed schema scenario.
+ """
+ config = Configuration(discard_unknown_keys=True)
+ api_client = petstore_api.ApiClient(config)
+ data = {
+ '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 BananaReq
+ 'unknown_property': 'a-value'
+ }
+ response = MockResponse(data=json.dumps(data))
+ deserialized = api_client.deserialize(response, ((fruit_req.FruitReq),), True)
+ self.assertNotIn("unknown_property", deserialized.to_dict().keys())
def test_deserialize_banana_req_discard_unknown_properties(self):
@@ -145,13 +164,10 @@ class DiscardUnknownPropertiesTests(unittest.TestCase):
# Below are additional (undeclared) properties.
"my_additional_property": 123,
}
- # The 'my_additional_property' is undeclared, but 'Cat' has a 'Address' type through
- # the allOf: [ $ref: '#/components/schemas/Address' ].
+ # The 'my_additional_property' is undeclared
response = MockResponse(data=json.dumps(data))
deserialized = api_client.deserialize(response, ((cat.Cat),), True)
self.assertTrue(isinstance(deserialized, cat.Cat))
- # Check the 'unknown_property' and 'more-unknown' properties are not present in the
- # output.
- self.assertIn("declawed", deserialized.to_dict().keys())
+ # Check the 'my_additional_property' is present
self.assertIn("my_additional_property", deserialized.to_dict().keys())
diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_fruit.py b/samples/openapi3/client/petstore/python/tests_manual/test_fruit.py
index a60fdb9f6be..f95c07755f8 100644
--- a/samples/openapi3/client/petstore/python/tests_manual/test_fruit.py
+++ b/samples/openapi3/client/petstore/python/tests_manual/test_fruit.py
@@ -14,56 +14,70 @@ import sys
import unittest
import petstore_api
-try:
- from petstore_api.model import apple
-except ImportError:
- apple = sys.modules[
- 'petstore_api.model.apple']
-try:
- from petstore_api.model import banana
-except ImportError:
- banana = sys.modules[
- 'petstore_api.model.banana']
+from petstore_api.model import apple
+from petstore_api.model import banana
from petstore_api.model.fruit import Fruit
class TestFruit(unittest.TestCase):
"""Fruit unit test stubs"""
+ length_cm = 20.3
+ color = 'yellow'
+
+
def setUp(self):
pass
def tearDown(self):
pass
- def testFruit(self):
- """Test Fruit"""
+ def test_fruit_with_additional_props(self):
+ # including extra parameters works because the oneOf models include additionalProperties
+ some_value = 'some_value'
+ some_fruit = Fruit(
+ color=self.color,
+ length_cm=self.length_cm,
+ unknown_property=some_value
+ )
+ assert some_fruit['unknown_property'] == some_value
+
+ def test_fruit_assigning_additional_props_in_client(self):
+ # setting a value that doesn't exist works because additional_properties_type allows any type
+ other_fruit = Fruit(length_cm=self.length_cm, color=self.color)
+ blah = 'blah'
+ other_fruit['a'] = blah
+ assert other_fruit.a == blah
+
+ # with setattr
+ setattr(other_fruit, 'b', blah)
+ assert other_fruit.b == blah
- # make an instance of Fruit, a composed schema oneOf model
- # banana test
- length_cm = 20.3
- color = 'yellow'
- fruit = Fruit(length_cm=length_cm, color=color)
- # check its properties
- self.assertEqual(fruit.length_cm, length_cm)
- self.assertEqual(fruit['length_cm'], length_cm)
- self.assertEqual(fruit.get('length_cm'), length_cm)
- self.assertEqual(getattr(fruit, 'length_cm'), length_cm)
- self.assertEqual(fruit.color, color)
- self.assertEqual(fruit['color'], color)
- self.assertEqual(getattr(fruit, 'color'), color)
- # check the dict representation
self.assertEqual(
- fruit.to_dict(),
+ other_fruit.to_dict(),
{
- 'length_cm': length_cm,
- 'color': color
+ 'a': 'blah',
+ 'b': 'blah',
+ 'length_cm': self.length_cm,
+ 'color': self.color
}
)
- # setting a value that doesn't exist raises an exception
+
+ def test_fruit_access_errors(self):
+ fruit = Fruit(length_cm=self.length_cm, color=self.color)
+
+ # getting a value that doesn't exist raises an exception
# with a key
with self.assertRaises(AttributeError):
- fruit['invalid_variable'] = 'some value'
+ invalid_variable = fruit['cultivar']
+
+ # Per Python doc, if the named attribute does not exist,
+ # default is returned if provided, otherwise AttributeError is raised.
+ with self.assertRaises(AttributeError):
+ getattr(fruit, 'cultivar')
+
+ def test_fruit_attribute_access(self):
+ fruit = Fruit(length_cm=self.length_cm, color=self.color)
# Assert that we can call the builtin hasattr() function.
# hasattr should return False for non-existent attribute.
@@ -74,14 +88,6 @@ class TestFruit(unittest.TestCase):
# hasattr should return True for existent attribute.
self.assertTrue(hasattr(fruit, 'color'))
- # with setattr
- with self.assertRaises(AttributeError):
- setattr(fruit, 'invalid_variable', 'some value')
-
- # getting a value that doesn't exist raises an exception
- # with a key
- with self.assertRaises(AttributeError):
- invalid_variable = fruit['cultivar']
# with getattr
# Per Python doc, if the named attribute does not exist,
# default is returned if provided.
@@ -89,10 +95,28 @@ class TestFruit(unittest.TestCase):
self.assertEqual(fruit.get('cultivar'), None)
self.assertEqual(fruit.get('cultivar', 'some value'), 'some value')
- # Per Python doc, if the named attribute does not exist,
- # default is returned if provided, otherwise AttributeError is raised.
- with self.assertRaises(AttributeError):
- getattr(fruit, 'cultivar')
+ def test_banana_fruit(self):
+ """Test Fruit"""
+
+ # make an instance of Fruit, a composed schema oneOf model
+ # banana test
+ fruit = Fruit(length_cm=self.length_cm, color=self.color)
+ # check its properties
+ self.assertEqual(fruit.length_cm, self.length_cm)
+ self.assertEqual(fruit['length_cm'], self.length_cm)
+ self.assertEqual(fruit.get('length_cm'), self.length_cm)
+ self.assertEqual(getattr(fruit, 'length_cm'), self.length_cm)
+ self.assertEqual(fruit.color, self.color)
+ self.assertEqual(fruit['color'], self.color)
+ self.assertEqual(getattr(fruit, 'color'), self.color)
+ # check the dict representation
+ self.assertEqual(
+ fruit.to_dict(),
+ {
+ 'length_cm': self.length_cm,
+ 'color': self.color
+ }
+ )
# make sure that the ModelComposed class properties are correct
# model._composed_schemas stores the anyOf/allOf/oneOf info
@@ -109,6 +133,7 @@ class TestFruit(unittest.TestCase):
)
# model._composed_instances is a list of the instances that were
# made from the anyOf/allOf/OneOf classes in model._composed_schemas
+ self.assertEqual(len(fruit._composed_instances), 1)
for composed_instance in fruit._composed_instances:
if composed_instance.__class__ == banana.Banana:
banana_instance = composed_instance
@@ -118,19 +143,16 @@ class TestFruit(unittest.TestCase):
)
# model._var_name_to_model_instances maps the variable name to the
# model instances which store that variable
+ print(fruit._var_name_to_model_instances)
self.assertEqual(
fruit._var_name_to_model_instances,
{
- 'color': [fruit],
+ 'color': [fruit, banana_instance],
'length_cm': [fruit, banana_instance],
- 'cultivar': [fruit],
- 'origin': [fruit],
}
)
- # model._additional_properties_model_instances stores a list of
- # models which have the property additional_properties_type != None
self.assertEqual(
- fruit._additional_properties_model_instances, []
+ fruit._additional_properties_model_instances, [fruit]
)
# if we modify one of the properties owned by multiple
@@ -140,21 +162,15 @@ class TestFruit(unittest.TestCase):
with self.assertRaises(petstore_api.ApiValueError):
some_length_cm = fruit.length_cm
- # including extra parameters raises an exception
- with self.assertRaises(petstore_api.ApiValueError):
- fruit = Fruit(
- color=color,
- length_cm=length_cm,
- unknown_property='some value'
- )
-
# including input parameters for two oneOf instances raise an exception
with self.assertRaises(petstore_api.ApiValueError):
fruit = Fruit(
- length_cm=length_cm,
+ length_cm=self.length_cm,
cultivar='granny smith'
)
+ def test_apple_fruit(self):
+
# make an instance of Fruit, a composed schema oneOf model
# apple test
color = 'red'
@@ -190,19 +206,15 @@ class TestFruit(unittest.TestCase):
self.assertEqual(
fruit._var_name_to_model_instances,
{
- 'color': [fruit],
- 'length_cm': [fruit],
+ 'color': [fruit, apple_instance],
'cultivar': [fruit, apple_instance],
- 'origin': [fruit, apple_instance],
}
)
- # model._additional_properties_model_instances stores a list of
- # models which have the property additional_properties_type != None
self.assertEqual(
- fruit._additional_properties_model_instances, []
+ fruit._additional_properties_model_instances, [fruit]
)
- def testFruitNullValue(self):
+ def test_null_fruit(self):
# Since 'apple' is nullable, validate we can create an apple with the 'null' value.
fruit = apple.Apple(None)
self.assertIsNone(fruit)
@@ -220,5 +232,16 @@ class TestFruit(unittest.TestCase):
fruit = Fruit(apple.Apple(None))
self.assertIsNone(fruit)
+ def test_fruit_with_invalid_input_type(self):
+
+ """
+ color must be a str, color's str type is only defined at the Fruit level
+ Banana + Apple would allow color to be assigned with any type of value
+ """
+ invalid_value = 1
+ with self.assertRaises(petstore_api.ApiTypeError):
+ fruit = Fruit(color=invalid_value, length_cm=self.length_cm)
+
+
if __name__ == '__main__':
unittest.main()
diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_fruit_req.py b/samples/openapi3/client/petstore/python/tests_manual/test_fruit_req.py
index 3e637c3226a..64b710fdd58 100644
--- a/samples/openapi3/client/petstore/python/tests_manual/test_fruit_req.py
+++ b/samples/openapi3/client/petstore/python/tests_manual/test_fruit_req.py
@@ -14,21 +14,14 @@ import sys
import unittest
import petstore_api
-try:
- from petstore_api.model import apple_req
-except ImportError:
- apple_req = sys.modules[
- 'petstore_api.model.apple_req']
-try:
- from petstore_api.model import banana_req
-except ImportError:
- banana_req = sys.modules[
- 'petstore_api.model.banana_req']
+from petstore_api.model import apple_req
+from petstore_api.model import banana_req
from petstore_api.model.fruit_req import FruitReq
class TestFruitReq(unittest.TestCase):
"""FruitReq unit test stubs"""
+ length_cm = 20.3
def setUp(self):
pass
@@ -36,24 +29,9 @@ class TestFruitReq(unittest.TestCase):
def tearDown(self):
pass
- def testFruitReq(self):
- """Test FruitReq"""
+ def test_fruit_access_errors(self):
+ fruit = FruitReq(length_cm=self.length_cm)
- # make an instance of Fruit, a composed schema oneOf model
- # banana test
- length_cm = 20.3
- fruit = FruitReq(length_cm=length_cm)
- # check its properties
- self.assertEqual(fruit.length_cm, length_cm)
- self.assertEqual(fruit['length_cm'], length_cm)
- self.assertEqual(getattr(fruit, 'length_cm'), length_cm)
- # check the dict representation
- self.assertEqual(
- fruit.to_dict(),
- {
- 'length_cm': length_cm,
- }
- )
# setting a value that doesn't exist raises an exception
# with a key
with self.assertRaises(AttributeError):
@@ -66,12 +44,31 @@ class TestFruitReq(unittest.TestCase):
# with a key
with self.assertRaises(AttributeError):
invalid_variable = fruit['cultivar']
- # with getattr
- self.assertEqual(getattr(fruit, 'cultivar', 'some value'), 'some value')
with self.assertRaises(AttributeError):
getattr(fruit, 'cultivar')
+ def test_FruitReq_banana(self):
+ """Test FruitReq"""
+
+ # make an instance of Fruit, a composed schema oneOf model
+ # banana test
+ fruit = FruitReq(length_cm=self.length_cm)
+ # check its properties
+ self.assertEqual(fruit.length_cm, self.length_cm)
+ self.assertEqual(fruit['length_cm'], self.length_cm)
+ self.assertEqual(getattr(fruit, 'length_cm'), self.length_cm)
+ # check the dict representation
+ self.assertEqual(
+ fruit.to_dict(),
+ {
+ 'length_cm': self.length_cm,
+ }
+ )
+
+ # with getattr
+ self.assertEqual(getattr(fruit, 'cultivar', 'some value'), 'some value')
+
# make sure that the ModelComposed class properties are correct
# model._composed_schemas stores the anyOf/allOf/oneOf info
self.assertEqual(
@@ -101,15 +98,10 @@ class TestFruitReq(unittest.TestCase):
fruit._var_name_to_model_instances,
{
'length_cm': [fruit, banana_instance],
- 'cultivar': [fruit],
- 'mealy': [fruit],
- 'sweet': [fruit, banana_instance],
}
)
- # model._additional_properties_model_instances stores a list of
- # models which have the property additional_properties_type != None
self.assertEqual(
- fruit._additional_properties_model_instances, []
+ fruit._additional_properties_model_instances, [fruit]
)
# if we modify one of the properties owned by multiple
@@ -119,21 +111,24 @@ class TestFruitReq(unittest.TestCase):
with self.assertRaises(petstore_api.ApiValueError):
some_length_cm = fruit.length_cm
+ def test_invalid_inputs(self):
# including extra parameters raises an exception
with self.assertRaises(petstore_api.ApiValueError):
fruit = FruitReq(
- length_cm=length_cm,
+ length_cm=self.length_cm,
unknown_property='some value'
)
# including input parameters for two oneOf instances raise an exception
with self.assertRaises(petstore_api.ApiValueError):
fruit = FruitReq(
- length_cm=length_cm,
+ length_cm=self.length_cm,
cultivar='granny smith'
)
- # make an instance of Fruit, a composed schema oneOf model
+ def test_FruitReq_apple(self):
+ """Test FruitReq"""
+
# apple test
cultivar = 'golden delicious'
fruit = FruitReq(cultivar=cultivar)
@@ -163,21 +158,18 @@ class TestFruitReq(unittest.TestCase):
self.assertEqual(
fruit._var_name_to_model_instances,
{
- 'length_cm': [fruit],
'cultivar': [fruit, apple_instance],
- 'mealy': [fruit, apple_instance],
- 'sweet': [fruit],
}
)
- # model._additional_properties_model_instances stores a list of
- # models which have the property additional_properties_type != None
self.assertEqual(
- fruit._additional_properties_model_instances, []
+ fruit._additional_properties_model_instances, [fruit]
)
+ def test_null_fruit(self):
# we can pass in None
fruit = FruitReq(None)
assert fruit is None
+
if __name__ == '__main__':
unittest.main()
diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_gm_fruit.py b/samples/openapi3/client/petstore/python/tests_manual/test_gm_fruit.py
index 85d0fcf9b1c..ad5907ee443 100644
--- a/samples/openapi3/client/petstore/python/tests_manual/test_gm_fruit.py
+++ b/samples/openapi3/client/petstore/python/tests_manual/test_gm_fruit.py
@@ -14,21 +14,15 @@ import sys
import unittest
import petstore_api
-try:
- from petstore_api.model import apple
-except ImportError:
- apple = sys.modules[
- 'petstore_api.model.apple']
-try:
- from petstore_api.model import banana
-except ImportError:
- banana = sys.modules[
- 'petstore_api.model.banana']
+from petstore_api.model import apple
+from petstore_api.model import banana
from petstore_api.model.gm_fruit import GmFruit
class TestGmFruit(unittest.TestCase):
"""GmFruit unit test stubs"""
+ length_cm = 20.3
+ color = 'yellow'
def setUp(self):
pass
@@ -36,36 +30,48 @@ class TestGmFruit(unittest.TestCase):
def tearDown(self):
pass
- def testGmFruit(self):
+ def test_set_addprop_attributes(self):
+ # setting a value that doesn't exist works because additional_properties_type allows any type
+ other_fruit = GmFruit(length_cm=self.length_cm, color=self.color)
+ blah = 'blah'
+ other_fruit['a'] = blah
+ assert other_fruit.a == blah
+
+ # with setattr
+ setattr(other_fruit, 'b', blah)
+ assert other_fruit.b == blah
+
+ self.assertEqual(
+ other_fruit.to_dict(),
+ {
+ 'a': 'blah',
+ 'b': 'blah',
+ 'length_cm': self.length_cm,
+ 'color': self.color
+ }
+ )
+
+ def test_banana_fruit(self):
"""Test GmFruit"""
# make an instance of GmFruit, a composed schema anyOf model
# banana test
- length_cm = 20.3
- color = 'yellow'
- fruit = GmFruit(length_cm=length_cm, color=color)
+ fruit = GmFruit(length_cm=self.length_cm, color=self.color)
# check its properties
- self.assertEqual(fruit.length_cm, length_cm)
- self.assertEqual(fruit['length_cm'], length_cm)
- self.assertEqual(getattr(fruit, 'length_cm'), length_cm)
- self.assertEqual(fruit.color, color)
- self.assertEqual(fruit['color'], color)
- self.assertEqual(getattr(fruit, 'color'), color)
+ self.assertEqual(fruit.length_cm, self.length_cm)
+ self.assertEqual(fruit['length_cm'], self.length_cm)
+ self.assertEqual(getattr(fruit, 'length_cm'), self.length_cm)
+ self.assertEqual(fruit.color, self.color)
+ self.assertEqual(fruit['color'], self.color)
+ self.assertEqual(getattr(fruit, 'color'), self.color)
# check the dict representation
self.assertEqual(
fruit.to_dict(),
{
- 'length_cm': length_cm,
- 'color': color
+ 'length_cm': self.length_cm,
+ 'color': self.color
}
)
- # setting a value that doesn't exist raises an exception
- # with a key
- with self.assertRaises(AttributeError):
- fruit['invalid_variable'] = 'some value'
- # with setattr
- with self.assertRaises(AttributeError):
- setattr(fruit, 'invalid_variable', 'some value')
# getting a value that doesn't exist raises an exception
# with a key
@@ -104,40 +110,22 @@ class TestGmFruit(unittest.TestCase):
self.assertEqual(
fruit._var_name_to_model_instances,
{
- 'color': [fruit],
+ 'color': [fruit, banana_instance],
'length_cm': [fruit, banana_instance],
- 'cultivar': [fruit],
- 'origin': [fruit],
}
)
- # model._additional_properties_model_instances stores a list of
- # models which have the property additional_properties_type != None
self.assertEqual(
- fruit._additional_properties_model_instances, []
+ fruit._additional_properties_model_instances, [fruit]
)
- # if we modify one of the properties owned by multiple
- # model_instances we get an exception when we try to access that
- # property because the retrieved values are not all the same
- banana_instance.length_cm = 4.56
- with self.assertRaises(petstore_api.ApiValueError):
- some_length_cm = fruit.length_cm
-
- # including extra parameters raises an exception
- with self.assertRaises(petstore_api.ApiValueError):
- fruit = GmFruit(
- color=color,
- length_cm=length_cm,
- unknown_property='some value'
- )
-
+ def test_combo_fruit(self):
# including input parameters for both anyOf instances works
cultivar = 'banaple'
color = 'orange'
fruit = GmFruit(
color=color,
cultivar=cultivar,
- length_cm=length_cm
+ length_cm=self.length_cm
)
self.assertEqual(fruit.color, color)
self.assertEqual(fruit['color'], color)
@@ -145,9 +133,9 @@ class TestGmFruit(unittest.TestCase):
self.assertEqual(fruit.cultivar, cultivar)
self.assertEqual(fruit['cultivar'], cultivar)
self.assertEqual(getattr(fruit, 'cultivar'), cultivar)
- self.assertEqual(fruit.length_cm, length_cm)
- self.assertEqual(fruit['length_cm'], length_cm)
- self.assertEqual(getattr(fruit, 'length_cm'), length_cm)
+ self.assertEqual(fruit.length_cm, self.length_cm)
+ self.assertEqual(fruit['length_cm'], self.length_cm)
+ self.assertEqual(getattr(fruit, 'length_cm'), self.length_cm)
# model._composed_instances is a list of the instances that were
# made from the anyOf/allOf/OneOf classes in model._composed_schemas
@@ -165,14 +153,16 @@ class TestGmFruit(unittest.TestCase):
self.assertEqual(
fruit._var_name_to_model_instances,
{
- 'color': [fruit],
- 'length_cm': [fruit, banana_instance],
- 'cultivar': [fruit, apple_instance],
- 'origin': [fruit, apple_instance],
+ 'color': [fruit, apple_instance, banana_instance],
+ 'length_cm': [fruit, apple_instance, banana_instance],
+ 'cultivar': [fruit, apple_instance, banana_instance],
}
)
+ self.assertEqual(
+ fruit._additional_properties_model_instances, [fruit]
+ )
- # make an instance of GmFruit, a composed schema anyOf model
+ def test_apple_fruit(self):
# apple test
color = 'red'
cultivar = 'golden delicious'
@@ -214,16 +204,13 @@ class TestGmFruit(unittest.TestCase):
self.assertEqual(
fruit._var_name_to_model_instances,
{
- 'color': [fruit],
- 'length_cm': [fruit],
+ 'color': [fruit, apple_instance],
'cultivar': [fruit, apple_instance],
'origin': [fruit, apple_instance],
}
)
- # model._additional_properties_model_instances stores a list of
- # models which have the property additional_properties_type != None
self.assertEqual(
- fruit._additional_properties_model_instances, []
+ fruit._additional_properties_model_instances, [fruit]
)
if __name__ == '__main__':
diff --git a/samples/openapi3/client/petstore/python/tests_manual/test_tag.py b/samples/openapi3/client/petstore/python/tests_manual/test_tag.py
new file mode 100644
index 00000000000..ec945f6b30b
--- /dev/null
+++ b/samples/openapi3/client/petstore/python/tests_manual/test_tag.py
@@ -0,0 +1,35 @@
+# coding: utf-8
+
+"""
+ OpenAPI Petstore
+
+ This spec is mainly for testing Petstore server and contains fake endpoints, models. Please do not use this for any other purpose. Special characters: \" \\ # noqa: E501
+
+ The version of the OpenAPI document: 1.0.0
+ Generated by: https://openapi-generator.tech
+"""
+
+
+import sys
+import unittest
+
+import petstore_api
+from petstore_api.model.tag import Tag
+
+
+class TestTag(unittest.TestCase):
+ """Tag unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def test_can_ingest_additional_properties_in_tag(self):
+ t = Tag(a='abc')
+ assert t.a == 'abc'
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/typescript/builds/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/typescript/builds/deno/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/typescript/builds/inversify/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/typescript/builds/jquery/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION b/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION
+++ b/samples/openapi3/client/petstore/typescript/builds/object_params/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/schema/petstore/ktorm/.openapi-generator/VERSION b/samples/schema/petstore/ktorm/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/schema/petstore/ktorm/.openapi-generator/VERSION
+++ b/samples/schema/petstore/ktorm/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/schema/petstore/mysql/.openapi-generator/VERSION b/samples/schema/petstore/mysql/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/schema/petstore/mysql/.openapi-generator/VERSION
+++ b/samples/schema/petstore/mysql/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/aspnetcore-3.0/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore-3.0/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/aspnetcore-3.0/.openapi-generator/VERSION
+++ b/samples/server/petstore/aspnetcore-3.0/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/aspnetcore-3.1/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore-3.1/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/aspnetcore-3.1/.openapi-generator/VERSION
+++ b/samples/server/petstore/aspnetcore-3.1/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/aspnetcore-5.0/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore-5.0/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/aspnetcore-5.0/.openapi-generator/VERSION
+++ b/samples/server/petstore/aspnetcore-5.0/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/aspnetcore/.openapi-generator/VERSION b/samples/server/petstore/aspnetcore/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/aspnetcore/.openapi-generator/VERSION
+++ b/samples/server/petstore/aspnetcore/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION b/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION
+++ b/samples/server/petstore/cpp-pistache/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/cpp-qt5-qhttpengine-server/.openapi-generator/VERSION b/samples/server/petstore/cpp-qt5-qhttpengine-server/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/cpp-qt5-qhttpengine-server/.openapi-generator/VERSION
+++ b/samples/server/petstore/cpp-qt5-qhttpengine-server/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/go-api-server/.openapi-generator/VERSION b/samples/server/petstore/go-api-server/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/go-api-server/.openapi-generator/VERSION
+++ b/samples/server/petstore/go-api-server/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/go-echo-server/.openapi-generator/VERSION b/samples/server/petstore/go-echo-server/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/go-echo-server/.openapi-generator/VERSION
+++ b/samples/server/petstore/go-echo-server/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION b/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION
+++ b/samples/server/petstore/go-gin-api-server/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/java-msf4j/.openapi-generator/VERSION b/samples/server/petstore/java-msf4j/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/java-msf4j/.openapi-generator/VERSION
+++ b/samples/server/petstore/java-msf4j/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION
+++ b/samples/server/petstore/java-play-framework-api-package-override/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION
+++ b/samples/server/petstore/java-play-framework-async/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION
+++ b/samples/server/petstore/java-play-framework-controller-only/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION
+++ b/samples/server/petstore/java-play-framework-fake-endpoints/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION
+++ b/samples/server/petstore/java-play-framework-no-bean-validation/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION
+++ b/samples/server/petstore/java-play-framework-no-exception-handling/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION
+++ b/samples/server/petstore/java-play-framework-no-interface/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/VERSION
+++ b/samples/server/petstore/java-play-framework-no-nullable/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION
+++ b/samples/server/petstore/java-play-framework-no-swagger-ui/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/VERSION
+++ b/samples/server/petstore/java-play-framework-no-wrap-calls/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/java-play-framework/.openapi-generator/VERSION b/samples/server/petstore/java-play-framework/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/java-play-framework/.openapi-generator/VERSION
+++ b/samples/server/petstore/java-play-framework/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/java-undertow/.openapi-generator/VERSION b/samples/server/petstore/java-undertow/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/java-undertow/.openapi-generator/VERSION
+++ b/samples/server/petstore/java-undertow/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/java-vertx-web/.openapi-generator/VERSION b/samples/server/petstore/java-vertx-web/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/java-vertx-web/.openapi-generator/VERSION
+++ b/samples/server/petstore/java-vertx-web/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs-cxf-annotated-base-path/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/jaxrs-cxf-cdi-default-value/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-cdi-default-value/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/jaxrs-cxf-cdi-default-value/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs-cxf-cdi-default-value/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs-cxf-cdi/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs-cxf-non-spring-app/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs-cxf/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs-datelib-j8/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs-jersey/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/jaxrs-resteasy/default-value/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/default-value/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/jaxrs-resteasy/default-value/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs-resteasy/default-value/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs-resteasy/default/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs-resteasy/eap-java8/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs-resteasy/eap-joda/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs-resteasy/eap/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs-resteasy/joda/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs-spec-interface/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION b/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs-spec/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs/jersey1-useTags/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs/jersey1/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs/jersey2-useTags/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION b/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION
+++ b/samples/server/petstore/jaxrs/jersey2/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION b/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION
+++ b/samples/server/petstore/kotlin-server/ktor/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/kotlin-server/ktor/README.md b/samples/server/petstore/kotlin-server/ktor/README.md
index d9a363a1ccc..0312e13cdf7 100644
--- a/samples/server/petstore/kotlin-server/ktor/README.md
+++ b/samples/server/petstore/kotlin-server/ktor/README.md
@@ -2,12 +2,12 @@
This is a sample server Petstore server. For this sample, you can use the api key `special-key` to test the authorization filters.
-Generated by OpenAPI Generator 5.1.1.
+Generated by OpenAPI Generator 5.2.0-SNAPSHOT.
## Requires
-* Kotlin 1.3.21
-* Gradle 4.9
+* Kotlin 1.4.31
+* Gradle 6.8.2
## Build
diff --git a/samples/server/petstore/kotlin-server/ktor/build.gradle b/samples/server/petstore/kotlin-server/ktor/build.gradle
index 25536d4e531..c69f129160f 100644
--- a/samples/server/petstore/kotlin-server/ktor/build.gradle
+++ b/samples/server/petstore/kotlin-server/ktor/build.gradle
@@ -2,13 +2,13 @@ group 'org.openapitools'
version '1.0.0'
wrapper {
- gradleVersion = '4.9'
+ gradleVersion = '6.8.2'
distributionUrl = "https://services.gradle.org/distributions/gradle-$gradleVersion-all.zip"
}
buildscript {
- ext.kotlin_version = '1.3.21'
- ext.ktor_version = '1.1.3'
+ ext.kotlin_version = '1.4.31'
+ ext.ktor_version = '1.5.2'
ext.shadow_version = '2.0.3'
repositories {
@@ -29,7 +29,7 @@ apply plugin: 'application'
mainClassName = "io.ktor.server.netty.DevelopmentEngine"
-// Initialization order with shadow 2.0.1 and Gradle 4.3 is weird.
+// Initialization order with shadow 2.0.1 and Gradle 6.8.2 is weird.
// See https://github.com/johnrengelman/shadow/issues/336#issuecomment-355402508
apply plugin: 'com.github.johnrengelman.shadow'
@@ -59,6 +59,7 @@ dependencies {
compile "org.jetbrains.kotlin:kotlin-stdlib:$kotlin_version"
compile "io.ktor:ktor-server-netty:$ktor_version"
compile "io.ktor:ktor-metrics:$ktor_version"
+ compile "io.ktor:ktor-auth:$ktor_version"
compile "io.ktor:ktor-locations:$ktor_version"
compile "io.ktor:ktor-gson:$ktor_version"
compile "io.ktor:ktor-client-core:$ktor_version"
diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/AppMain.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/AppMain.kt
index 2b0cd5cdb5f..54658d6ba5d 100644
--- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/AppMain.kt
+++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/AppMain.kt
@@ -18,12 +18,11 @@ import io.ktor.gson.GsonConverter
import io.ktor.http.ContentType
import io.ktor.locations.KtorExperimentalLocationsAPI
import io.ktor.locations.Locations
-import io.ktor.metrics.Metrics
import io.ktor.routing.Routing
import java.util.concurrent.TimeUnit
-import io.ktor.util.KtorExperimentalAPI
import io.ktor.auth.Authentication
import io.ktor.auth.oauth
+import io.ktor.metrics.dropwizard.DropwizardMetrics
import org.openapitools.server.infrastructure.ApiKeyCredential
import org.openapitools.server.infrastructure.ApiPrincipal
import org.openapitools.server.infrastructure.apiKeyAuth
@@ -32,23 +31,21 @@ import org.openapitools.server.apis.StoreApi
import org.openapitools.server.apis.UserApi
-@KtorExperimentalAPI
internal val settings = HoconApplicationConfig(ConfigFactory.defaultApplication(HTTP::class.java.classLoader))
object HTTP {
val client = HttpClient(Apache)
}
-@KtorExperimentalAPI
@KtorExperimentalLocationsAPI
fun Application.main() {
install(DefaultHeaders)
- install(Metrics) {
+ install(DropwizardMetrics) {
val reporter = Slf4jReporter.forRegistry(registry)
- .outputTo(log)
- .convertRatesTo(TimeUnit.SECONDS)
- .convertDurationsTo(TimeUnit.MILLISECONDS)
- .build()
+ .outputTo(log)
+ .convertRatesTo(TimeUnit.SECONDS)
+ .convertDurationsTo(TimeUnit.MILLISECONDS)
+ .build()
reporter.start(10, TimeUnit.SECONDS)
}
install(ContentNegotiation) {
@@ -72,8 +69,8 @@ fun Application.main() {
client = HttpClient(Apache)
providerLookup = { ApplicationAuthProviders["petstore_auth"] }
urlProvider = { _ ->
- // TODO: define a callback url here.
- "/"
+ // TODO: define a callback url here.
+ "/"
}
}
}
@@ -84,8 +81,7 @@ fun Application.main() {
}
- environment.monitor.subscribe(ApplicationStopping)
- {
+ environment.monitor.subscribe(ApplicationStopping) {
HTTP.client.close()
}
}
diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/Configuration.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/Configuration.kt
index c16a32ef70f..8483e64319d 100644
--- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/Configuration.kt
+++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/Configuration.kt
@@ -8,11 +8,7 @@ import io.ktor.features.deflate
import io.ktor.features.gzip
import io.ktor.features.minimumSize
import io.ktor.http.HttpMethod
-import io.ktor.util.KtorExperimentalAPI
-import java.time.Duration
-import java.util.concurrent.Executors
-
-import org.openapitools.server.settings
+import java.util.concurrent.TimeUnit
/**
@@ -25,7 +21,7 @@ import org.openapitools.server.settings
*/
internal fun ApplicationHstsConfiguration(): HSTS.Configuration.() -> Unit {
return {
- maxAge = Duration.ofDays(365)
+ maxAgeInSeconds = TimeUnit.DAYS.toSeconds(365)
includeSubDomains = true
preload = false
@@ -55,7 +51,6 @@ internal fun ApplicationCompressionConfiguration(): Compression.Configuration.()
}
// Defines authentication mechanisms used throughout the application.
-@KtorExperimentalAPI
val ApplicationAuthProviders: Map = listOf(
OAuthServerSettings.OAuth2ServerSettings(
name = "petstore_auth",
@@ -77,6 +72,3 @@ val ApplicationAuthProviders: Map = listOf)
+ @Location("/pet/findByStatus") class findPetsByStatus(val status: kotlin.collections.List)
/**
* Finds Pets by tags
@@ -38,7 +47,7 @@ object Paths {
* @param tags Tags to filter by
*/
@KtorExperimentalLocationsAPI
- @Location("/pet/findByTags") class findPetsByTags(val tags: kotlin.Array)
+ @Location("/pet/findByTags") class findPetsByTags(val tags: kotlin.collections.List)
/**
* Find pet by ID
@@ -48,6 +57,34 @@ object Paths {
@KtorExperimentalLocationsAPI
@Location("/pet/{petId}") class getPetById(val petId: kotlin.Long)
+ /**
+ * Update an existing pet
+ *
+ * @param body Pet object that needs to be added to the store
+ */
+ @KtorExperimentalLocationsAPI
+ @Location("/pet") class updatePet(val body: Pet)
+
+ /**
+ * Updates a pet in the store with form data
+ *
+ * @param petId ID of pet that needs to be updated
+ * @param name Updated name of the pet (optional)
+ * @param status Updated status of the pet (optional)
+ */
+ @KtorExperimentalLocationsAPI
+ @Location("/pet/{petId}") class updatePetWithForm(val petId: kotlin.Long, val name: kotlin.String? = null, val status: kotlin.String? = null)
+
+ /**
+ * uploads an image
+ *
+ * @param petId ID of pet to update
+ * @param additionalMetadata Additional data to pass to server (optional)
+ * @param file file to upload (optional)
+ */
+ @KtorExperimentalLocationsAPI
+ @Location("/pet/{petId}/uploadImage") class uploadFile(val petId: kotlin.Long, val additionalMetadata: kotlin.String? = null, val file: java.io.File? = null)
+
/**
* Delete purchase order by ID
* For valid response try integer IDs with value < 1000. Anything above 1000 or nonintegers will generate API errors
@@ -71,6 +108,38 @@ object Paths {
@KtorExperimentalLocationsAPI
@Location("/store/order/{orderId}") class getOrderById(val orderId: kotlin.Long)
+ /**
+ * Place an order for a pet
+ *
+ * @param body order placed for purchasing the pet
+ */
+ @KtorExperimentalLocationsAPI
+ @Location("/store/order") class placeOrder(val body: Order)
+
+ /**
+ * Create user
+ * This can only be done by the logged in user.
+ * @param body Created user object
+ */
+ @KtorExperimentalLocationsAPI
+ @Location("/user") class createUser(val body: User)
+
+ /**
+ * Creates list of users with given input array
+ *
+ * @param body List of user object
+ */
+ @KtorExperimentalLocationsAPI
+ @Location("/user/createWithArray") class createUsersWithArrayInput(val body: kotlin.collections.List)
+
+ /**
+ * Creates list of users with given input array
+ *
+ * @param body List of user object
+ */
+ @KtorExperimentalLocationsAPI
+ @Location("/user/createWithList") class createUsersWithListInput(val body: kotlin.collections.List)
+
/**
* Delete user
* This can only be done by the logged in user.
@@ -103,4 +172,13 @@ object Paths {
@KtorExperimentalLocationsAPI
@Location("/user/logout") class logoutUser()
+ /**
+ * Updated user
+ * This can only be done by the logged in user.
+ * @param username name that need to be deleted
+ * @param body Updated user object
+ */
+ @KtorExperimentalLocationsAPI
+ @Location("/user/{username}") class updateUser(val username: kotlin.String, val body: User)
+
}
diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/PetApi.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/PetApi.kt
index 3ac3578638d..9226541eb34 100644
--- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/PetApi.kt
+++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/PetApi.kt
@@ -20,17 +20,18 @@ import io.ktor.auth.OAuthAccessTokenResponse
import io.ktor.auth.OAuthServerSettings
import io.ktor.http.ContentType
import io.ktor.http.HttpStatusCode
-import io.ktor.locations.KtorExperimentalLocationsAPI
-import io.ktor.locations.delete
-import io.ktor.locations.get
import io.ktor.response.respond
import io.ktor.response.respondText
import io.ktor.routing.Route
-import io.ktor.routing.post
-import io.ktor.routing.put
-import io.ktor.routing.route
-
import org.openapitools.server.Paths
+import io.ktor.locations.KtorExperimentalLocationsAPI
+import io.ktor.locations.delete
+import io.ktor.locations.get
+import io.ktor.locations.post
+import io.ktor.locations.put
+import io.ktor.locations.options
+import io.ktor.locations.head
+
import org.openapitools.server.infrastructure.ApiPrincipal
@@ -41,40 +42,27 @@ import org.openapitools.server.models.Pet
fun Route.PetApi() {
val gson = Gson()
val empty = mutableMapOf()
-
- route("/pet") {
- authenticate("petstore_auth") {
- post {
- val principal = call.authentication.principal()
-
- if (principal == null) {
- call.respond(HttpStatusCode.Unauthorized)
- } else {
- call.respond(HttpStatusCode.NotImplemented)
- }
- }
- }
+ authenticate("petstore_auth") {
+ post {
+ val principal = call.authentication.principal()!!
+
+ call.respond(HttpStatusCode.NotImplemented)
+ }
}
-
- delete { _: Paths.deletePet ->
- val principal = call.authentication.principal()
+ authenticate("petstore_auth") {
+ delete {
+ val principal = call.authentication.principal()!!
- if (principal == null) {
- call.respond(HttpStatusCode.Unauthorized)
- } else {
- call.respond(HttpStatusCode.NotImplemented)
- }
+ call.respond(HttpStatusCode.NotImplemented)
+ }
}
-
- get { _: Paths.findPetsByStatus ->
- val principal = call.authentication.principal()
+ authenticate("petstore_auth") {
+ get {
+ val principal = call.authentication.principal()!!
- if (principal == null) {
- call.respond(HttpStatusCode.Unauthorized)
- } else {
- val exampleContentType = "application/json"
+ val exampleContentType = "application/json"
val exampleContentString = """{
"photoUrls" : [ "photoUrls", "photoUrls" ],
"name" : "doggie",
@@ -93,22 +81,19 @@ fun Route.PetApi() {
"status" : "available"
}"""
- when(exampleContentType) {
+ when (exampleContentType) {
"application/json" -> call.respond(gson.fromJson(exampleContentString, empty::class.java))
"application/xml" -> call.respondText(exampleContentString, ContentType.Text.Xml)
else -> call.respondText(exampleContentString)
}
- }
+ }
}
-
- get { _: Paths.findPetsByTags ->
- val principal = call.authentication.principal()
+ authenticate("petstore_auth") {
+ get {
+ val principal = call.authentication.principal()!!
- if (principal == null) {
- call.respond(HttpStatusCode.Unauthorized)
- } else {
- val exampleContentType = "application/json"
+ val exampleContentType = "application/json"
val exampleContentString = """{
"photoUrls" : [ "photoUrls", "photoUrls" ],
"name" : "doggie",
@@ -127,22 +112,19 @@ fun Route.PetApi() {
"status" : "available"
}"""
- when(exampleContentType) {
+ when (exampleContentType) {
"application/json" -> call.respond(gson.fromJson(exampleContentString, empty::class.java))
"application/xml" -> call.respondText(exampleContentString, ContentType.Text.Xml)
else -> call.respondText(exampleContentString)
}
- }
+ }
}
-
- get { _: Paths.getPetById ->
- val principal = call.authentication.principal()
+ authenticate("api_key") {
+ get {
+ val principal = call.authentication.principal()!!
- if (principal == null) {
- call.respond(HttpStatusCode.Unauthorized)
- } else {
- val exampleContentType = "application/json"
+ val exampleContentType = "application/json"
val exampleContentString = """{
"photoUrls" : [ "photoUrls", "photoUrls" ],
"name" : "doggie",
@@ -161,68 +143,47 @@ fun Route.PetApi() {
"status" : "available"
}"""
- when(exampleContentType) {
+ when (exampleContentType) {
"application/json" -> call.respond(gson.fromJson(exampleContentString, empty::class.java))
"application/xml" -> call.respondText(exampleContentString, ContentType.Text.Xml)
else -> call.respondText(exampleContentString)
}
- }
+ }
}
-
- route("/pet") {
- authenticate("petstore_auth") {
- put {
- val principal = call.authentication.principal()
-
- if (principal == null) {
- call.respond(HttpStatusCode.Unauthorized)
- } else {
- call.respond(HttpStatusCode.NotImplemented)
- }
- }
- }
+ authenticate("petstore_auth") {
+ put {
+ val principal = call.authentication.principal()!!
+
+ call.respond(HttpStatusCode.NotImplemented)
+ }
}
-
- route("/pet/{petId}") {
- authenticate("petstore_auth") {
- post {
- val principal = call.authentication.principal()
-
- if (principal == null) {
- call.respond(HttpStatusCode.Unauthorized)
- } else {
- call.respond(HttpStatusCode.NotImplemented)
- }
- }
- }
+ authenticate("petstore_auth") {
+ post {
+ val principal = call.authentication.principal()!!
+
+ call.respond(HttpStatusCode.NotImplemented)
+ }
}
-
- route("/pet/{petId}/uploadImage") {
- authenticate("petstore_auth") {
- post {
- val principal = call.authentication.principal()
+ authenticate("petstore_auth") {
+ post {
+ val principal = call.authentication.principal()!!
+
+ val exampleContentType = "application/json"
+ val exampleContentString = """{
+ "code" : 0,
+ "type" : "type",
+ "message" : "message"
+ }"""
- if (principal == null) {
- call.respond(HttpStatusCode.Unauthorized)
- } else {
- val exampleContentType = "application/json"
- val exampleContentString = """{
- "code" : 0,
- "type" : "type",
- "message" : "message"
- }"""
-
- when(exampleContentType) {
- "application/json" -> call.respond(gson.fromJson(exampleContentString, empty::class.java))
- "application/xml" -> call.respondText(exampleContentString, ContentType.Text.Xml)
- else -> call.respondText(exampleContentString)
- }
- }
- }
+ when (exampleContentType) {
+ "application/json" -> call.respond(gson.fromJson(exampleContentString, empty::class.java))
+ "application/xml" -> call.respondText(exampleContentString, ContentType.Text.Xml)
+ else -> call.respondText(exampleContentString)
}
}
+ }
}
diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt
index 17b2c526bd9..2e5f4ab8b96 100644
--- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt
+++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/StoreApi.kt
@@ -20,17 +20,18 @@ import io.ktor.auth.OAuthAccessTokenResponse
import io.ktor.auth.OAuthServerSettings
import io.ktor.http.ContentType
import io.ktor.http.HttpStatusCode
-import io.ktor.locations.KtorExperimentalLocationsAPI
-import io.ktor.locations.delete
-import io.ktor.locations.get
import io.ktor.response.respond
import io.ktor.response.respondText
import io.ktor.routing.Route
-import io.ktor.routing.post
-import io.ktor.routing.put
-import io.ktor.routing.route
-
import org.openapitools.server.Paths
+import io.ktor.locations.KtorExperimentalLocationsAPI
+import io.ktor.locations.delete
+import io.ktor.locations.get
+import io.ktor.locations.post
+import io.ktor.locations.put
+import io.ktor.locations.options
+import io.ktor.locations.head
+
import org.openapitools.server.infrastructure.ApiPrincipal
@@ -40,24 +41,19 @@ import org.openapitools.server.models.Order
fun Route.StoreApi() {
val gson = Gson()
val empty = mutableMapOf()
-
- delete { _: Paths.deleteOrder ->
+ delete {
call.respond(HttpStatusCode.NotImplemented)
}
-
- get { _: Paths.getInventory ->
- val principal = call.authentication.principal()
+ authenticate("api_key") {
+ get {
+ val principal = call.authentication.principal()!!
- if (principal == null) {
- call.respond(HttpStatusCode.Unauthorized)
- } else {
- call.respond(HttpStatusCode.NotImplemented)
- }
+ call.respond(HttpStatusCode.NotImplemented)
+ }
}
-
- get { _: Paths.getOrderById ->
+ get {
val exampleContentType = "application/json"
val exampleContentString = """{
"petId" : 6,
@@ -68,31 +64,28 @@ fun Route.StoreApi() {
"status" : "placed"
}"""
- when(exampleContentType) {
+ when (exampleContentType) {
"application/json" -> call.respond(gson.fromJson(exampleContentString, empty::class.java))
"application/xml" -> call.respondText(exampleContentString, ContentType.Text.Xml)
else -> call.respondText(exampleContentString)
}
}
-
- route("/store/order") {
- post {
- val exampleContentType = "application/json"
- val exampleContentString = """{
- "petId" : 6,
- "quantity" : 1,
- "id" : 0,
- "shipDate" : "2000-01-23T04:56:07.000+00:00",
- "complete" : false,
- "status" : "placed"
- }"""
-
- when(exampleContentType) {
- "application/json" -> call.respond(gson.fromJson(exampleContentString, empty::class.java))
- "application/xml" -> call.respondText(exampleContentString, ContentType.Text.Xml)
- else -> call.respondText(exampleContentString)
- }
+ post {
+ val exampleContentType = "application/json"
+ val exampleContentString = """{
+ "petId" : 6,
+ "quantity" : 1,
+ "id" : 0,
+ "shipDate" : "2000-01-23T04:56:07.000+00:00",
+ "complete" : false,
+ "status" : "placed"
+ }"""
+
+ when (exampleContentType) {
+ "application/json" -> call.respond(gson.fromJson(exampleContentString, empty::class.java))
+ "application/xml" -> call.respondText(exampleContentString, ContentType.Text.Xml)
+ else -> call.respondText(exampleContentString)
}
}
diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/UserApi.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/UserApi.kt
index 7fc0b78fa99..e248d75ae0c 100644
--- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/UserApi.kt
+++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/apis/UserApi.kt
@@ -20,17 +20,18 @@ import io.ktor.auth.OAuthAccessTokenResponse
import io.ktor.auth.OAuthServerSettings
import io.ktor.http.ContentType
import io.ktor.http.HttpStatusCode
-import io.ktor.locations.KtorExperimentalLocationsAPI
-import io.ktor.locations.delete
-import io.ktor.locations.get
import io.ktor.response.respond
import io.ktor.response.respondText
import io.ktor.routing.Route
-import io.ktor.routing.post
-import io.ktor.routing.put
-import io.ktor.routing.route
-
import org.openapitools.server.Paths
+import io.ktor.locations.KtorExperimentalLocationsAPI
+import io.ktor.locations.delete
+import io.ktor.locations.get
+import io.ktor.locations.post
+import io.ktor.locations.put
+import io.ktor.locations.options
+import io.ktor.locations.head
+
import org.openapitools.server.infrastructure.ApiPrincipal
@@ -40,34 +41,23 @@ import org.openapitools.server.models.User
fun Route.UserApi() {
val gson = Gson()
val empty = mutableMapOf()
-
- route("/user") {
- post {
- call.respond(HttpStatusCode.NotImplemented)
- }
- }
-
-
- route("/user/createWithArray") {
- post {
- call.respond(HttpStatusCode.NotImplemented)
- }
- }
-
-
- route("/user/createWithList") {
- post {
- call.respond(HttpStatusCode.NotImplemented)
- }
- }
-
-
- delete { _: Paths.deleteUser ->
+ post {
call.respond(HttpStatusCode.NotImplemented)
}
+ post {
+ call.respond(HttpStatusCode.NotImplemented)
+ }
- get { _: Paths.getUserByName ->
+ post {
+ call.respond(HttpStatusCode.NotImplemented)
+ }
+
+ delete {
+ call.respond(HttpStatusCode.NotImplemented)
+ }
+
+ get {
val exampleContentType = "application/json"
val exampleContentString = """{
"firstName" : "firstName",
@@ -80,28 +70,23 @@ fun Route.UserApi() {
"username" : "username"
}"""
- when(exampleContentType) {
+ when (exampleContentType) {
"application/json" -> call.respond(gson.fromJson(exampleContentString, empty::class.java))
"application/xml" -> call.respondText(exampleContentString, ContentType.Text.Xml)
else -> call.respondText(exampleContentString)
}
}
-
- get { _: Paths.loginUser ->
+ get {
call.respond(HttpStatusCode.NotImplemented)
}
-
- get { _: Paths.logoutUser ->
+ get {
call.respond(HttpStatusCode.NotImplemented)
}
-
- route("/user/{username}") {
- put {
- call.respond(HttpStatusCode.NotImplemented)
- }
+ put {
+ call.respond(HttpStatusCode.NotImplemented)
}
}
diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/infrastructure/ApiKeyAuth.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/infrastructure/ApiKeyAuth.kt
index 8de972967ef..de09ba8b6b6 100644
--- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/infrastructure/ApiKeyAuth.kt
+++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/infrastructure/ApiKeyAuth.kt
@@ -1,85 +1,105 @@
package org.openapitools.server.infrastructure
-import io.ktor.application.ApplicationCall
-import io.ktor.application.call
-import io.ktor.auth.Authentication
-import io.ktor.auth.AuthenticationFailedCause
-import io.ktor.auth.AuthenticationPipeline
-import io.ktor.auth.AuthenticationProvider
-import io.ktor.auth.Credential
-import io.ktor.auth.Principal
-import io.ktor.auth.UnauthorizedResponse
-import io.ktor.http.auth.HeaderValueEncoding
-import io.ktor.http.auth.HttpAuthHeader
-import io.ktor.request.ApplicationRequest
-import io.ktor.response.respond
+import io.ktor.application.*
+import io.ktor.auth.*
+import io.ktor.http.auth.*
+import io.ktor.request.*
+import io.ktor.response.*
enum class ApiKeyLocation(val location: String) {
QUERY("query"),
HEADER("header")
}
-data class ApiKeyCredential(val value: String): Credential
+
+data class ApiKeyCredential(val value: String) : Credential
data class ApiPrincipal(val apiKeyCredential: ApiKeyCredential?) : Principal
-
-
/**
* Represents a Api Key authentication provider
* @param name is the name of the provider, or `null` for a default provider
*/
-class ApiKeyAuthenticationProvider(name: String?) : AuthenticationProvider(name) {
- internal var authenticationFunction: suspend ApplicationCall.(ApiKeyCredential) -> Principal? = { null }
+class ApiKeyAuthenticationProvider(configuration: Configuration) : AuthenticationProvider(configuration) {
- var apiKeyName: String = "";
+ private val authenticationFunction = configuration.authenticationFunction
- var apiKeyLocation: ApiKeyLocation = ApiKeyLocation.QUERY;
+ private val apiKeyName: String = configuration.apiKeyName
- /**
- * Sets a validation function that will check given [ApiKeyCredential] instance and return [Principal],
- * or null if credential does not correspond to an authenticated principal
- */
- fun validate(body: suspend ApplicationCall.(ApiKeyCredential) -> Principal?) {
- authenticationFunction = body
- }
-}
+ private val apiKeyLocation: ApiKeyLocation = configuration.apiKeyLocation
-fun Authentication.Configuration.apiKeyAuth(name: String? = null, configure: ApiKeyAuthenticationProvider.() -> Unit) {
- val provider = ApiKeyAuthenticationProvider(name).apply(configure)
- val apiKeyName = provider.apiKeyName
- val apiKeyLocation = provider.apiKeyLocation
- val authenticate = provider.authenticationFunction
+ internal fun install() {
+ pipeline.intercept(AuthenticationPipeline.RequestAuthentication) { context ->
+ val credentials = call.request.apiKeyAuthenticationCredentials(apiKeyName, apiKeyLocation)
+ val principal = credentials?.let { authenticationFunction(call, it) }
- provider.pipeline.intercept(AuthenticationPipeline.RequestAuthentication) { context ->
- val credentials = call.request.apiKeyAuthenticationCredentials(apiKeyName, apiKeyLocation)
- val principal = credentials?.let { authenticate(call, it) }
+ val cause = when {
+ credentials == null -> AuthenticationFailedCause.NoCredentials
+ principal == null -> AuthenticationFailedCause.InvalidCredentials
+ else -> null
+ }
- val cause = when {
- credentials == null -> AuthenticationFailedCause.NoCredentials
- principal == null -> AuthenticationFailedCause.InvalidCredentials
- else -> null
- }
+ if (cause != null) {
+ context.challenge(apiKeyName, cause) {
+ call.respond(
+ UnauthorizedResponse(
+ HttpAuthHeader.Parameterized(
+ "API_KEY",
+ mapOf("key" to apiKeyName),
+ HeaderValueEncoding.QUOTED_ALWAYS
+ )
+ )
+ )
+ it.complete()
+ }
+ }
- if (cause != null) {
- context.challenge(apiKeyName, cause) {
- // TODO: Verify correct response structure here.
- call.respond(UnauthorizedResponse(HttpAuthHeader.Parameterized("API_KEY", mapOf("key" to apiKeyName), HeaderValueEncoding.QUOTED_ALWAYS)))
- it.complete()
+ if (principal != null) {
+ context.principal(principal)
}
}
+ }
- if (principal != null) {
- context.principal(principal)
+ class Configuration internal constructor(name: String?) : AuthenticationProvider.Configuration(name) {
+
+ internal var authenticationFunction: suspend ApplicationCall.(ApiKeyCredential) -> Principal? = {
+ throw NotImplementedError(
+ "Api Key auth validate function is not specified. Use apiKeyAuth { validate { ... } } to fix."
+ )
+ }
+
+ var apiKeyName: String = ""
+
+ var apiKeyLocation: ApiKeyLocation = ApiKeyLocation.QUERY
+
+ /**
+ * Sets a validation function that will check given [ApiKeyCredential] instance and return [Principal],
+ * or null if credential does not correspond to an authenticated principal
+ */
+ fun validate(body: suspend ApplicationCall.(ApiKeyCredential) -> Principal?) {
+ authenticationFunction = body
}
}
}
-fun ApplicationRequest.apiKeyAuthenticationCredentials(apiKeyName: String, apiKeyLocation: ApiKeyLocation): ApiKeyCredential? {
- val value: String? = when(apiKeyLocation) {
+fun Authentication.Configuration.apiKeyAuth(
+ name: String? = null,
+ configure: ApiKeyAuthenticationProvider.Configuration.() -> Unit
+) {
+ val configuration = ApiKeyAuthenticationProvider.Configuration(name).apply(configure)
+ val provider = ApiKeyAuthenticationProvider(configuration)
+ provider.install()
+ register(provider)
+}
+
+fun ApplicationRequest.apiKeyAuthenticationCredentials(
+ apiKeyName: String,
+ apiKeyLocation: ApiKeyLocation
+): ApiKeyCredential? {
+ val value: String? = when (apiKeyLocation) {
ApiKeyLocation.QUERY -> this.queryParameters[apiKeyName]
ApiKeyLocation.HEADER -> this.headers[apiKeyName]
}
- when (value) {
- null -> return null
- else -> return ApiKeyCredential(value)
+ return when (value) {
+ null -> null
+ else -> ApiKeyCredential(value)
}
}
diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/ApiResponse.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/ApiResponse.kt
index 45760790990..14f50dbb9ad 100644
--- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/ApiResponse.kt
+++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/ApiResponse.kt
@@ -19,7 +19,7 @@ import java.io.Serializable
* @param type
* @param message
*/
-data class ApiResponse (
+data class ApiResponse(
val code: kotlin.Int? = null,
val type: kotlin.String? = null,
val message: kotlin.String? = null
diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Category.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Category.kt
index ee26d4c76e5..9d857192138 100644
--- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Category.kt
+++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Category.kt
@@ -18,7 +18,7 @@ import java.io.Serializable
* @param id
* @param name
*/
-data class Category (
+data class Category(
val id: kotlin.Long? = null,
val name: kotlin.String? = null
) : Serializable
diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Order.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Order.kt
index 7889abe12ee..5e9e18b0328 100644
--- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Order.kt
+++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Order.kt
@@ -22,7 +22,7 @@ import java.io.Serializable
* @param status Order Status
* @param complete
*/
-data class Order (
+data class Order(
val id: kotlin.Long? = null,
val petId: kotlin.Long? = null,
val quantity: kotlin.Int? = null,
diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Pet.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Pet.kt
index 8dc13b7ea6e..8b98ce0469c 100644
--- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Pet.kt
+++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Pet.kt
@@ -24,12 +24,12 @@ import java.io.Serializable
* @param tags
* @param status pet status in the store
*/
-data class Pet (
+data class Pet(
val name: kotlin.String,
- val photoUrls: kotlin.Array,
+ val photoUrls: kotlin.collections.List,
val id: kotlin.Long? = null,
val category: Category? = null,
- val tags: kotlin.Array? = null,
+ val tags: kotlin.collections.List? = null,
/* pet status in the store */
val status: Pet.Status? = null
) : Serializable
diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Tag.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Tag.kt
index 49c2887a503..e9626b25c6d 100644
--- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Tag.kt
+++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/Tag.kt
@@ -18,7 +18,7 @@ import java.io.Serializable
* @param id
* @param name
*/
-data class Tag (
+data class Tag(
val id: kotlin.Long? = null,
val name: kotlin.String? = null
) : Serializable
diff --git a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/User.kt b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/User.kt
index dee8de740bd..fdbdb4e1cff 100644
--- a/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/User.kt
+++ b/samples/server/petstore/kotlin-server/ktor/src/main/kotlin/org/openapitools/server/models/User.kt
@@ -24,7 +24,7 @@ import java.io.Serializable
* @param phone
* @param userStatus User Status
*/
-data class User (
+data class User(
val id: kotlin.Long? = null,
val username: kotlin.String? = null,
val firstName: kotlin.String? = null,
diff --git a/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION
+++ b/samples/server/petstore/kotlin-springboot-delegate/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt
index 10a19f58d05..2880b39b990 100644
--- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt
+++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/PetApi.kt
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApi.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApi.kt
index 88b02becf93..14a9d0fa525 100644
--- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApi.kt
+++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/StoreApi.kt
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt
index 9fa0622ad70..233a3bb1a5f 100644
--- a/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt
+++ b/samples/server/petstore/kotlin-springboot-delegate/src/main/kotlin/org/openapitools/api/UserApi.kt
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION
+++ b/samples/server/petstore/kotlin-springboot-reactive/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION b/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION
+++ b/samples/server/petstore/kotlin-springboot/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/php-laravel/.openapi-generator/VERSION b/samples/server/petstore/php-laravel/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/php-laravel/.openapi-generator/VERSION
+++ b/samples/server/petstore/php-laravel/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/php-lumen/.openapi-generator/VERSION b/samples/server/petstore/php-lumen/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/php-lumen/.openapi-generator/VERSION
+++ b/samples/server/petstore/php-lumen/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/php-mezzio-ph/.openapi-generator/VERSION b/samples/server/petstore/php-mezzio-ph/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/php-mezzio-ph/.openapi-generator/VERSION
+++ b/samples/server/petstore/php-mezzio-ph/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/php-slim4/.openapi-generator/VERSION b/samples/server/petstore/php-slim4/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/php-slim4/.openapi-generator/VERSION
+++ b/samples/server/petstore/php-slim4/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION b/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION
+++ b/samples/server/petstore/php-symfony/SymfonyBundle-php/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION b/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION
+++ b/samples/server/petstore/python-aiohttp-srclayout/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/python-aiohttp/.openapi-generator/VERSION b/samples/server/petstore/python-aiohttp/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/python-aiohttp/.openapi-generator/VERSION
+++ b/samples/server/petstore/python-aiohttp/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION b/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION
+++ b/samples/server/petstore/python-blueplanet/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/python-flask/.openapi-generator/VERSION b/samples/server/petstore/python-flask/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/python-flask/.openapi-generator/VERSION
+++ b/samples/server/petstore/python-flask/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/rust-server/output/multipart-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/multipart-v3/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/rust-server/output/multipart-v3/.openapi-generator/VERSION
+++ b/samples/server/petstore/rust-server/output/multipart-v3/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/rust-server/output/no-example-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/no-example-v3/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/rust-server/output/no-example-v3/.openapi-generator/VERSION
+++ b/samples/server/petstore/rust-server/output/no-example-v3/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION
+++ b/samples/server/petstore/rust-server/output/openapi-v3/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/rust-server/output/ops-v3/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/ops-v3/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/rust-server/output/ops-v3/.openapi-generator/VERSION
+++ b/samples/server/petstore/rust-server/output/ops-v3/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION
+++ b/samples/server/petstore/rust-server/output/petstore-with-fake-endpoints-models-for-testing/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/rust-server/output/ping-bearer-auth/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/ping-bearer-auth/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/rust-server/output/ping-bearer-auth/.openapi-generator/VERSION
+++ b/samples/server/petstore/rust-server/output/ping-bearer-auth/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION b/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION
+++ b/samples/server/petstore/rust-server/output/rust-server-test/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/spring-mvc-default-value/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-default-value/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/spring-mvc-default-value/.openapi-generator/VERSION
+++ b/samples/server/petstore/spring-mvc-default-value/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java
index 7f092818342..2d31a64a04d 100644
--- a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java
+++ b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestHeadersApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApi.java b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApi.java
index 2f99283ef45..a3f907809a0 100644
--- a/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApi.java
+++ b/samples/server/petstore/spring-mvc-default-value/src/main/java/org/openapitools/api/TestQueryParamsApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION
+++ b/samples/server/petstore/spring-mvc-j8-async/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java
index a2037e5fe86..8326ab48c02 100644
--- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java
index 778d4f1be39..b301ad0b485 100644
--- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
index b70d43c328e..3de6e0e2188 100644
--- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java
index 22fbc9958bd..f2512f9eac3 100644
--- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java
index 319f706fb5d..03fa53219d9 100644
--- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java
index 7db39677ba7..bc349aa67c0 100644
--- a/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/spring-mvc-j8-async/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION
+++ b/samples/server/petstore/spring-mvc-j8-localdatetime/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java
index f0b6db968e1..62b5e8c1c9e 100644
--- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java
index f43feafd065..1d52ff9cf88 100644
--- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
index ad154f0e01b..ce5242fa1b9 100644
--- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java
index e55f761c2c9..6c50971728c 100644
--- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java
index 3865fc90698..a18ef080341 100644
--- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java
index 0e60b7c2863..bdd829c2178 100644
--- a/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/spring-mvc-j8-localdatetime/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/spring-mvc-no-nullable/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-no-nullable/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/spring-mvc-no-nullable/.openapi-generator/VERSION
+++ b/samples/server/petstore/spring-mvc-no-nullable/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java
index f0b6db968e1..62b5e8c1c9e 100644
--- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java
index f33e950abe6..9c17aee08e3 100644
--- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
index ad154f0e01b..ce5242fa1b9 100644
--- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java
index e55f761c2c9..6c50971728c 100644
--- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java
index 3865fc90698..a18ef080341 100644
--- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java
index 0e60b7c2863..bdd829c2178 100644
--- a/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/spring-mvc-no-nullable/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/spring-mvc-spring-pageable/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc-spring-pageable/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/spring-mvc-spring-pageable/.openapi-generator/VERSION
+++ b/samples/server/petstore/spring-mvc-spring-pageable/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java
index f0b6db968e1..62b5e8c1c9e 100644
--- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java
index 907b44a2e71..b0b57f815bd 100644
--- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
index ad154f0e01b..ce5242fa1b9 100644
--- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java
index 52062d995ab..2e67f9eb609 100644
--- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java
index 3865fc90698..a18ef080341 100644
--- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java
index 0e60b7c2863..bdd829c2178 100644
--- a/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/spring-mvc-spring-pageable/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/spring-mvc/.openapi-generator/VERSION b/samples/server/petstore/spring-mvc/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/spring-mvc/.openapi-generator/VERSION
+++ b/samples/server/petstore/spring-mvc/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java
index f0b6db968e1..62b5e8c1c9e 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java
index f33e950abe6..9c17aee08e3 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
index ad154f0e01b..ce5242fa1b9 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java
index e55f761c2c9..6c50971728c 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java
index 3865fc90698..a18ef080341 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java
index 0e60b7c2863..bdd829c2178 100644
--- a/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/spring-mvc/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION b/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION
+++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java
index f370b93b411..dfae7d61930 100644
--- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java
index ead3bab5434..68cec85a19a 100644
--- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
index b4daf946f40..d2215dd0d1b 100644
--- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java
index 4c6d443781b..b9655c2c700 100644
--- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java
index 7f5bf19008a..69c047f7c67 100644
--- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java
index 47852ded8c9..972cc8bc468 100644
--- a/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/springboot-beanvalidation-no-nullable/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION b/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION
+++ b/samples/server/petstore/springboot-beanvalidation/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java
index f0b6db968e1..62b5e8c1c9e 100644
--- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java
index f33e950abe6..9c17aee08e3 100644
--- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
index ad154f0e01b..ce5242fa1b9 100644
--- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java
index e55f761c2c9..6c50971728c 100644
--- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java
index 3865fc90698..a18ef080341 100644
--- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java
index 0e60b7c2863..bdd829c2178 100644
--- a/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/springboot-beanvalidation/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION b/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION
+++ b/samples/server/petstore/springboot-delegate-j8/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java
index 5100938329c..f4afb63f618 100644
--- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java
index 985c9ae6cb6..f085be2317d 100644
--- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
index e1654342989..572b49ba2a9 100644
--- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java
index 5d51a962824..b7a84c916cf 100644
--- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java
index 757bd818f60..05cfb8f5758 100644
--- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java
index 66a0b7b59a4..5b351223593 100644
--- a/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/springboot-delegate-j8/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION b/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION
+++ b/samples/server/petstore/springboot-delegate/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java
index 5100938329c..f4afb63f618 100644
--- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java
index 985c9ae6cb6..f085be2317d 100644
--- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
index e1654342989..572b49ba2a9 100644
--- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java
index 5d51a962824..b7a84c916cf 100644
--- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java
index 757bd818f60..05cfb8f5758 100644
--- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java
index 66a0b7b59a4..5b351223593 100644
--- a/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/springboot-delegate/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION b/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION
+++ b/samples/server/petstore/springboot-implicitHeaders/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java
index def9e07d22c..0fa0742fe83 100644
--- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java
index 9652c38fc95..e985e37bc09 100644
--- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
index b248d6cbde0..3d7f2e2ea28 100644
--- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java
index 4bb4d65097c..209a72ff977 100644
--- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java
index 0a715ba8561..94057aa6fc5 100644
--- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java
index f2268686b16..b60e3580cf6 100644
--- a/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/springboot-implicitHeaders/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION b/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION
+++ b/samples/server/petstore/springboot-reactive/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java
index 03f98087f0e..eea35ce51b8 100644
--- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java
index d0f55aa5f14..33228158d4d 100644
--- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
index 06ee4efe968..15b48f22a52 100644
--- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java
index 14dfbbba24f..41ed1eeccd3 100644
--- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java
index 4ca60e5766e..520c688e3fa 100644
--- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java
index 75ce75a9bd1..2f3e0a55c9b 100644
--- a/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/springboot-reactive/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/VERSION b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/VERSION
+++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java
index f370b93b411..dfae7d61930 100644
--- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java
index 83b27205804..54e73fc876d 100644
--- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
index b4daf946f40..d2215dd0d1b 100644
--- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java
index 2f029cb7317..dcdb633acf6 100644
--- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java
index 7f5bf19008a..69c047f7c67 100644
--- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java
index 47852ded8c9..972cc8bc468 100644
--- a/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern-without-j8/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/VERSION b/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/VERSION
+++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java
index 5100938329c..f4afb63f618 100644
--- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java
index f536fb7fb77..02a920c8bf8 100644
--- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
index e1654342989..572b49ba2a9 100644
--- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java
index 8d28ab3eb4b..0e5bdeffced 100644
--- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java
index 757bd818f60..05cfb8f5758 100644
--- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java
index 66a0b7b59a4..5b351223593 100644
--- a/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-delegatePattern/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/VERSION b/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/VERSION
+++ b/samples/server/petstore/springboot-spring-pageable-without-j8/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java
index f370b93b411..dfae7d61930 100644
--- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java
index 83b27205804..54e73fc876d 100644
--- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
index b4daf946f40..d2215dd0d1b 100644
--- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java
index 2f029cb7317..dcdb633acf6 100644
--- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java
index 7f5bf19008a..69c047f7c67 100644
--- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java
index 47852ded8c9..972cc8bc468 100644
--- a/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/springboot-spring-pageable-without-j8/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-spring-pageable/.openapi-generator/VERSION b/samples/server/petstore/springboot-spring-pageable/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/springboot-spring-pageable/.openapi-generator/VERSION
+++ b/samples/server/petstore/springboot-spring-pageable/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java
index f0b6db968e1..62b5e8c1c9e 100644
--- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java
index 907b44a2e71..b0b57f815bd 100644
--- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
index ad154f0e01b..ce5242fa1b9 100644
--- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java
index 52062d995ab..2e67f9eb609 100644
--- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java
index 3865fc90698..a18ef080341 100644
--- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java
index 0e60b7c2863..bdd829c2178 100644
--- a/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/springboot-spring-pageable/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION b/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION
+++ b/samples/server/petstore/springboot-useoptional/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java
index f0b6db968e1..62b5e8c1c9e 100644
--- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java
index 54945f56983..5360eef212b 100644
--- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
index ad154f0e01b..ce5242fa1b9 100644
--- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java
index d9126589b9d..581c9ec1d36 100644
--- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java
index 3865fc90698..a18ef080341 100644
--- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java
index 0e60b7c2863..bdd829c2178 100644
--- a/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/springboot-useoptional/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION b/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION
+++ b/samples/server/petstore/springboot-virtualan/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java
index 398d5243657..5ba806e0898 100644
--- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java
+++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java
index 9d9be5d4316..b3dcb0a9400 100644
--- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java
+++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java
index 217abb586cb..a963e319969 100644
--- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java
index 4e28d22110c..a83c6d8326d 100644
--- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java
+++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/PetApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java
index 3ed5eaebc28..e9cd51627cd 100644
--- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java
+++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/StoreApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java
index 12aebcbe2f8..d730f7e2ab0 100644
--- a/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java
+++ b/samples/server/petstore/springboot-virtualan/src/main/java/org/openapitools/virtualan/api/UserApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot/.openapi-generator/VERSION b/samples/server/petstore/springboot/.openapi-generator/VERSION
index 3bff059174b..6555596f931 100644
--- a/samples/server/petstore/springboot/.openapi-generator/VERSION
+++ b/samples/server/petstore/springboot/.openapi-generator/VERSION
@@ -1 +1 @@
-5.1.1
\ No newline at end of file
+5.2.0-SNAPSHOT
\ No newline at end of file
diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java
index f0b6db968e1..62b5e8c1c9e 100644
--- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java
+++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/AnotherFakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java
index f33e950abe6..9c17aee08e3 100644
--- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java
+++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
index ad154f0e01b..ce5242fa1b9 100644
--- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
+++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/FakeClassnameTestApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java
index e55f761c2c9..6c50971728c 100644
--- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java
+++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/PetApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java
index 3865fc90698..a18ef080341 100644
--- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java
+++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/StoreApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/
diff --git a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java
index 0e60b7c2863..bdd829c2178 100644
--- a/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java
+++ b/samples/server/petstore/springboot/src/main/java/org/openapitools/api/UserApi.java
@@ -1,5 +1,5 @@
/**
- * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.1.1).
+ * NOTE: This class is auto generated by OpenAPI Generator (https://openapi-generator.tech) (5.2.0-SNAPSHOT).
* https://openapi-generator.tech
* Do not edit the class manually.
*/