diff --git a/docs/generators/python-experimental.md b/docs/generators/python-experimental.md
index 00614e6ccb12..0d46556daf7f 100644
--- a/docs/generators/python-experimental.md
+++ b/docs/generators/python-experimental.md
@@ -11,7 +11,7 @@ title: Documentation for the python-experimental Generator
| generator type | CLIENT | |
| generator language | Python | |
| generator language version | >=3.9 | |
-| helpTxt | Generates a Python client library
Features in this generator:
- type hints on endpoints and model creation
- model parameter names use the spec defined keys and cases
- robust composition (oneOf/anyOf/allOf) where paload data is stored in one instance only
- endpoint parameter names use the spec defined keys and cases
- inline schemas are supported at any location including composition
- multiple content types supported in request body and response bodies
- run time type checking
- quicker load time for python modules (a single endpoint can be imported and used without loading others)
- all instances of schemas dynamically inherit from all matching schemas so one can use isinstance to check if validation passed
- composed schemas with type constraints supported (type:object + oneOf/anyOf/allOf)
- schemas are not coerced/cast. For example string + date are both stored as string, and there is a date accessor
- Exceptions: int/float is stored as Decimal, When receiving data from headers it will start as str and may need to be cast for example to int | |
+| helpTxt | Generates a Python client library
Features in this generator:
- type hints on endpoints and model creation
- model parameter names use the spec defined keys and cases
- robust composition (oneOf/anyOf/allOf) where paload data is stored in one instance only
- endpoint parameter names use the spec defined keys and cases
- inline schemas are supported at any location including composition
- multiple content types supported in request body and response bodies
- run time type checking
- Sending/receiving decimals as strings supported with type:string format: number -> DecimalSchema
- quicker load time for python modules (a single endpoint can be imported and used without loading others)
- all instances of schemas dynamically inherit from all matching schemas so one can use isinstance to check if validation passed
- composed schemas with type constraints supported (type:object + oneOf/anyOf/allOf)
- schemas are not coerced/cast. For example string + date are both stored as string, and there is a date accessor
- Exceptions: int/float is stored as Decimal, When receiving data from headers it will start as str and may need to be cast for example to int | |
## CONFIG OPTIONS
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.
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java
index 91c8870774a7..00fa3cf7a5e8 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/CodegenModel.java
@@ -64,7 +64,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
public String defaultValue;
public String arrayModelType;
public boolean isAlias; // Is this effectively an alias of another simple type
- public boolean isString, isInteger, isLong, isNumber, isNumeric, isFloat, isDouble, isDate, isDateTime, isShort, isUnboundedInteger, isBoolean;
+ public boolean isString, isInteger, isLong, isNumber, isNumeric, isFloat, isDouble, isDate, isDateTime, isDecimal, isShort, isUnboundedInteger, isBoolean;
private boolean additionalPropertiesIsAnyType;
public List vars = new ArrayList<>(); // all properties (without parent's properties)
public List allVars = new ArrayList<>(); // all properties (with parent's properties)
@@ -856,6 +856,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
hasOnlyReadOnly == that.hasOnlyReadOnly &&
isNull == that.isNull &&
hasValidation == that.hasValidation &&
+ isDecimal == that.isDecimal &&
hasMultipleTypes == that.getHasMultipleTypes() &&
hasDiscriminatorWithNonEmptyMapping == that.getHasDiscriminatorWithNonEmptyMapping() &&
getIsAnyType() == that.getIsAnyType() &&
@@ -934,7 +935,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
getMinItems(), getMaxLength(), getMinLength(), getExclusiveMinimum(), getExclusiveMaximum(), getMinimum(),
getMaximum(), getPattern(), getMultipleOf(), getItems(), getAdditionalProperties(), getIsModel(),
getAdditionalPropertiesIsAnyType(), hasDiscriminatorWithNonEmptyMapping,
- isAnyType, getComposedSchemas(), hasMultipleTypes);
+ isAnyType, getComposedSchemas(), hasMultipleTypes, isDecimal);
}
@Override
@@ -1028,6 +1029,7 @@ public class CodegenModel implements IJsonSchemaValidationProperties {
sb.append(", getIsAnyType=").append(getIsAnyType());
sb.append(", composedSchemas=").append(composedSchemas);
sb.append(", hasMultipleTypes=").append(hasMultipleTypes);
+ sb.append(", isDecimal=").append(isDecimal);
sb.append('}');
return sb.toString();
}
diff --git a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java
index 2bcbcef08d07..5424080f0d7b 100644
--- a/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java
+++ b/modules/openapi-generator/src/main/java/org/openapitools/codegen/languages/PythonExperimentalClientCodegen.java
@@ -198,6 +198,7 @@ public class PythonExperimentalClientCodegen extends AbstractPythonCodegen {
languageSpecificPrimitives.add("file_type");
languageSpecificPrimitives.add("none_type");
+ typeMapping.put("decimal", "str");
generatorMetadata = GeneratorMetadata.newBuilder(generatorMetadata)
.stability(Stability.EXPERIMENTAL)
@@ -510,6 +511,7 @@ public class PythonExperimentalClientCodegen extends AbstractPythonCodegen {
"- inline schemas are supported at any location including composition",
"- multiple content types supported in request body and response bodies",
"- run time type checking",
+ "- Sending/receiving decimals as strings supported with type:string format: number -> DecimalSchema",
"- quicker load time for python modules (a single endpoint can be imported and used without loading others)",
"- all instances of schemas dynamically inherit from all matching schemas so one can use isinstance to check if validation passed",
"- composed schemas with type constraints supported (type:object + oneOf/anyOf/allOf)",
@@ -1053,6 +1055,14 @@ public class PythonExperimentalClientCodegen extends AbstractPythonCodegen {
@Override
public CodegenModel fromModel(String name, Schema sc) {
CodegenModel cm = super.fromModel(name, sc);
+ Schema unaliasedSchema = unaliasSchema(sc, importMapping);
+ if (unaliasedSchema != null) {
+ if (ModelUtils.isDecimalSchema(unaliasedSchema)) { // type: string, format: number
+ cm.isString = false;
+ cm.isDecimal = true;
+ }
+ }
+
if (cm.isNullable) {
cm.setIsNull(true);
cm.isNullable = false;
diff --git a/modules/openapi-generator/src/main/resources/python-experimental/api_client.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/api_client.handlebars
index 47c28bff18d0..4dfc613aae22 100644
--- a/modules/openapi-generator/src/main/resources/python-experimental/api_client.handlebars
+++ b/modules/openapi-generator/src/main/resources/python-experimental/api_client.handlebars
@@ -25,7 +25,6 @@ from {{packageName}} import rest
from {{packageName}}.configuration import Configuration
from {{packageName}}.exceptions import ApiTypeError, ApiValueError
from {{packageName}}.schemas import (
- Decimal,
NoneClass,
BoolClass,
Schema,
diff --git a/modules/openapi-generator/src/main/resources/python-experimental/api_test.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/api_test.handlebars
index a999b4b16c90..2f52783c605d 100644
--- a/modules/openapi-generator/src/main/resources/python-experimental/api_test.handlebars
+++ b/modules/openapi-generator/src/main/resources/python-experimental/api_test.handlebars
@@ -5,7 +5,7 @@
import unittest
import {{packageName}}
-from {{packageName}}.api.{{classFilename}} import {{classname}} # noqa: E501
+from {{packageName}}.{{apiPackage}}.{{classFilename}} import {{classname}} # noqa: E501
class {{#with operations}}Test{{classname}}(unittest.TestCase):
diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/imports_schema_types.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/imports_schema_types.handlebars
index 0741ba482fe6..38015e350440 100644
--- a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/imports_schema_types.handlebars
+++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/imports_schema_types.handlebars
@@ -1,4 +1,4 @@
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -16,6 +16,7 @@ from {{packageName}}.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/new.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/new.handlebars
index bb220e4b8f3a..e74461e8043e 100644
--- a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/new.handlebars
+++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/new.handlebars
@@ -1,6 +1,6 @@
def __new__(
cls,
- *args: typing.Union[{{#if isAnyType}}dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes{{/if}}{{#if isUnboundedInteger}}int, {{/if}}{{#if isNumber}}float, {{/if}}{{#if isBoolean}}bool, {{/if}}{{#if isArray}}list, tuple, {{/if}}{{#if isMap}}dict, frozendict, {{/if}}{{#if isString}}str, {{/if}}{{#if isNull}}None, {{/if}}],
+ *args: typing.Union[{{#if isAnyType}}dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes{{/if}}{{#if isUnboundedInteger}}int, {{/if}}{{#if isNumber}}float, {{/if}}{{#if isBoolean}}bool, {{/if}}{{#if isArray}}list, tuple, {{/if}}{{#if isMap}}dict, frozendict, {{/if}}{{#if isString}}str, {{/if}}{{#if isNull}}None, {{/if}}],
{{#unless isNull}}
{{#if getHasRequired}}
{{#each requiredVars}}
@@ -26,7 +26,7 @@ def __new__(
{{#with additionalProperties}}
**kwargs: typing.Type[Schema],
{{/with}}
-):
+) -> '{{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}{{/if}}':
return super().__new__(
cls,
*args,
diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_composed_or_anytype.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_composed_or_anytype.handlebars
index 2c9a6f469ba0..763da96feeb2 100644
--- a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_composed_or_anytype.handlebars
+++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/schema_composed_or_anytype.handlebars
@@ -12,7 +12,7 @@ class {{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}}
{{/if}}
{{else}}
{{#if getHasMultipleTypes}}
- _SchemaTypeChecker(typing.Union[{{#if isArray}}tuple, {{/if}}{{#if isMap}}frozendict, {{/if}}{{#if isNull}}none_type, {{/if}}{{#if isString}}str, {{/if}}{{#if isByteArray}}str, {{/if}}{{#if isUnboundedInteger}}Decimal, {{/if}}{{#if isShort}}Decimal, {{/if}}{{#if isLong}}Decimal, {{/if}}{{#if isFloat}}Decimal, {{/if}}{{#if isDouble}}Decimal, {{/if}}{{#if isNumber}}Decimal, {{/if}}{{#if isDate}}str, {{/if}}{{#if isDateTime}}str, {{/if}}{{#if isBoolean}}bool, {{/if}}]),
+ _SchemaTypeChecker(typing.Union[{{#if isArray}}tuple, {{/if}}{{#if isMap}}frozendict, {{/if}}{{#if isNull}}none_type, {{/if}}{{#if isString}}str, {{/if}}{{#if isByteArray}}str, {{/if}}{{#if isUnboundedInteger}}decimal.Decimal, {{/if}}{{#if isShort}}decimal.Decimal, {{/if}}{{#if isLong}}decimal.Decimal, {{/if}}{{#if isFloat}}decimal.Decimal, {{/if}}{{#if isDouble}}decimal.Decimal, {{/if}}{{#if isNumber}}decimal.Decimal, {{/if}}{{#if isDate}}str, {{/if}}{{#if isDateTime}}str, {{/if}}{{#if isDecimal}}str, {{/if}}{{#if isBoolean}}bool, {{/if}}]),
{{/if}}
{{#if composedSchemas}}
ComposedBase,
diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/var_equals_cls.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/var_equals_cls.handlebars
index 14b4c5e0648f..24f52cac6ca5 100644
--- a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/var_equals_cls.handlebars
+++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/var_equals_cls.handlebars
@@ -1 +1 @@
-{{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}{{/if}} = {{#if complexType}}{{complexType}}{{else}}{{#if isNullable}}Nullable{{/if}}{{#if getIsNull}}None{{/if}}{{#if isAnyType}}AnyType{{/if}}{{#if isMap}}Dict{{/if}}{{#if isArray}}List{{/if}}{{#if isString}}Str{{/if}}{{#if isByteArray}}Str{{/if}}{{#if isUnboundedInteger}}Int{{/if}}{{#if isShort}}Int32{{/if}}{{#if isLong}}Int64{{/if}}{{#if isFloat}}Float32{{/if}}{{#if isDouble}}Float64{{/if}}{{#if isNumber}}Number{{/if}}{{#if isDate}}Date{{/if}}{{#if isDateTime}}DateTime{{/if}}{{#if isBoolean}}Bool{{/if}}{{#if isBinary}}Binary{{/if}}Schema{{/if}}
+{{#if this.classname}}{{classname}}{{else}}{{#if nameInSnakeCase}}{{name}}{{else}}{{baseName}}{{/if}}{{/if}} = {{#if complexType}}{{complexType}}{{else}}{{#if isNullable}}Nullable{{/if}}{{#if getIsNull}}None{{/if}}{{#if isAnyType}}AnyType{{/if}}{{#if isMap}}Dict{{/if}}{{#if isArray}}List{{/if}}{{#if isString}}Str{{/if}}{{#if isByteArray}}Str{{/if}}{{#if isDate}}Date{{/if}}{{#if isDateTime}}DateTime{{/if}}{{#if isDecimal}}Decimal{{/if}}{{#if isUnboundedInteger}}Int{{/if}}{{#if isShort}}Int32{{/if}}{{#if isLong}}Int64{{/if}}{{#if isFloat}}Float32{{/if}}{{#if isDouble}}Float64{{/if}}{{#if isNumber}}Number{{/if}}{{#if isBoolean}}Bool{{/if}}{{#if isBinary}}Binary{{/if}}Schema{{/if}}
diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/xbase_schema.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/xbase_schema.handlebars
index 0b345344c432..87fe3d0b3244 100644
--- a/modules/openapi-generator/src/main/resources/python-experimental/model_templates/xbase_schema.handlebars
+++ b/modules/openapi-generator/src/main/resources/python-experimental/model_templates/xbase_schema.handlebars
@@ -34,6 +34,9 @@ Date{{#if getHasMultipleTypes}}Base,{{else}}Schema{{/if}}
{{#if isDateTime}}
DateTime{{#if getHasMultipleTypes}}Base,{{else}}Schema{{/if}}
{{/if}}
+{{#if isDecimal}}
+Decimal{{#if getHasMultipleTypes}}Base,{{else}}Schema{{/if}}
+{{/if}}
{{#if isBoolean}}
Bool{{#if getHasMultipleTypes}}Base,{{else}}Schema{{/if}}
{{/if}}
diff --git a/modules/openapi-generator/src/main/resources/python-experimental/model_test.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/model_test.handlebars
index 094d7f49b65d..48a4a7c85a12 100644
--- a/modules/openapi-generator/src/main/resources/python-experimental/model_test.handlebars
+++ b/modules/openapi-generator/src/main/resources/python-experimental/model_test.handlebars
@@ -2,13 +2,12 @@
{{>partial_header}}
-import sys
import unittest
import {{packageName}}
{{#each models}}
{{#with model}}
-from {{modelPackage}}.{{classFilename}} import {{classname}}
+from {{packageName}}.{{modelPackage}}.{{classFilename}} import {{classname}}
class Test{{classname}}(unittest.TestCase):
diff --git a/modules/openapi-generator/src/main/resources/python-experimental/schemas.handlebars b/modules/openapi-generator/src/main/resources/python-experimental/schemas.handlebars
index b238468f73a0..9450487cb54b 100644
--- a/modules/openapi-generator/src/main/resources/python-experimental/schemas.handlebars
+++ b/modules/openapi-generator/src/main/resources/python-experimental/schemas.handlebars
@@ -6,7 +6,7 @@ from collections import defaultdict
from datetime import date, datetime, timedelta # noqa: F401
from dataclasses import dataclass
import functools
-from decimal import Decimal
+import decimal
import io
import os
import re
@@ -112,12 +112,12 @@ class ValidatorBase:
"""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)
@@ -256,7 +256,7 @@ class ValidatorBase:
_instantiation_metadata.configuration) and 'multiple_of' in validations:
multiple_of_values = validations['multiple_of']
for multiple_of_value in multiple_of_values:
- if (isinstance(input_values, Decimal) and
+ if (isinstance(input_values, decimal.Decimal) and
not (float(input_values) / multiple_of_value).is_integer()
):
# Note 'multipleOf' will be as good as the floating point arithmetic.
@@ -327,7 +327,7 @@ class ValidatorBase:
cls.__check_tuple_validations(validations, input_values, _instantiation_metadata)
elif isinstance(input_values, frozendict):
cls.__check_dict_validations(validations, input_values, _instantiation_metadata)
- elif isinstance(input_values, Decimal):
+ elif isinstance(input_values, decimal.Decimal):
cls.__check_numeric_validations(validations, input_values, _instantiation_metadata)
try:
return super()._validate_validations_pass(input_values, _instantiation_metadata)
@@ -424,7 +424,7 @@ class EnumMakerInterface(typing.Protocol):
@property
def _enum_value_to_name(
cls
- ) -> typing.Dict[typing.Union[str, Decimal, bool, none_type], str]:
+ ) -> typing.Dict[typing.Union[str, decimal.Decimal, bool, none_type], str]:
pass
@classmethod
@@ -435,13 +435,13 @@ class EnumMakerInterface(typing.Protocol):
pass
-def _SchemaEnumMaker(enum_value_to_name: typing.Dict[typing.Union[str, Decimal, bool, none_type], str]) -> EnumMakerInterface:
+def _SchemaEnumMaker(enum_value_to_name: typing.Dict[typing.Union[str, decimal.Decimal, bool, none_type], str]) -> EnumMakerInterface:
class SchemaEnumMaker(EnumMakerBase):
@classmethod
@property
def _enum_value_to_name(
cls
- ) -> typing.Dict[typing.Union[str, Decimal, bool, none_type], str]:
+ ) -> typing.Dict[typing.Union[str, decimal.Decimal, bool, none_type], str]:
pass
try:
super_enum_value_to_name = super()._enum_value_to_name
@@ -538,6 +538,10 @@ class StrBase:
def as_datetime(self) -> datetime:
raise Exception('not implemented')
+ @property
+ def as_decimal(self) -> decimal.Decimal:
+ raise Exception('not implemented')
+
class CustomIsoparser(isoparser):
@@ -629,6 +633,39 @@ class DateTimeBase:
return super()._validate(*args, _instantiation_metadata=_instantiation_metadata)
+class DecimalBase(StrBase):
+ """
+ A class for storing decimals that are sent over the wire as strings
+ These schemas must remain based on StrBase rather than NumberBase
+ because picking base classes must be deterministic
+ """
+
+ @property
+ @functools.cache
+ def as_decimal(self) -> decimal.Decimal:
+ return decimal.Decimal(self)
+
+ @classmethod
+ def _validate_format(cls, arg: typing.Optional[str], _instantiation_metadata: InstantiationMetadata):
+ if isinstance(arg, str):
+ try:
+ decimal.Decimal(arg)
+ return True
+ except decimal.InvalidOperation:
+ raise ApiValueError(
+ "Value cannot be converted to a decimal. "
+ "Invalid value '{}' for type decimal at {}".format(arg, _instantiation_metadata.path_to_item)
+ )
+
+ @classmethod
+ def _validate(cls, *args, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None):
+ """
+ DecimalBase _validate
+ """
+ cls._validate_format(args[0], _instantiation_metadata=_instantiation_metadata)
+ return super()._validate(*args, _instantiation_metadata=_instantiation_metadata)
+
+
class NumberBase:
@property
def as_int(self) -> int:
@@ -1038,7 +1075,7 @@ class DictBase(Discriminable):
return super().__getattribute__(name)
-inheritable_primitive_types_set = {Decimal, str, tuple, frozendict, FileIO, bytes}
+inheritable_primitive_types_set = {decimal.Decimal, str, tuple, frozendict, FileIO, bytes}
class Schema:
@@ -1145,8 +1182,8 @@ class Schema:
new_cls = get_new_class(cls_name, (cls, BoolBase, BoolClass))
elif base_cls is str:
new_cls = get_new_class(cls_name, (cls, StrBase, str))
- elif base_cls is Decimal:
- new_cls = get_new_class(cls_name, (cls, NumberBase, Decimal))
+ elif base_cls is decimal.Decimal:
+ new_cls = get_new_class(cls_name, (cls, NumberBase, decimal.Decimal))
elif base_cls is tuple:
new_cls = get_new_class(cls_name, (cls, ListBase, tuple))
elif base_cls is frozendict:
@@ -1168,7 +1205,7 @@ class Schema:
- the returned instance is a serializable type (except for None, True, and False) which are enums
Use cases:
- 1. inheritable type: string/Decimal/frozendict/tuple
+ 1. inheritable type: string/decimal.Decimal/frozendict/tuple
2. enum value cases: 'hi', 1 -> no base_class set because the enum includes the base class
3. uninheritable type: True/False/None -> no base_class because the base class is not inheritable
_enum_by_value will handle this use case
@@ -1308,7 +1345,7 @@ class Schema:
return super(Schema, cls).__new__(cls, properties)
"""
str = openapi str, date, and datetime
- Decimal = openapi int and float
+ decimal.Decimal = openapi int and float
FileIO = openapi binary type and the user inputs a file
bytes = openapi binary type and the user inputs bytes
"""
@@ -1323,7 +1360,7 @@ class Schema:
datetime,
int,
float,
- Decimal,
+ decimal.Decimal,
bool,
None,
'Schema',
@@ -1360,13 +1397,13 @@ class Schema:
def __remove_unsets(kwargs):
return {key: val for key, val in kwargs.items() if val is not unset}
- def __new__(cls, *args: typing.Union[dict, frozendict, list, tuple, Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Union[dict, frozendict, list, tuple, Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset]):
+ def __new__(cls, *args: typing.Union[dict, frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Union[dict, frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset]):
"""
Schema __new__
Args:
- args (int/float/Decimal/str/list/tuple/dict/frozendict/bool/None): the value
- kwargs (str, int/float/Decimal/str/list/tuple/dict/frozendict/bool/None): dict values
+ args (int/float/decimal.Decimal/str/list/tuple/dict/frozendict/bool/None): the value
+ kwargs (str, int/float/decimal.Decimal/str/list/tuple/dict/frozendict/bool/None): dict values
_instantiation_metadata: contains the needed from_server, configuration, path_to_item
"""
kwargs = cls.__remove_unsets(kwargs)
@@ -1390,10 +1427,10 @@ class Schema:
def __init__(
self,
*args: typing.Union[
- dict, frozendict, list, tuple, Decimal, float, int, str, date, datetime, bool, None, 'Schema'],
+ dict, frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Union[
- dict, frozendict, list, tuple, Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset
+ dict, frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset
]
):
"""
@@ -1405,7 +1442,7 @@ class Schema:
pass
-def cast_to_allowed_types(arg: typing.Union[str, date, datetime, int, float, None, dict, frozendict, list, tuple, bytes, Schema], from_server=False) -> typing.Union[str, bytes, int, float, None, frozendict, tuple, Schema]:
+def cast_to_allowed_types(arg: typing.Union[str, date, datetime, decimal.Decimal, int, float, None, dict, frozendict, list, tuple, bytes, Schema], from_server=False) -> typing.Union[str, bytes, decimal.Decimal, None, frozendict, tuple, Schema]:
"""
from_server=False date, datetime -> str
int, float -> Decimal
@@ -1422,16 +1459,16 @@ def cast_to_allowed_types(arg: typing.Union[str, date, datetime, int, float, Non
because isinstance(True, int) is True
"""
return arg
- elif isinstance(arg, Decimal):
+ elif isinstance(arg, decimal.Decimal):
return arg
elif isinstance(arg, int):
- return Decimal(arg)
+ return decimal.Decimal(arg)
elif isinstance(arg, float):
- decimal_from_float = Decimal(arg)
+ decimal_from_float = decimal.Decimal(arg)
if decimal_from_float.as_integer_ratio()[1] == 1:
# 9.0 -> Decimal('9.0')
# 3.4028234663852886e+38 -> Decimal('340282346638528859811704183484516925440.0')
- return Decimal(str(decimal_from_float)+'.0')
+ return decimal.Decimal(str(decimal_from_float)+'.0')
return decimal_from_float
elif isinstance(arg, str):
return arg
@@ -1628,7 +1665,7 @@ class ComposedBase(Discriminable):
# DictBase, ListBase, NumberBase, StrBase, BoolBase, NoneBase
class ComposedSchema(
- _SchemaTypeChecker(typing.Union[none_type, str, Decimal, bool, tuple, frozendict]),
+ _SchemaTypeChecker(typing.Union[none_type, str, decimal.Decimal, bool, tuple, frozendict]),
ComposedBase,
DictBase,
ListBase,
@@ -1680,7 +1717,7 @@ class NoneSchema(
class NumberSchema(
- _SchemaTypeChecker(typing.Union[Decimal]),
+ _SchemaTypeChecker(typing.Union[decimal.Decimal]),
NumberBase,
Schema
):
@@ -1690,10 +1727,10 @@ class NumberSchema(
"""
@classmethod
- def _from_openapi_data(cls, arg: typing.Union[int, float, Decimal], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None):
+ def _from_openapi_data(cls, arg: typing.Union[int, float, decimal.Decimal], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None):
return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata)
- def __new__(cls, arg: typing.Union[Decimal, int, float], **kwargs: typing.Union[InstantiationMetadata]):
+ def __new__(cls, arg: typing.Union[decimal.Decimal, int, float], **kwargs: typing.Union[InstantiationMetadata]):
return super().__new__(cls, arg, **kwargs)
@@ -1707,8 +1744,8 @@ class IntBase(NumberBase):
return self._as_int
@classmethod
- def _validate_format(cls, arg: typing.Optional[Decimal], _instantiation_metadata: InstantiationMetadata):
- if isinstance(arg, Decimal):
+ def _validate_format(cls, arg: typing.Optional[decimal.Decimal], _instantiation_metadata: InstantiationMetadata):
+ if isinstance(arg, decimal.Decimal):
exponent = arg.as_tuple().exponent
if exponent != 0:
raise ApiValueError(
@@ -1731,14 +1768,14 @@ class IntSchema(IntBase, NumberSchema):
def _from_openapi_data(cls, arg: int, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None):
return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata)
- def __new__(cls, arg: typing.Union[Decimal, int], **kwargs: typing.Union[InstantiationMetadata]):
+ def __new__(cls, arg: typing.Union[decimal.Decimal, int], **kwargs: typing.Union[InstantiationMetadata]):
return super().__new__(cls, arg, **kwargs)
class Int32Schema(
_SchemaValidator(
- inclusive_minimum=Decimal(-2147483648),
- inclusive_maximum=Decimal(2147483647)
+ inclusive_minimum=decimal.Decimal(-2147483648),
+ inclusive_maximum=decimal.Decimal(2147483647)
),
IntSchema
):
@@ -1746,8 +1783,8 @@ class Int32Schema(
class Int64Schema(
_SchemaValidator(
- inclusive_minimum=Decimal(-9223372036854775808),
- inclusive_maximum=Decimal(9223372036854775807)
+ inclusive_minimum=decimal.Decimal(-9223372036854775808),
+ inclusive_maximum=decimal.Decimal(9223372036854775807)
),
IntSchema
):
@@ -1756,28 +1793,28 @@ class Int64Schema(
class Float32Schema(
_SchemaValidator(
- inclusive_minimum=Decimal(-3.4028234663852886e+38),
- inclusive_maximum=Decimal(3.4028234663852886e+38)
+ inclusive_minimum=decimal.Decimal(-3.4028234663852886e+38),
+ inclusive_maximum=decimal.Decimal(3.4028234663852886e+38)
),
NumberSchema
):
@classmethod
- def _from_openapi_data(cls, arg: typing.Union[float, Decimal], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None):
+ def _from_openapi_data(cls, arg: typing.Union[float, decimal.Decimal], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None):
# todo check format
return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata)
class Float64Schema(
_SchemaValidator(
- inclusive_minimum=Decimal(-1.7976931348623157E+308),
- inclusive_maximum=Decimal(1.7976931348623157E+308)
+ inclusive_minimum=decimal.Decimal(-1.7976931348623157E+308),
+ inclusive_maximum=decimal.Decimal(1.7976931348623157E+308)
),
NumberSchema
):
@classmethod
- def _from_openapi_data(cls, arg: typing.Union[float, Decimal], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None):
+ def _from_openapi_data(cls, arg: typing.Union[float, decimal.Decimal], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None):
# todo check format
return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata)
@@ -1814,6 +1851,20 @@ class DateTimeSchema(DateTimeBase, StrSchema):
return super().__new__(cls, arg, **kwargs)
+class DecimalSchema(DecimalBase, StrSchema):
+
+ def __new__(cls, arg: typing.Union[str], **kwargs: typing.Union[InstantiationMetadata]):
+ """
+ Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads
+ which can be simple (str) or complex (dicts or lists with nested values)
+ Because casting is only done once and recursively casts all values prior to validation then for a potential
+ client side Decimal input if Decimal was accepted as an input in DecimalSchema then one would not know
+ if one was using it for a StrSchema (where it should be cast to str) or one is using it for NumberSchema
+ where it should stay as Decimal.
+ """
+ return super().__new__(cls, arg, **kwargs)
+
+
class BytesSchema(
_SchemaTypeChecker(typing.Union[bytes]),
Schema,
@@ -1901,7 +1952,7 @@ class BoolSchema(
class AnyTypeSchema(
_SchemaTypeChecker(
- typing.Union[frozendict, tuple, Decimal, str, bool, none_type, bytes, FileIO]
+ typing.Union[frozendict, tuple, decimal.Decimal, str, bool, none_type, bytes, FileIO]
),
DictBase,
ListBase,
@@ -1924,7 +1975,7 @@ class DictSchema(
def _from_openapi_data(cls, arg: typing.Dict[str, typing.Any], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None):
return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata)
- def __new__(cls, *args: typing.Union[dict, frozendict], **kwargs: typing.Union[dict, frozendict, list, tuple, Decimal, float, int, str, date, datetime, bool, None, bytes, Schema, Unset, InstantiationMetadata]):
+ def __new__(cls, *args: typing.Union[dict, frozendict], **kwargs: typing.Union[dict, frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, bytes, Schema, Unset, InstantiationMetadata]):
return super().__new__(cls, *args, **kwargs)
diff --git a/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml b/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
index f149e72a898d..7fcdb42c7b39 100644
--- a/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
+++ b/modules/openapi-generator/src/test/resources/3_0/python-experimental/petstore-with-fake-endpoints-models-for-testing-with-http-signature.yaml
@@ -2653,3 +2653,32 @@ components:
type: 'null'
allOf:
- {}
+ Currency:
+ type: string
+ enum:
+ - eur
+ - usd
+ Money:
+ type: object
+ properties:
+ amount:
+ type: string
+ format: number
+ currency:
+ $ref: '#/components/schemas/Currency'
+ required:
+ - amount
+ - currency
+ DecimalPayload:
+ type: string
+ format: number
+ ObjectWithDecimalProperties:
+ type: object
+ properties:
+ length:
+ $ref: '#/components/schemas/DecimalPayload'
+ width:
+ type: string
+ format: number
+ cost:
+ $ref: '#/components/schemas/Money'
\ No newline at end of file
diff --git a/samples/openapi3/client/petstore/python-experimental/.openapi-generator/FILES b/samples/openapi3/client/petstore/python-experimental/.openapi-generator/FILES
index ad8d63e86a68..fdc3984d899e 100644
--- a/samples/openapi3/client/petstore/python-experimental/.openapi-generator/FILES
+++ b/samples/openapi3/client/petstore/python-experimental/.openapi-generator/FILES
@@ -41,10 +41,12 @@ docs/ComposedNumber.md
docs/ComposedObject.md
docs/ComposedOneOfDifferentTypes.md
docs/ComposedString.md
+docs/Currency.md
docs/DanishPig.md
docs/DateTimeTest.md
docs/DateTimeWithValidations.md
docs/DateWithValidations.md
+docs/DecimalPayload.md
docs/DefaultApi.md
docs/Dog.md
docs/DogAllOf.md
@@ -80,6 +82,7 @@ docs/MapTest.md
docs/MixedPropertiesAndAdditionalPropertiesClass.md
docs/Model200Response.md
docs/ModelReturn.md
+docs/Money.md
docs/Name.md
docs/NoAdditionalProperties.md
docs/NullableClass.md
@@ -90,6 +93,7 @@ docs/NumberOnly.md
docs/NumberWithValidations.md
docs/ObjectInterface.md
docs/ObjectModelWithRefProps.md
+docs/ObjectWithDecimalProperties.md
docs/ObjectWithDifficultlyNamedProps.md
docs/ObjectWithValidations.md
docs/Order.md
@@ -175,10 +179,12 @@ petstore_api/model/composed_number.py
petstore_api/model/composed_object.py
petstore_api/model/composed_one_of_different_types.py
petstore_api/model/composed_string.py
+petstore_api/model/currency.py
petstore_api/model/danish_pig.py
petstore_api/model/date_time_test.py
petstore_api/model/date_time_with_validations.py
petstore_api/model/date_with_validations.py
+petstore_api/model/decimal_payload.py
petstore_api/model/dog.py
petstore_api/model/dog_all_of.py
petstore_api/model/drawing.py
@@ -211,6 +217,7 @@ 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/money.py
petstore_api/model/name.py
petstore_api/model/no_additional_properties.py
petstore_api/model/nullable_class.py
@@ -221,6 +228,7 @@ petstore_api/model/number_only.py
petstore_api/model/number_with_validations.py
petstore_api/model/object_interface.py
petstore_api/model/object_model_with_ref_props.py
+petstore_api/model/object_with_decimal_properties.py
petstore_api/model/object_with_difficultly_named_props.py
petstore_api/model/object_with_validations.py
petstore_api/model/order.py
diff --git a/samples/openapi3/client/petstore/python-experimental/README.md b/samples/openapi3/client/petstore/python-experimental/README.md
index 98ccaf5dbbc9..a849a36ae20c 100644
--- a/samples/openapi3/client/petstore/python-experimental/README.md
+++ b/samples/openapi3/client/petstore/python-experimental/README.md
@@ -172,10 +172,12 @@ Class | Method | HTTP request | Description
- [ComposedObject](docs/ComposedObject.md)
- [ComposedOneOfDifferentTypes](docs/ComposedOneOfDifferentTypes.md)
- [ComposedString](docs/ComposedString.md)
+ - [Currency](docs/Currency.md)
- [DanishPig](docs/DanishPig.md)
- [DateTimeTest](docs/DateTimeTest.md)
- [DateTimeWithValidations](docs/DateTimeWithValidations.md)
- [DateWithValidations](docs/DateWithValidations.md)
+ - [DecimalPayload](docs/DecimalPayload.md)
- [Dog](docs/Dog.md)
- [DogAllOf](docs/DogAllOf.md)
- [Drawing](docs/Drawing.md)
@@ -208,6 +210,7 @@ Class | Method | HTTP request | Description
- [MixedPropertiesAndAdditionalPropertiesClass](docs/MixedPropertiesAndAdditionalPropertiesClass.md)
- [Model200Response](docs/Model200Response.md)
- [ModelReturn](docs/ModelReturn.md)
+ - [Money](docs/Money.md)
- [Name](docs/Name.md)
- [NoAdditionalProperties](docs/NoAdditionalProperties.md)
- [NullableClass](docs/NullableClass.md)
@@ -218,6 +221,7 @@ Class | Method | HTTP request | Description
- [NumberWithValidations](docs/NumberWithValidations.md)
- [ObjectInterface](docs/ObjectInterface.md)
- [ObjectModelWithRefProps](docs/ObjectModelWithRefProps.md)
+ - [ObjectWithDecimalProperties](docs/ObjectWithDecimalProperties.md)
- [ObjectWithDifficultlyNamedProps](docs/ObjectWithDifficultlyNamedProps.md)
- [ObjectWithValidations](docs/ObjectWithValidations.md)
- [Order](docs/Order.md)
diff --git a/samples/openapi3/client/petstore/python-experimental/docs/Currency.md b/samples/openapi3/client/petstore/python-experimental/docs/Currency.md
new file mode 100644
index 000000000000..9811a54c6e52
--- /dev/null
+++ b/samples/openapi3/client/petstore/python-experimental/docs/Currency.md
@@ -0,0 +1,8 @@
+# Currency
+
+Type | Description | Notes
+------------- | ------------- | -------------
+**str** | | must be one of ["eur", "usd", ]
+
+[[Back to Model list]](../README.md#documentation-for-models) [[Back to API list]](../README.md#documentation-for-api-endpoints) [[Back to README]](../README.md)
+
diff --git a/samples/openapi3/client/petstore/python-experimental/docs/DecimalPayload.md b/samples/openapi3/client/petstore/python-experimental/docs/DecimalPayload.md
new file mode 100644
index 000000000000..2e0821dd053a
--- /dev/null
+++ b/samples/openapi3/client/petstore/python-experimental/docs/DecimalPayload.md
@@ -0,0 +1,8 @@
+# DecimalPayload
+
+Type | Description | Notes
+------------- | ------------- | -------------
+**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/openapi3/client/petstore/python-experimental/docs/Money.md b/samples/openapi3/client/petstore/python-experimental/docs/Money.md
new file mode 100644
index 000000000000..5deec5712ae0
--- /dev/null
+++ b/samples/openapi3/client/petstore/python-experimental/docs/Money.md
@@ -0,0 +1,11 @@
+# Money
+
+#### Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**amount** | **str** | |
+**currency** | [**Currency**](Currency.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-experimental/docs/ObjectWithDecimalProperties.md b/samples/openapi3/client/petstore/python-experimental/docs/ObjectWithDecimalProperties.md
new file mode 100644
index 000000000000..10bd9061c0d5
--- /dev/null
+++ b/samples/openapi3/client/petstore/python-experimental/docs/ObjectWithDecimalProperties.md
@@ -0,0 +1,12 @@
+# ObjectWithDecimalProperties
+
+#### Properties
+Name | Type | Description | Notes
+------------ | ------------- | ------------- | -------------
+**length** | **str** | | [optional]
+**width** | **str** | | [optional]
+**cost** | [**Money**](Money.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-experimental/petstore_api/api/another_fake_api_endpoints/call_123_test_special_tags.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/another_fake_api_endpoints/call_123_test_special_tags.py
index b97333110467..eef7420a019a 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/another_fake_api_endpoints/call_123_test_special_tags.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/another_fake_api_endpoints/call_123_test_special_tags.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api_endpoints/foo_get.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api_endpoints/foo_get.py
index b704f12197a0..c1a9e4213e08 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api_endpoints/foo_get.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/default_api_endpoints/foo_get.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/additional_properties_with_array_of_enums.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/additional_properties_with_array_of_enums.py
index f0d07f512051..1958cd47e5fb 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/additional_properties_with_array_of_enums.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/additional_properties_with_array_of_enums.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_model.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_model.py
index 9c44cbce5077..466bb6bdeac1 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_model.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_model.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_of_enums.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_of_enums.py
index 83af2ce00ca8..30eb23e2260d 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_of_enums.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/array_of_enums.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_file_schema.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_file_schema.py
index c46e584ab427..7d10197e7b97 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_file_schema.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_file_schema.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_query_params.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_query_params.py
index a99f338d61b7..185f737fd612 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_query_params.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/body_with_query_params.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/boolean.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/boolean.py
index 49566ef541d6..27c385cf6d8c 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/boolean.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/boolean.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/case_sensitive_params.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/case_sensitive_params.py
index ac4d37279ebf..8d33047b77b3 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/case_sensitive_params.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/case_sensitive_params.py
@@ -13,7 +13,7 @@ import typing
import urllib3
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -31,6 +31,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/client_model.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/client_model.py
index d1812acdfb65..32c09a60148a 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/client_model.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/client_model.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/composed_one_of_different_types.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/composed_one_of_different_types.py
index 7f3ecf420450..f18f635fbcba 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/composed_one_of_different_types.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/composed_one_of_different_types.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/endpoint_parameters.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/endpoint_parameters.py
index 63faaf2db9a6..5898d0608a23 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/endpoint_parameters.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/endpoint_parameters.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -172,7 +173,7 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded(
callback: typing.Union[callback, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'SchemaForRequestBodyApplicationXWwwFormUrlencoded':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/enum_parameters.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/enum_parameters.py
index 7d8e080429d0..9a0375a83d93 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/enum_parameters.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/enum_parameters.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -348,7 +349,7 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded(
enum_form_string: typing.Union[enum_form_string, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'SchemaForRequestBodyApplicationXWwwFormUrlencoded':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/fake_health_get.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/fake_health_get.py
index 831241cba68d..321959bf07e0 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/fake_health_get.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/fake_health_get.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/group_parameters.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/group_parameters.py
index dc590cb91372..77bce3d6270a 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/group_parameters.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/group_parameters.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_additional_properties.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_additional_properties.py
index 0acc3f4491e1..3dcf988a1b7f 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_additional_properties.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/inline_additional_properties.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -70,7 +71,7 @@ class SchemaForRequestBodyApplicationJson(
*args: typing.Union[dict, frozendict, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'SchemaForRequestBodyApplicationJson':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_form_data.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_form_data.py
index 591f9417e3b5..917d5c7b7d73 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_form_data.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/json_form_data.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -73,7 +74,7 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded(
*args: typing.Union[dict, frozendict, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'SchemaForRequestBodyApplicationXWwwFormUrlencoded':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/mammal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/mammal.py
index 4b402d4e9614..40880fd1b09c 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/mammal.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/mammal.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/number_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/number_with_validations.py
index ac82ec1bca53..e24811186515 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/number_with_validations.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/number_with_validations.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_model_with_ref_props.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_model_with_ref_props.py
index aaa919ec758e..6e72d45b78db 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_model_with_ref_props.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/object_model_with_ref_props.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/parameter_collisions.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/parameter_collisions.py
index c355d0e1183c..4ec604dd98c8 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/parameter_collisions.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/parameter_collisions.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/query_parameter_collection_format.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/query_parameter_collection_format.py
index 14076fea22ba..8fd0b87cf6ca 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/query_parameter_collection_format.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/query_parameter_collection_format.py
@@ -13,7 +13,7 @@ import typing
import urllib3
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -31,6 +31,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string.py
index 000d30c64ef1..f1dda7d9754b 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string_enum.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string_enum.py
index 51c9bd862e86..21d92e829df2 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string_enum.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/string_enum.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_download_file.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_download_file.py
index 87fa4f8dbcc7..73f707e268bf 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_download_file.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_download_file.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_file.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_file.py
index 8fbdf9bbdb89..f39892210cbc 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_file.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_file.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -76,7 +77,7 @@ class SchemaForRequestBodyMultipartFormData(
additionalMetadata: typing.Union[additionalMetadata, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'SchemaForRequestBodyMultipartFormData':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_files.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_files.py
index 19c7745793ae..6be2c17a026c 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_files.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_api_endpoints/upload_files.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -78,7 +79,7 @@ class SchemaForRequestBodyMultipartFormData(
files: typing.Union[files, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'SchemaForRequestBodyMultipartFormData':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags_123_api_endpoints/classname.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags_123_api_endpoints/classname.py
index d8157f7f4cfd..1ccf89e848c3 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags_123_api_endpoints/classname.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/fake_classname_tags_123_api_endpoints/classname.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/add_pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/add_pet.py
index 7f04e4cc3c8d..802803633582 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/add_pet.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/add_pet.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/delete_pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/delete_pet.py
index de6d86ed2128..afb30b580480 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/delete_pet.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/delete_pet.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_status.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_status.py
index d6b31e361f56..ac4b7f3ad8c2 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_status.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_status.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_tags.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_tags.py
index a4c39c6ae347..5496b92cd55e 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_tags.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/find_pets_by_tags.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/get_pet_by_id.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/get_pet_by_id.py
index 533b2ae23cfa..549fd2aa6fc2 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/get_pet_by_id.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/get_pet_by_id.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet.py
index 71bdf386bc91..fa1b5a1bb966 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet_with_form.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet_with_form.py
index 6535b584ac8e..798b70c896a9 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet_with_form.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/update_pet_with_form.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -99,7 +100,7 @@ class SchemaForRequestBodyApplicationXWwwFormUrlencoded(
status: typing.Union[status, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'SchemaForRequestBodyApplicationXWwwFormUrlencoded':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_file_with_required_file.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_file_with_required_file.py
index 214bf7a41b2e..c137418e02d8 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_file_with_required_file.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_file_with_required_file.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -102,7 +103,7 @@ class SchemaForRequestBodyMultipartFormData(
additionalMetadata: typing.Union[additionalMetadata, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'SchemaForRequestBodyMultipartFormData':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_image.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_image.py
index d4f494e25be9..10c595a21abd 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_image.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/pet_api_endpoints/upload_image.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -100,7 +101,7 @@ class SchemaForRequestBodyMultipartFormData(
additionalMetadata: typing.Union[additionalMetadata, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'SchemaForRequestBodyMultipartFormData':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/delete_order.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/delete_order.py
index 9dbbf03607f9..1c4269d277bf 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/delete_order.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/delete_order.py
@@ -13,7 +13,7 @@ import typing
import urllib3
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -31,6 +31,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_inventory.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_inventory.py
index e5e5aca7eb05..9daf61b0c088 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_inventory.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_inventory.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -74,7 +75,7 @@ class SchemaFor200ResponseBodyApplicationJson(
*args: typing.Union[dict, frozendict, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'SchemaFor200ResponseBodyApplicationJson':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_order_by_id.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_order_by_id.py
index 11f819f27b32..99f9ecbb28f1 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_order_by_id.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/get_order_by_id.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/place_order.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/place_order.py
index ef9f9c3ba631..ba961a9921ed 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/place_order.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/store_api_endpoints/place_order.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_user.py
index 8627997a2fb5..7cc7494687db 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_user.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_user.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_array_input.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_array_input.py
index 8694e9582ffd..d3ae4f85df7c 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_array_input.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_array_input.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_list_input.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_list_input.py
index d1c0a1e0e875..81553c66598f 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_list_input.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/create_users_with_list_input.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/delete_user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/delete_user.py
index 1d3b65308201..f337efa34803 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/delete_user.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/delete_user.py
@@ -13,7 +13,7 @@ import typing
import urllib3
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -31,6 +31,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/get_user_by_name.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/get_user_by_name.py
index 2a2af60d64bd..fa01a3901198 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/get_user_by_name.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/get_user_by_name.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/login_user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/login_user.py
index c63a4e482d14..47447322ff0d 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/login_user.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/login_user.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/logout_user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/logout_user.py
index 1e6f9443fcec..99bcba58663f 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/logout_user.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/logout_user.py
@@ -13,7 +13,7 @@ import typing
import urllib3
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -31,6 +31,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/update_user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/update_user.py
index fcd3f6dcde43..472d3354b84e 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/update_user.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api/user_api_endpoints/update_user.py
@@ -14,7 +14,7 @@ import urllib3
from urllib3._collections import HTTPHeaderDict
from petstore_api import api_client, exceptions
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -32,6 +32,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/api_client.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/api_client.py
index 38220b88f5dc..adad78a8e847 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/api_client.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/api_client.py
@@ -29,7 +29,6 @@ from petstore_api import rest
from petstore_api.configuration import Configuration
from petstore_api.exceptions import ApiTypeError, ApiValueError
from petstore_api.schemas import (
- Decimal,
NoneClass,
BoolClass,
Schema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_class.py
index a9dbd2396f09..8301d14cf869 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_class.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_class.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -79,7 +80,7 @@ class AdditionalPropertiesClass(
*args: typing.Union[dict, frozendict, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'map_property':
return super().__new__(
cls,
*args,
@@ -104,7 +105,7 @@ class AdditionalPropertiesClass(
*args: typing.Union[dict, frozendict, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> '_additional_properties':
return super().__new__(
cls,
*args,
@@ -118,7 +119,7 @@ class AdditionalPropertiesClass(
*args: typing.Union[dict, frozendict, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'map_of_map_property':
return super().__new__(
cls,
*args,
@@ -141,7 +142,7 @@ class AdditionalPropertiesClass(
cls,
*args: typing.Union[dict, frozendict, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
- ):
+ ) -> 'empty_map':
return super().__new__(
cls,
*args,
@@ -160,7 +161,7 @@ class AdditionalPropertiesClass(
*args: typing.Union[dict, frozendict, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'map_with_undeclared_properties_string':
return super().__new__(
cls,
*args,
@@ -182,7 +183,7 @@ class AdditionalPropertiesClass(
map_with_undeclared_properties_string: typing.Union[map_with_undeclared_properties_string, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'AdditionalPropertiesClass':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_with_array_of_enums.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_with_array_of_enums.py
index e6b66637e225..90d612a857aa 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_with_array_of_enums.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/additional_properties_with_array_of_enums.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -83,7 +84,7 @@ class AdditionalPropertiesWithArrayOfEnums(
*args: typing.Union[dict, frozendict, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'AdditionalPropertiesWithArrayOfEnums':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/address.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/address.py
index 255e88d8f05b..95e55511dca4 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/address.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/address.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -74,7 +75,7 @@ class Address(
*args: typing.Union[dict, frozendict, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'Address':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py
index c5a1a74ddfe4..f0dc6441d3e2 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -90,7 +91,7 @@ class Animal(
color: typing.Union[color, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'Animal':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal_farm.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal_farm.py
index 4a2b3dca68af..2bb3d0259c81 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal_farm.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/animal_farm.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/api_response.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/api_response.py
index b282cdccb5d7..41f336ea8bcf 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/api_response.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/api_response.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -79,7 +80,7 @@ class ApiResponse(
message: typing.Union[message, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'ApiResponse':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple.py
index eef32e7fc2c0..05b8485a74d9 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -104,7 +105,7 @@ class Apple(
origin: typing.Union[origin, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'Apple':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple_req.py
index 907e5332a513..df315c8bf1c4 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple_req.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/apple_req.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -80,7 +81,7 @@ class AppleReq(
cultivar: cultivar,
mealy: typing.Union[mealy, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
- ):
+ ) -> 'AppleReq':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_holding_any_type.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_holding_any_type.py
index a87a3963bf07..51e9aeeb603c 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_holding_any_type.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_holding_any_type.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_array_of_number_only.py
index 0441017cce22..06912cc2194c 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_array_of_number_only.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_array_of_number_only.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -85,7 +86,7 @@ class ArrayOfArrayOfNumberOnly(
ArrayArrayNumber: typing.Union[ArrayArrayNumber, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'ArrayOfArrayOfNumberOnly':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_enums.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_enums.py
index 84a16a901f48..19af3dc1e9fd 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_enums.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_enums.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_number_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_number_only.py
index befe0446d4a4..c2d568e4b808 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_number_only.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_of_number_only.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -80,7 +81,7 @@ class ArrayOfNumberOnly(
ArrayNumber: typing.Union[ArrayNumber, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'ArrayOfNumberOnly':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_test.py
index 9d5ed1fe8f1c..00d72319a69d 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_test.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_test.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -108,7 +109,7 @@ class ArrayTest(
array_array_of_model: typing.Union[array_array_of_model, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'ArrayTest':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_with_validations_in_items.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_with_validations_in_items.py
index 0d8bd1f5f595..07b32f95f673 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_with_validations_in_items.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/array_with_validations_in_items.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana.py
index 2b745add0af0..4cb4561abe22 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -78,7 +79,7 @@ class Banana(
lengthCm: lengthCm,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'Banana':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana_req.py
index 938ad1c8da9d..b7012234a08f 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana_req.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/banana_req.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -80,7 +81,7 @@ class BananaReq(
lengthCm: lengthCm,
sweet: typing.Union[sweet, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
- ):
+ ) -> 'BananaReq':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/bar.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/bar.py
index afbf24b8a222..61b13533570b 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/bar.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/bar.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/basque_pig.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/basque_pig.py
index 5470dcaa409f..f1e74bf1e463 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/basque_pig.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/basque_pig.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -92,7 +93,7 @@ class BasquePig(
className: className,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'BasquePig':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean.py
index e9f974616fcb..3f35ab6a6535 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean_enum.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean_enum.py
index 26b0d6fb5d8a..cf75f7c9445b 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean_enum.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/boolean_enum.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/capitalization.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/capitalization.py
index daef598fe3a6..e5987dc95595 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/capitalization.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/capitalization.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -85,7 +86,7 @@ class Capitalization(
ATT_NAME: typing.Union[ATT_NAME, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'Capitalization':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat.py
index 7ac8563f7784..e0f0b0f20535 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -90,10 +91,10 @@ class Cat(
def __new__(
cls,
- *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes],
+ *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'Cat':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat_all_of.py
index ec36b96f9f8f..82c20ec0769e 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat_all_of.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/cat_all_of.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -75,7 +76,7 @@ class CatAllOf(
declawed: typing.Union[declawed, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'CatAllOf':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py
index a3b9e2134d7b..9f92d2b3a38f 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/category.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -80,7 +81,7 @@ class Category(
id: typing.Union[id, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'Category':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat.py
index d165c485a8f7..114bd2832d23 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -90,10 +91,10 @@ class ChildCat(
def __new__(
cls,
- *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes],
+ *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'ChildCat':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat_all_of.py
index 108a5620181c..791f3793cb54 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat_all_of.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/child_cat_all_of.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -75,7 +76,7 @@ class ChildCatAllOf(
name: typing.Union[name, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'ChildCatAllOf':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/class_model.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/class_model.py
index 432b40a385d2..37c5b23285bb 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/class_model.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/class_model.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -72,11 +73,11 @@ class ClassModel(
def __new__(
cls,
- *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes],
+ *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes],
_class: typing.Union[_class, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'ClassModel':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/client.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/client.py
index 372f5b8fe04e..bc4ff7ffab38 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/client.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/client.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -75,7 +76,7 @@ class Client(
client: typing.Union[client, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'Client':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral.py
index ef414f33d685..422ae90d3b8b 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -90,10 +91,10 @@ class ComplexQuadrilateral(
def __new__(
cls,
- *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes],
+ *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'ComplexQuadrilateral':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral_all_of.py
index 128d50c3f037..d24b43d5ed68 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral_all_of.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/complex_quadrilateral_all_of.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -89,7 +90,7 @@ class ComplexQuadrilateralAllOf(
quadrilateralType: typing.Union[quadrilateralType, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'ComplexQuadrilateralAllOf':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_any_of_different_types_no_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_any_of_different_types_no_validations.py
index 67f71c767826..97f75c86ddac 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_any_of_different_types_no_validations.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_any_of_different_types_no_validations.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -125,10 +126,10 @@ class ComposedAnyOfDifferentTypesNoValidations(
def __new__(
cls,
- *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes],
+ *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'ComposedAnyOfDifferentTypesNoValidations':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_array.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_array.py
index 197dc534477f..8b20d7f09415 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_array.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_array.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_bool.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_bool.py
index 57d1a5862ee4..5aa09239e140 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_bool.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_bool.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -93,7 +94,7 @@ class ComposedBool(
cls,
*args: typing.Union[bool, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
- ):
+ ) -> 'ComposedBool':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_none.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_none.py
index 7ba7de5a523d..534e1ce01ca2 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_none.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_none.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -93,7 +94,7 @@ class ComposedNone(
cls,
*args: typing.Union[None, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
- ):
+ ) -> 'ComposedNone':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_number.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_number.py
index f6725565fc8d..c4e879ae995b 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_number.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_number.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -93,7 +94,7 @@ class ComposedNumber(
cls,
*args: typing.Union[float, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
- ):
+ ) -> 'ComposedNumber':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_object.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_object.py
index 64435b685709..f7ba1546f97f 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_object.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_object.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -94,7 +95,7 @@ class ComposedObject(
*args: typing.Union[dict, frozendict, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'ComposedObject':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_one_of_different_types.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_one_of_different_types.py
index 9f42e28f2fa8..0adf69e676ec 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_one_of_different_types.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_one_of_different_types.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -97,7 +98,7 @@ class ComposedOneOfDifferentTypes(
*args: typing.Union[dict, frozendict, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'oneOf_4':
return super().__new__(
cls,
*args,
@@ -143,10 +144,10 @@ class ComposedOneOfDifferentTypes(
def __new__(
cls,
- *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes],
+ *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'ComposedOneOfDifferentTypes':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_string.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_string.py
index 75a01e3dee82..6efeb9a7872f 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_string.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/composed_string.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -93,7 +94,7 @@ class ComposedString(
cls,
*args: typing.Union[str, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
- ):
+ ) -> 'ComposedString':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/currency.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/currency.py
new file mode 100644
index 000000000000..1fd715f3f145
--- /dev/null
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/currency.py
@@ -0,0 +1,85 @@
+# 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 re # noqa: F401
+import sys # noqa: F401
+import typing # noqa: F401
+
+from frozendict import frozendict # noqa: F401
+
+import decimal # noqa: F401
+from datetime import date, datetime # noqa: F401
+from frozendict import frozendict # noqa: F401
+
+from petstore_api.schemas import ( # noqa: F401
+ AnyTypeSchema,
+ ComposedSchema,
+ DictSchema,
+ ListSchema,
+ StrSchema,
+ IntSchema,
+ Int32Schema,
+ Int64Schema,
+ Float32Schema,
+ Float64Schema,
+ NumberSchema,
+ DateSchema,
+ DateTimeSchema,
+ DecimalSchema,
+ BoolSchema,
+ BinarySchema,
+ NoneSchema,
+ none_type,
+ InstantiationMetadata,
+ Unset,
+ unset,
+ ComposedBase,
+ ListBase,
+ DictBase,
+ NoneBase,
+ StrBase,
+ IntBase,
+ NumberBase,
+ DateBase,
+ DateTimeBase,
+ BoolBase,
+ BinaryBase,
+ Schema,
+ _SchemaValidator,
+ _SchemaTypeChecker,
+ _SchemaEnumMaker
+)
+
+
+class Currency(
+ _SchemaEnumMaker(
+ enum_value_to_name={
+ "eur": "EUR",
+ "usd": "USD",
+ }
+ ),
+ StrSchema
+):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+
+ @classmethod
+ @property
+ def EUR(cls):
+ return cls._enum_by_value["eur"]("eur")
+
+ @classmethod
+ @property
+ def USD(cls):
+ return cls._enum_by_value["usd"]("usd")
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/danish_pig.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/danish_pig.py
index 559aefad1dcb..af29f5c9e7ab 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/danish_pig.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/danish_pig.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -92,7 +93,7 @@ class DanishPig(
className: className,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'DanishPig':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_test.py
index 837edc52f030..8b05311d14d4 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_test.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_test.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_with_validations.py
index 800e2d5fa1d8..c4365f56e89c 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_with_validations.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_time_with_validations.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_with_validations.py
index 5c2886e4968e..364759f48e23 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_with_validations.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/date_with_validations.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/decimal_payload.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/decimal_payload.py
new file mode 100644
index 000000000000..99f1f2e47350
--- /dev/null
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/decimal_payload.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
+"""
+
+import re # noqa: F401
+import sys # noqa: F401
+import typing # noqa: F401
+
+from frozendict import frozendict # noqa: F401
+
+import decimal # noqa: F401
+from datetime import date, datetime # noqa: F401
+from frozendict import frozendict # noqa: F401
+
+from petstore_api.schemas import ( # noqa: F401
+ AnyTypeSchema,
+ ComposedSchema,
+ DictSchema,
+ ListSchema,
+ StrSchema,
+ IntSchema,
+ Int32Schema,
+ Int64Schema,
+ Float32Schema,
+ Float64Schema,
+ NumberSchema,
+ DateSchema,
+ DateTimeSchema,
+ DecimalSchema,
+ BoolSchema,
+ BinarySchema,
+ NoneSchema,
+ none_type,
+ InstantiationMetadata,
+ Unset,
+ unset,
+ ComposedBase,
+ ListBase,
+ DictBase,
+ NoneBase,
+ StrBase,
+ IntBase,
+ NumberBase,
+ DateBase,
+ DateTimeBase,
+ BoolBase,
+ BinaryBase,
+ Schema,
+ _SchemaValidator,
+ _SchemaTypeChecker,
+ _SchemaEnumMaker
+)
+DecimalPayload = DecimalSchema
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog.py
index 2556f7bab696..de0f9c174f33 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -90,10 +91,10 @@ class Dog(
def __new__(
cls,
- *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes],
+ *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'Dog':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog_all_of.py
index fac002ead0c3..b527aedf20b9 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog_all_of.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/dog_all_of.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -75,7 +76,7 @@ class DogAllOf(
breed: typing.Union[breed, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'DogAllOf':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/drawing.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/drawing.py
index fa243f3bdf16..d61f6b07be1e 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/drawing.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/drawing.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -107,7 +108,7 @@ class Drawing(
shapes: typing.Union[shapes, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'Drawing':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_arrays.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_arrays.py
index c5adca615689..a3fb56284bdb 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_arrays.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_arrays.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -122,7 +123,7 @@ class EnumArrays(
array_enum: typing.Union[array_enum, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'EnumArrays':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_class.py
index 371b78350623..45a9a512fc0e 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_class.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_class.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_test.py
index 6c0dd1eb4f95..7204328fc893 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_test.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/enum_test.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -206,7 +207,7 @@ class EnumTest(
IntegerEnumOneValue: typing.Union['IntegerEnumOneValue', Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'EnumTest':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle.py
index 75d6046477f8..9c433255529a 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -90,10 +91,10 @@ class EquilateralTriangle(
def __new__(
cls,
- *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes],
+ *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'EquilateralTriangle':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle_all_of.py
index a6a6e6a494d5..1e23482bd9c9 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle_all_of.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/equilateral_triangle_all_of.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -89,7 +90,7 @@ class EquilateralTriangleAllOf(
triangleType: typing.Union[triangleType, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'EquilateralTriangleAllOf':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file.py
index a93066658539..3bb58da70670 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -77,7 +78,7 @@ class File(
sourceURI: typing.Union[sourceURI, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'File':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file_schema_test_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file_schema_test_class.py
index 632b4be2e003..f55669e69938 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file_schema_test_class.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/file_schema_test_class.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -90,7 +91,7 @@ class FileSchemaTestClass(
files: typing.Union[files, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'FileSchemaTestClass':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/foo.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/foo.py
index 8ad604af2b68..47357f615881 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/foo.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/foo.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -75,7 +76,7 @@ class Foo(
bar: typing.Union[bar, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'Foo':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/format_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/format_test.py
index e86ab8fc5da5..4560f080ddde 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/format_test.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/format_test.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -222,7 +223,7 @@ class FormatTest(
noneProp: typing.Union[noneProp, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'FormatTest':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit.py
index c4d04e6f6fa4..3fba42202fe8 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -91,11 +92,11 @@ class Fruit(
def __new__(
cls,
- *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes],
+ *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes],
color: typing.Union[color, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'Fruit':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit_req.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit_req.py
index 5170901cec31..74414d77adde 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit_req.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/fruit_req.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -92,10 +93,10 @@ class FruitReq(
def __new__(
cls,
- *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes],
+ *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'FruitReq':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/gm_fruit.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/gm_fruit.py
index 45a96f3718ec..59d81989169a 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/gm_fruit.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/gm_fruit.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -91,11 +92,11 @@ class GmFruit(
def __new__(
cls,
- *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes],
+ *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes],
color: typing.Union[color, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'GmFruit':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/grandparent_animal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/grandparent_animal.py
index fce1e5b8a454..47e282a63e8b 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/grandparent_animal.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/grandparent_animal.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -88,7 +89,7 @@ class GrandparentAnimal(
pet_type: pet_type,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'GrandparentAnimal':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/has_only_read_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/has_only_read_only.py
index 35a721090940..a0a1f019d819 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/has_only_read_only.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/has_only_read_only.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -77,7 +78,7 @@ class HasOnlyReadOnly(
foo: typing.Union[foo, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'HasOnlyReadOnly':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/health_check_result.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/health_check_result.py
index db0e35866717..3ea543b00046 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/health_check_result.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/health_check_result.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -81,7 +82,7 @@ class HealthCheckResult(
cls,
*args: typing.Union[str, None, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
- ):
+ ) -> 'NullableMessage':
return super().__new__(
cls,
*args,
@@ -95,7 +96,7 @@ class HealthCheckResult(
NullableMessage: typing.Union[NullableMessage, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'HealthCheckResult':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/inline_response_default.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/inline_response_default.py
index ae29e2cf1c77..146af3287ee1 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/inline_response_default.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/inline_response_default.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -79,7 +80,7 @@ class InlineResponseDefault(
string: typing.Union['Foo', Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'InlineResponseDefault':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum.py
index 857b0cffa908..6227389dfb16 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_big.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_big.py
index bcc9aa57f930..d9132eb29978 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_big.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_big.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_one_value.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_one_value.py
index 17b1d5997795..bf6c94525020 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_one_value.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_one_value.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_with_default_value.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_with_default_value.py
index 2916e4fcdfff..48870526b658 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_with_default_value.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_enum_with_default_value.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_max10.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_max10.py
index 8a57a1cdd5e0..087d6c07427a 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_max10.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_max10.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_min15.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_min15.py
index 18a76f8e6ff1..ef06e4d9e73e 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_min15.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/integer_min15.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle.py
index 2f14974794eb..fa8036ac0c71 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -90,10 +91,10 @@ class IsoscelesTriangle(
def __new__(
cls,
- *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes],
+ *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'IsoscelesTriangle':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle_all_of.py
index 96d8b286c0e7..98351c3eb9d4 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle_all_of.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/isosceles_triangle_all_of.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -89,7 +90,7 @@ class IsoscelesTriangleAllOf(
triangleType: typing.Union[triangleType, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'IsoscelesTriangleAllOf':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mammal.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mammal.py
index 6868e7e2a8b8..c46a3dde4ad9 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mammal.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mammal.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -102,10 +103,10 @@ class Mammal(
def __new__(
cls,
- *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes],
+ *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'Mammal':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_test.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_test.py
index 9fca5b0310b1..c8e7a591f8c4 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_test.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/map_test.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -84,7 +85,7 @@ class MapTest(
*args: typing.Union[dict, frozendict, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> '_additional_properties':
return super().__new__(
cls,
*args,
@@ -98,7 +99,7 @@ class MapTest(
*args: typing.Union[dict, frozendict, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'map_map_of_string':
return super().__new__(
cls,
*args,
@@ -138,7 +139,7 @@ class MapTest(
*args: typing.Union[dict, frozendict, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'map_of_enum_string':
return super().__new__(
cls,
*args,
@@ -158,7 +159,7 @@ class MapTest(
*args: typing.Union[dict, frozendict, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'direct_map':
return super().__new__(
cls,
*args,
@@ -181,7 +182,7 @@ class MapTest(
indirect_map: typing.Union['StringBooleanMap', Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'MapTest':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mixed_properties_and_additional_properties_class.py
index fa0afeab0beb..e8bb843a7c89 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mixed_properties_and_additional_properties_class.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/mixed_properties_and_additional_properties_class.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -85,7 +86,7 @@ class MixedPropertiesAndAdditionalPropertiesClass(
*args: typing.Union[dict, frozendict, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'map':
return super().__new__(
cls,
*args,
@@ -102,7 +103,7 @@ class MixedPropertiesAndAdditionalPropertiesClass(
map: typing.Union[map, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'MixedPropertiesAndAdditionalPropertiesClass':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model200_response.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model200_response.py
index a7fcdd30ad5b..cf5dd3ae557b 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model200_response.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model200_response.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -75,11 +76,11 @@ class Model200Response(
def __new__(
cls,
- *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes],
+ *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes],
name: typing.Union[name, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'Model200Response':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_return.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_return.py
index 8ca497627cc0..5a9f2f5bb082 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_return.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/model_return.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -74,10 +75,10 @@ class ModelReturn(
def __new__(
cls,
- *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes],
+ *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'ModelReturn':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/money.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/money.py
new file mode 100644
index 000000000000..603573e9f997
--- /dev/null
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/money.py
@@ -0,0 +1,99 @@
+# 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 re # noqa: F401
+import sys # noqa: F401
+import typing # noqa: F401
+
+from frozendict import frozendict # noqa: F401
+
+import decimal # noqa: F401
+from datetime import date, datetime # noqa: F401
+from frozendict import frozendict # noqa: F401
+
+from petstore_api.schemas import ( # noqa: F401
+ AnyTypeSchema,
+ ComposedSchema,
+ DictSchema,
+ ListSchema,
+ StrSchema,
+ IntSchema,
+ Int32Schema,
+ Int64Schema,
+ Float32Schema,
+ Float64Schema,
+ NumberSchema,
+ DateSchema,
+ DateTimeSchema,
+ DecimalSchema,
+ BoolSchema,
+ BinarySchema,
+ NoneSchema,
+ none_type,
+ InstantiationMetadata,
+ Unset,
+ unset,
+ ComposedBase,
+ ListBase,
+ DictBase,
+ NoneBase,
+ StrBase,
+ IntBase,
+ NumberBase,
+ DateBase,
+ DateTimeBase,
+ BoolBase,
+ BinaryBase,
+ Schema,
+ _SchemaValidator,
+ _SchemaTypeChecker,
+ _SchemaEnumMaker
+)
+
+
+class Money(
+ DictSchema
+):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+ _required_property_names = set((
+ 'amount',
+ 'currency',
+ ))
+ amount = DecimalSchema
+
+ @classmethod
+ @property
+ def currency(cls) -> typing.Type['Currency']:
+ return Currency
+
+
+ def __new__(
+ cls,
+ *args: typing.Union[dict, frozendict, ],
+ amount: amount,
+ currency: currency,
+ _instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
+ **kwargs: typing.Type[Schema],
+ ) -> 'Money':
+ return super().__new__(
+ cls,
+ *args,
+ amount=amount,
+ currency=currency,
+ _instantiation_metadata=_instantiation_metadata,
+ **kwargs,
+ )
+
+from petstore_api.model.currency import Currency
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/name.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/name.py
index c5700c9b7634..08f1eacf23b6 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/name.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/name.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -79,12 +80,12 @@ class Name(
def __new__(
cls,
- *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes],
+ *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes],
name: name,
snake_case: typing.Union[snake_case, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'Name':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/no_additional_properties.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/no_additional_properties.py
index 2ec538c5dae2..4e7724357e8a 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/no_additional_properties.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/no_additional_properties.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -80,7 +81,7 @@ class NoAdditionalProperties(
id: id,
petId: typing.Union[petId, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
- ):
+ ) -> 'NoAdditionalProperties':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_class.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_class.py
index 329db7acc08b..d3a247432469 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_class.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_class.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -69,7 +70,7 @@ class NullableClass(
class integer_prop(
- _SchemaTypeChecker(typing.Union[none_type, Decimal, ]),
+ _SchemaTypeChecker(typing.Union[none_type, decimal.Decimal, ]),
IntBase,
NoneBase,
Schema
@@ -79,7 +80,7 @@ class NullableClass(
cls,
*args: typing.Union[int, None, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
- ):
+ ) -> 'integer_prop':
return super().__new__(
cls,
*args,
@@ -88,7 +89,7 @@ class NullableClass(
class number_prop(
- _SchemaTypeChecker(typing.Union[none_type, Decimal, ]),
+ _SchemaTypeChecker(typing.Union[none_type, decimal.Decimal, ]),
NumberBase,
NoneBase,
Schema
@@ -98,7 +99,7 @@ class NullableClass(
cls,
*args: typing.Union[float, None, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
- ):
+ ) -> 'number_prop':
return super().__new__(
cls,
*args,
@@ -117,7 +118,7 @@ class NullableClass(
cls,
*args: typing.Union[bool, None, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
- ):
+ ) -> 'boolean_prop':
return super().__new__(
cls,
*args,
@@ -136,7 +137,7 @@ class NullableClass(
cls,
*args: typing.Union[str, None, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
- ):
+ ) -> 'string_prop':
return super().__new__(
cls,
*args,
@@ -155,7 +156,7 @@ class NullableClass(
cls,
*args: typing.Union[None, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
- ):
+ ) -> 'date_prop':
return super().__new__(
cls,
*args,
@@ -174,7 +175,7 @@ class NullableClass(
cls,
*args: typing.Union[None, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
- ):
+ ) -> 'datetime_prop':
return super().__new__(
cls,
*args,
@@ -193,7 +194,7 @@ class NullableClass(
cls,
*args: typing.Union[list, tuple, None, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
- ):
+ ) -> 'array_nullable_prop':
return super().__new__(
cls,
*args,
@@ -212,7 +213,7 @@ class NullableClass(
cls,
*args: typing.Union[list, tuple, None, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
- ):
+ ) -> 'array_and_items_nullable_prop':
return super().__new__(
cls,
*args,
@@ -237,7 +238,7 @@ class NullableClass(
*args: typing.Union[dict, frozendict, None, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> '_items':
return super().__new__(
cls,
*args,
@@ -259,7 +260,7 @@ class NullableClass(
*args: typing.Union[dict, frozendict, None, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'object_nullable_prop':
return super().__new__(
cls,
*args,
@@ -288,7 +289,7 @@ class NullableClass(
*args: typing.Union[dict, frozendict, None, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> '_additional_properties':
return super().__new__(
cls,
*args,
@@ -301,7 +302,7 @@ class NullableClass(
*args: typing.Union[dict, frozendict, None, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'object_and_items_nullable_prop':
return super().__new__(
cls,
*args,
@@ -327,7 +328,7 @@ class NullableClass(
*args: typing.Union[dict, frozendict, None, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> '_additional_properties':
return super().__new__(
cls,
*args,
@@ -341,7 +342,7 @@ class NullableClass(
*args: typing.Union[dict, frozendict, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'object_items_nullable':
return super().__new__(
cls,
*args,
@@ -362,7 +363,7 @@ class NullableClass(
*args: typing.Union[dict, frozendict, None, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> '_additional_properties':
return super().__new__(
cls,
*args,
@@ -388,7 +389,7 @@ class NullableClass(
object_items_nullable: typing.Union[object_items_nullable, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'NullableClass':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_shape.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_shape.py
index 8bf418c14451..2a0c429f54ef 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_shape.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_shape.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -104,10 +105,10 @@ class NullableShape(
def __new__(
cls,
- *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes],
+ *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'NullableShape':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_string.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_string.py
index db4a33d9be04..567a7fac1602 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_string.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/nullable_string.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -74,7 +75,7 @@ class NullableString(
cls,
*args: typing.Union[str, None, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
- ):
+ ) -> 'NullableString':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number.py
index c4c4695e8be8..19c1626f4875 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_only.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_only.py
index d9e2b49aa814..52533d39e49d 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_only.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_only.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -75,7 +76,7 @@ class NumberOnly(
JustNumber: typing.Union[JustNumber, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'NumberOnly':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_with_validations.py
index fa87e19d3a46..c8108d4a1075 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_with_validations.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/number_with_validations.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_interface.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_interface.py
index a5e32358a317..af87968d14a3 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_interface.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_interface.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_model_with_ref_props.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_model_with_ref_props.py
index 005497a8fa43..14aeee17ba6c 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_model_with_ref_props.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_model_with_ref_props.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -85,7 +86,7 @@ class ObjectModelWithRefProps(
myBoolean: typing.Union[myBoolean, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'ObjectModelWithRefProps':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_decimal_properties.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_decimal_properties.py
new file mode 100644
index 000000000000..074cc52aaa43
--- /dev/null
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_decimal_properties.py
@@ -0,0 +1,98 @@
+# 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 re # noqa: F401
+import sys # noqa: F401
+import typing # noqa: F401
+
+from frozendict import frozendict # noqa: F401
+
+import decimal # noqa: F401
+from datetime import date, datetime # noqa: F401
+from frozendict import frozendict # noqa: F401
+
+from petstore_api.schemas import ( # noqa: F401
+ AnyTypeSchema,
+ ComposedSchema,
+ DictSchema,
+ ListSchema,
+ StrSchema,
+ IntSchema,
+ Int32Schema,
+ Int64Schema,
+ Float32Schema,
+ Float64Schema,
+ NumberSchema,
+ DateSchema,
+ DateTimeSchema,
+ DecimalSchema,
+ BoolSchema,
+ BinarySchema,
+ NoneSchema,
+ none_type,
+ InstantiationMetadata,
+ Unset,
+ unset,
+ ComposedBase,
+ ListBase,
+ DictBase,
+ NoneBase,
+ StrBase,
+ IntBase,
+ NumberBase,
+ DateBase,
+ DateTimeBase,
+ BoolBase,
+ BinaryBase,
+ Schema,
+ _SchemaValidator,
+ _SchemaTypeChecker,
+ _SchemaEnumMaker
+)
+
+
+class ObjectWithDecimalProperties(
+ DictSchema
+):
+ """NOTE: This class is auto generated by OpenAPI Generator.
+ Ref: https://openapi-generator.tech
+
+ Do not edit the class manually.
+ """
+ length = DecimalSchema
+ width = DecimalSchema
+
+ @classmethod
+ @property
+ def cost(cls) -> typing.Type['Money']:
+ return Money
+
+
+ def __new__(
+ cls,
+ *args: typing.Union[dict, frozendict, ],
+ length: typing.Union[length, Unset] = unset,
+ width: typing.Union[width, Unset] = unset,
+ cost: typing.Union['Money', Unset] = unset,
+ _instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
+ **kwargs: typing.Type[Schema],
+ ) -> 'ObjectWithDecimalProperties':
+ return super().__new__(
+ cls,
+ *args,
+ length=length,
+ width=width,
+ cost=cost,
+ _instantiation_metadata=_instantiation_metadata,
+ **kwargs,
+ )
+
+from petstore_api.model.money import Money
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py
index 2beb1a96edff..2429a2205a21 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_difficultly_named_props.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -87,7 +88,7 @@ class ObjectWithDifficultlyNamedProps(
*args: typing.Union[dict, frozendict, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'ObjectWithDifficultlyNamedProps':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_validations.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_validations.py
index ff52e9e6a072..b0b588d04a13 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_validations.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/object_with_validations.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -76,7 +77,7 @@ class ObjectWithValidations(
*args: typing.Union[dict, frozendict, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'ObjectWithValidations':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/order.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/order.py
index e272d48cf0dc..294687560d50 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/order.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/order.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -111,7 +112,7 @@ class Order(
complete: typing.Union[complete, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'Order':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/parent_pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/parent_pet.py
index 4946eb510ddc..2775c77d79c7 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/parent_pet.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/parent_pet.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -102,7 +103,7 @@ class ParentPet(
*args: typing.Union[dict, frozendict, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'ParentPet':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pet.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pet.py
index 3bd1fcadb75a..038a4c6f701f 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pet.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pet.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -135,7 +136,7 @@ class Pet(
status: typing.Union[status, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'Pet':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pig.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pig.py
index e5dc2bb1710a..438831aac748 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pig.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/pig.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -100,10 +101,10 @@ class Pig(
def __new__(
cls,
- *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes],
+ *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'Pig':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/player.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/player.py
index 817770d4455e..e85504879aeb 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/player.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/player.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -83,7 +84,7 @@ class Player(
enemyPlayer: typing.Union['Player', Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'Player':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral.py
index 85fa3e763349..7ce3ae227f97 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -100,10 +101,10 @@ class Quadrilateral(
def __new__(
cls,
- *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes],
+ *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'Quadrilateral':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral_interface.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral_interface.py
index 52f17cf2ec81..ff7e85735b4a 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral_interface.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/quadrilateral_interface.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -89,12 +90,12 @@ class QuadrilateralInterface(
def __new__(
cls,
- *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes],
+ *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes],
shapeType: shapeType,
quadrilateralType: quadrilateralType,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'QuadrilateralInterface':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/read_only_first.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/read_only_first.py
index ebc9b3b5662d..c3b568a7336c 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/read_only_first.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/read_only_first.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -77,7 +78,7 @@ class ReadOnlyFirst(
baz: typing.Union[baz, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'ReadOnlyFirst':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle.py
index 9bddbc85da57..721c27153e57 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -90,10 +91,10 @@ class ScaleneTriangle(
def __new__(
cls,
- *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes],
+ *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'ScaleneTriangle':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle_all_of.py
index f5c2edcb720c..595525992640 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle_all_of.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/scalene_triangle_all_of.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -89,7 +90,7 @@ class ScaleneTriangleAllOf(
triangleType: typing.Union[triangleType, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'ScaleneTriangleAllOf':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape.py
index 4aaa6b6be132..f61207d5b578 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -100,10 +101,10 @@ class Shape(
def __new__(
cls,
- *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes],
+ *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'Shape':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape_or_null.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape_or_null.py
index 121988a3def9..f78ed803a59c 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape_or_null.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/shape_or_null.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -104,10 +105,10 @@ class ShapeOrNull(
def __new__(
cls,
- *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes],
+ *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'ShapeOrNull':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral.py
index b326d1a58378..f6bf08a97e50 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -90,10 +91,10 @@ class SimpleQuadrilateral(
def __new__(
cls,
- *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes],
+ *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'SimpleQuadrilateral':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral_all_of.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral_all_of.py
index ff52c0145319..8e4bea9b30e3 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral_all_of.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/simple_quadrilateral_all_of.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -89,7 +90,7 @@ class SimpleQuadrilateralAllOf(
quadrilateralType: typing.Union[quadrilateralType, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'SimpleQuadrilateralAllOf':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/some_object.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/some_object.py
index 2b7e243a476b..3efa9b66074e 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/some_object.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/some_object.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -89,10 +90,10 @@ class SomeObject(
def __new__(
cls,
- *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes],
+ *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'SomeObject':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/special_model_name.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/special_model_name.py
index 967b02cb3d0c..9a67034b34c1 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/special_model_name.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/special_model_name.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -77,7 +78,7 @@ class SpecialModelName(
a: typing.Union[a, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'SpecialModelName':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string.py
index 9b51e661bfde..f2f4e22231e4 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_boolean_map.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_boolean_map.py
index 14fb2216dad5..a42d77f660dc 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_boolean_map.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_boolean_map.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -74,7 +75,7 @@ class StringBooleanMap(
*args: typing.Union[dict, frozendict, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'StringBooleanMap':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum.py
index a8fa2a6c6bac..395d83d0f1e5 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -126,7 +127,7 @@ lines''')
cls,
*args: typing.Union[str, None, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
- ):
+ ) -> 'StringEnum':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum_with_default_value.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum_with_default_value.py
index 52689f388b52..c51fbf770135 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum_with_default_value.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_enum_with_default_value.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_with_validation.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_with_validation.py
index 7b41acff15d2..9eae261142d9 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_with_validation.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/string_with_validation.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/tag.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/tag.py
index 0316fce5b92b..1b38c173ce0b 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/tag.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/tag.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -77,7 +78,7 @@ class Tag(
name: typing.Union[name, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'Tag':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle.py
index dae6c43d2130..c312855b6bb3 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -102,10 +103,10 @@ class Triangle(
def __new__(
cls,
- *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes],
+ *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'Triangle':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle_interface.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle_interface.py
index db721a77afbf..a36fd79ef3ff 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle_interface.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/triangle_interface.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -89,12 +90,12 @@ class TriangleInterface(
def __new__(
cls,
- *args: typing.Union[dict, frozendict, str, date, datetime, int, float, Decimal, None, list, tuple, bytes],
+ *args: typing.Union[dict, frozendict, str, date, datetime, int, float, decimal.Decimal, None, list, tuple, bytes],
shapeType: shapeType,
triangleType: triangleType,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'TriangleInterface':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/user.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/user.py
index c55c2e0e6878..cf29c50f64f3 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/user.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/user.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -89,7 +90,7 @@ class User(
*args: typing.Union[dict, frozendict, None, ],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'objectWithNoDeclaredPropsNullable':
return super().__new__(
cls,
*args,
@@ -117,7 +118,7 @@ class User(
anyTypePropNullable: typing.Union[anyTypePropNullable, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'User':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/whale.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/whale.py
index dabdd735658b..8d6de64ab2c0 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/whale.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/whale.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -96,7 +97,7 @@ class Whale(
hasTeeth: typing.Union[hasTeeth, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'Whale':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/zebra.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/zebra.py
index 17d8746ce705..15bbe41e9b44 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/model/zebra.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/model/zebra.py
@@ -15,7 +15,7 @@ import typing # noqa: F401
from frozendict import frozendict # noqa: F401
-from decimal import Decimal # noqa: F401
+import decimal # noqa: F401
from datetime import date, datetime # noqa: F401
from frozendict import frozendict # noqa: F401
@@ -33,6 +33,7 @@ from petstore_api.schemas import ( # noqa: F401
NumberSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
BoolSchema,
BinarySchema,
NoneSchema,
@@ -120,7 +121,7 @@ class Zebra(
type: typing.Union[type, Unset] = unset,
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Type[Schema],
- ):
+ ) -> 'Zebra':
return super().__new__(
cls,
*args,
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/__init__.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/__init__.py
index 9d3b94558c88..07e026d2c2f0 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/models/__init__.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/models/__init__.py
@@ -49,10 +49,12 @@ from petstore_api.model.composed_number import ComposedNumber
from petstore_api.model.composed_object import ComposedObject
from petstore_api.model.composed_one_of_different_types import ComposedOneOfDifferentTypes
from petstore_api.model.composed_string import ComposedString
+from petstore_api.model.currency import Currency
from petstore_api.model.danish_pig import DanishPig
from petstore_api.model.date_time_test import DateTimeTest
from petstore_api.model.date_time_with_validations import DateTimeWithValidations
from petstore_api.model.date_with_validations import DateWithValidations
+from petstore_api.model.decimal_payload import DecimalPayload
from petstore_api.model.dog import Dog
from petstore_api.model.dog_all_of import DogAllOf
from petstore_api.model.drawing import Drawing
@@ -85,6 +87,7 @@ 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.money import Money
from petstore_api.model.name import Name
from petstore_api.model.no_additional_properties import NoAdditionalProperties
from petstore_api.model.nullable_class import NullableClass
@@ -95,6 +98,7 @@ from petstore_api.model.number_only import NumberOnly
from petstore_api.model.number_with_validations import NumberWithValidations
from petstore_api.model.object_interface import ObjectInterface
from petstore_api.model.object_model_with_ref_props import ObjectModelWithRefProps
+from petstore_api.model.object_with_decimal_properties import ObjectWithDecimalProperties
from petstore_api.model.object_with_difficultly_named_props import ObjectWithDifficultlyNamedProps
from petstore_api.model.object_with_validations import ObjectWithValidations
from petstore_api.model.order import Order
diff --git a/samples/openapi3/client/petstore/python-experimental/petstore_api/schemas.py b/samples/openapi3/client/petstore/python-experimental/petstore_api/schemas.py
index e230675efaa9..b896e4ebe4fd 100644
--- a/samples/openapi3/client/petstore/python-experimental/petstore_api/schemas.py
+++ b/samples/openapi3/client/petstore/python-experimental/petstore_api/schemas.py
@@ -13,7 +13,7 @@ from collections import defaultdict
from datetime import date, datetime, timedelta # noqa: F401
from dataclasses import dataclass
import functools
-from decimal import Decimal
+import decimal
import io
import os
import re
@@ -119,12 +119,12 @@ class ValidatorBase:
"""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)
@@ -263,7 +263,7 @@ class ValidatorBase:
_instantiation_metadata.configuration) and 'multiple_of' in validations:
multiple_of_values = validations['multiple_of']
for multiple_of_value in multiple_of_values:
- if (isinstance(input_values, Decimal) and
+ if (isinstance(input_values, decimal.Decimal) and
not (float(input_values) / multiple_of_value).is_integer()
):
# Note 'multipleOf' will be as good as the floating point arithmetic.
@@ -334,7 +334,7 @@ class ValidatorBase:
cls.__check_tuple_validations(validations, input_values, _instantiation_metadata)
elif isinstance(input_values, frozendict):
cls.__check_dict_validations(validations, input_values, _instantiation_metadata)
- elif isinstance(input_values, Decimal):
+ elif isinstance(input_values, decimal.Decimal):
cls.__check_numeric_validations(validations, input_values, _instantiation_metadata)
try:
return super()._validate_validations_pass(input_values, _instantiation_metadata)
@@ -431,7 +431,7 @@ class EnumMakerInterface(typing.Protocol):
@property
def _enum_value_to_name(
cls
- ) -> typing.Dict[typing.Union[str, Decimal, bool, none_type], str]:
+ ) -> typing.Dict[typing.Union[str, decimal.Decimal, bool, none_type], str]:
pass
@classmethod
@@ -442,13 +442,13 @@ class EnumMakerInterface(typing.Protocol):
pass
-def _SchemaEnumMaker(enum_value_to_name: typing.Dict[typing.Union[str, Decimal, bool, none_type], str]) -> EnumMakerInterface:
+def _SchemaEnumMaker(enum_value_to_name: typing.Dict[typing.Union[str, decimal.Decimal, bool, none_type], str]) -> EnumMakerInterface:
class SchemaEnumMaker(EnumMakerBase):
@classmethod
@property
def _enum_value_to_name(
cls
- ) -> typing.Dict[typing.Union[str, Decimal, bool, none_type], str]:
+ ) -> typing.Dict[typing.Union[str, decimal.Decimal, bool, none_type], str]:
pass
try:
super_enum_value_to_name = super()._enum_value_to_name
@@ -545,6 +545,10 @@ class StrBase:
def as_datetime(self) -> datetime:
raise Exception('not implemented')
+ @property
+ def as_decimal(self) -> decimal.Decimal:
+ raise Exception('not implemented')
+
class CustomIsoparser(isoparser):
@@ -636,6 +640,39 @@ class DateTimeBase:
return super()._validate(*args, _instantiation_metadata=_instantiation_metadata)
+class DecimalBase(StrBase):
+ """
+ A class for storing decimals that are sent over the wire as strings
+ These schemas must remain based on StrBase rather than NumberBase
+ because picking base classes must be deterministic
+ """
+
+ @property
+ @functools.cache
+ def as_decimal(self) -> decimal.Decimal:
+ return decimal.Decimal(self)
+
+ @classmethod
+ def _validate_format(cls, arg: typing.Optional[str], _instantiation_metadata: InstantiationMetadata):
+ if isinstance(arg, str):
+ try:
+ decimal.Decimal(arg)
+ return True
+ except decimal.InvalidOperation:
+ raise ApiValueError(
+ "Value cannot be converted to a decimal. "
+ "Invalid value '{}' for type decimal at {}".format(arg, _instantiation_metadata.path_to_item)
+ )
+
+ @classmethod
+ def _validate(cls, *args, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None):
+ """
+ DecimalBase _validate
+ """
+ cls._validate_format(args[0], _instantiation_metadata=_instantiation_metadata)
+ return super()._validate(*args, _instantiation_metadata=_instantiation_metadata)
+
+
class NumberBase:
@property
def as_int(self) -> int:
@@ -1045,7 +1082,7 @@ class DictBase(Discriminable):
return super().__getattribute__(name)
-inheritable_primitive_types_set = {Decimal, str, tuple, frozendict, FileIO, bytes}
+inheritable_primitive_types_set = {decimal.Decimal, str, tuple, frozendict, FileIO, bytes}
class Schema:
@@ -1152,8 +1189,8 @@ class Schema:
new_cls = get_new_class(cls_name, (cls, BoolBase, BoolClass))
elif base_cls is str:
new_cls = get_new_class(cls_name, (cls, StrBase, str))
- elif base_cls is Decimal:
- new_cls = get_new_class(cls_name, (cls, NumberBase, Decimal))
+ elif base_cls is decimal.Decimal:
+ new_cls = get_new_class(cls_name, (cls, NumberBase, decimal.Decimal))
elif base_cls is tuple:
new_cls = get_new_class(cls_name, (cls, ListBase, tuple))
elif base_cls is frozendict:
@@ -1175,7 +1212,7 @@ class Schema:
- the returned instance is a serializable type (except for None, True, and False) which are enums
Use cases:
- 1. inheritable type: string/Decimal/frozendict/tuple
+ 1. inheritable type: string/decimal.Decimal/frozendict/tuple
2. enum value cases: 'hi', 1 -> no base_class set because the enum includes the base class
3. uninheritable type: True/False/None -> no base_class because the base class is not inheritable
_enum_by_value will handle this use case
@@ -1315,7 +1352,7 @@ class Schema:
return super(Schema, cls).__new__(cls, properties)
"""
str = openapi str, date, and datetime
- Decimal = openapi int and float
+ decimal.Decimal = openapi int and float
FileIO = openapi binary type and the user inputs a file
bytes = openapi binary type and the user inputs bytes
"""
@@ -1330,7 +1367,7 @@ class Schema:
datetime,
int,
float,
- Decimal,
+ decimal.Decimal,
bool,
None,
'Schema',
@@ -1367,13 +1404,13 @@ class Schema:
def __remove_unsets(kwargs):
return {key: val for key, val in kwargs.items() if val is not unset}
- def __new__(cls, *args: typing.Union[dict, frozendict, list, tuple, Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Union[dict, frozendict, list, tuple, Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset]):
+ def __new__(cls, *args: typing.Union[dict, frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None, **kwargs: typing.Union[dict, frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset]):
"""
Schema __new__
Args:
- args (int/float/Decimal/str/list/tuple/dict/frozendict/bool/None): the value
- kwargs (str, int/float/Decimal/str/list/tuple/dict/frozendict/bool/None): dict values
+ args (int/float/decimal.Decimal/str/list/tuple/dict/frozendict/bool/None): the value
+ kwargs (str, int/float/decimal.Decimal/str/list/tuple/dict/frozendict/bool/None): dict values
_instantiation_metadata: contains the needed from_server, configuration, path_to_item
"""
kwargs = cls.__remove_unsets(kwargs)
@@ -1397,10 +1434,10 @@ class Schema:
def __init__(
self,
*args: typing.Union[
- dict, frozendict, list, tuple, Decimal, float, int, str, date, datetime, bool, None, 'Schema'],
+ dict, frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema'],
_instantiation_metadata: typing.Optional[InstantiationMetadata] = None,
**kwargs: typing.Union[
- dict, frozendict, list, tuple, Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset
+ dict, frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, 'Schema', Unset
]
):
"""
@@ -1412,7 +1449,7 @@ class Schema:
pass
-def cast_to_allowed_types(arg: typing.Union[str, date, datetime, int, float, None, dict, frozendict, list, tuple, bytes, Schema], from_server=False) -> typing.Union[str, bytes, int, float, None, frozendict, tuple, Schema]:
+def cast_to_allowed_types(arg: typing.Union[str, date, datetime, decimal.Decimal, int, float, None, dict, frozendict, list, tuple, bytes, Schema], from_server=False) -> typing.Union[str, bytes, decimal.Decimal, None, frozendict, tuple, Schema]:
"""
from_server=False date, datetime -> str
int, float -> Decimal
@@ -1429,16 +1466,16 @@ def cast_to_allowed_types(arg: typing.Union[str, date, datetime, int, float, Non
because isinstance(True, int) is True
"""
return arg
- elif isinstance(arg, Decimal):
+ elif isinstance(arg, decimal.Decimal):
return arg
elif isinstance(arg, int):
- return Decimal(arg)
+ return decimal.Decimal(arg)
elif isinstance(arg, float):
- decimal_from_float = Decimal(arg)
+ decimal_from_float = decimal.Decimal(arg)
if decimal_from_float.as_integer_ratio()[1] == 1:
# 9.0 -> Decimal('9.0')
# 3.4028234663852886e+38 -> Decimal('340282346638528859811704183484516925440.0')
- return Decimal(str(decimal_from_float)+'.0')
+ return decimal.Decimal(str(decimal_from_float)+'.0')
return decimal_from_float
elif isinstance(arg, str):
return arg
@@ -1635,7 +1672,7 @@ class ComposedBase(Discriminable):
# DictBase, ListBase, NumberBase, StrBase, BoolBase, NoneBase
class ComposedSchema(
- _SchemaTypeChecker(typing.Union[none_type, str, Decimal, bool, tuple, frozendict]),
+ _SchemaTypeChecker(typing.Union[none_type, str, decimal.Decimal, bool, tuple, frozendict]),
ComposedBase,
DictBase,
ListBase,
@@ -1687,7 +1724,7 @@ class NoneSchema(
class NumberSchema(
- _SchemaTypeChecker(typing.Union[Decimal]),
+ _SchemaTypeChecker(typing.Union[decimal.Decimal]),
NumberBase,
Schema
):
@@ -1697,10 +1734,10 @@ class NumberSchema(
"""
@classmethod
- def _from_openapi_data(cls, arg: typing.Union[int, float, Decimal], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None):
+ def _from_openapi_data(cls, arg: typing.Union[int, float, decimal.Decimal], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None):
return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata)
- def __new__(cls, arg: typing.Union[Decimal, int, float], **kwargs: typing.Union[InstantiationMetadata]):
+ def __new__(cls, arg: typing.Union[decimal.Decimal, int, float], **kwargs: typing.Union[InstantiationMetadata]):
return super().__new__(cls, arg, **kwargs)
@@ -1714,8 +1751,8 @@ class IntBase(NumberBase):
return self._as_int
@classmethod
- def _validate_format(cls, arg: typing.Optional[Decimal], _instantiation_metadata: InstantiationMetadata):
- if isinstance(arg, Decimal):
+ def _validate_format(cls, arg: typing.Optional[decimal.Decimal], _instantiation_metadata: InstantiationMetadata):
+ if isinstance(arg, decimal.Decimal):
exponent = arg.as_tuple().exponent
if exponent != 0:
raise ApiValueError(
@@ -1738,14 +1775,14 @@ class IntSchema(IntBase, NumberSchema):
def _from_openapi_data(cls, arg: int, _instantiation_metadata: typing.Optional[InstantiationMetadata] = None):
return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata)
- def __new__(cls, arg: typing.Union[Decimal, int], **kwargs: typing.Union[InstantiationMetadata]):
+ def __new__(cls, arg: typing.Union[decimal.Decimal, int], **kwargs: typing.Union[InstantiationMetadata]):
return super().__new__(cls, arg, **kwargs)
class Int32Schema(
_SchemaValidator(
- inclusive_minimum=Decimal(-2147483648),
- inclusive_maximum=Decimal(2147483647)
+ inclusive_minimum=decimal.Decimal(-2147483648),
+ inclusive_maximum=decimal.Decimal(2147483647)
),
IntSchema
):
@@ -1753,8 +1790,8 @@ class Int32Schema(
class Int64Schema(
_SchemaValidator(
- inclusive_minimum=Decimal(-9223372036854775808),
- inclusive_maximum=Decimal(9223372036854775807)
+ inclusive_minimum=decimal.Decimal(-9223372036854775808),
+ inclusive_maximum=decimal.Decimal(9223372036854775807)
),
IntSchema
):
@@ -1763,28 +1800,28 @@ class Int64Schema(
class Float32Schema(
_SchemaValidator(
- inclusive_minimum=Decimal(-3.4028234663852886e+38),
- inclusive_maximum=Decimal(3.4028234663852886e+38)
+ inclusive_minimum=decimal.Decimal(-3.4028234663852886e+38),
+ inclusive_maximum=decimal.Decimal(3.4028234663852886e+38)
),
NumberSchema
):
@classmethod
- def _from_openapi_data(cls, arg: typing.Union[float, Decimal], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None):
+ def _from_openapi_data(cls, arg: typing.Union[float, decimal.Decimal], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None):
# todo check format
return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata)
class Float64Schema(
_SchemaValidator(
- inclusive_minimum=Decimal(-1.7976931348623157E+308),
- inclusive_maximum=Decimal(1.7976931348623157E+308)
+ inclusive_minimum=decimal.Decimal(-1.7976931348623157E+308),
+ inclusive_maximum=decimal.Decimal(1.7976931348623157E+308)
),
NumberSchema
):
@classmethod
- def _from_openapi_data(cls, arg: typing.Union[float, Decimal], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None):
+ def _from_openapi_data(cls, arg: typing.Union[float, decimal.Decimal], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None):
# todo check format
return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata)
@@ -1821,6 +1858,20 @@ class DateTimeSchema(DateTimeBase, StrSchema):
return super().__new__(cls, arg, **kwargs)
+class DecimalSchema(DecimalBase, StrSchema):
+
+ def __new__(cls, arg: typing.Union[str], **kwargs: typing.Union[InstantiationMetadata]):
+ """
+ Note: Decimals may not be passed in because cast_to_allowed_types is only invoked once for payloads
+ which can be simple (str) or complex (dicts or lists with nested values)
+ Because casting is only done once and recursively casts all values prior to validation then for a potential
+ client side Decimal input if Decimal was accepted as an input in DecimalSchema then one would not know
+ if one was using it for a StrSchema (where it should be cast to str) or one is using it for NumberSchema
+ where it should stay as Decimal.
+ """
+ return super().__new__(cls, arg, **kwargs)
+
+
class BytesSchema(
_SchemaTypeChecker(typing.Union[bytes]),
Schema,
@@ -1908,7 +1959,7 @@ class BoolSchema(
class AnyTypeSchema(
_SchemaTypeChecker(
- typing.Union[frozendict, tuple, Decimal, str, bool, none_type, bytes, FileIO]
+ typing.Union[frozendict, tuple, decimal.Decimal, str, bool, none_type, bytes, FileIO]
),
DictBase,
ListBase,
@@ -1931,7 +1982,7 @@ class DictSchema(
def _from_openapi_data(cls, arg: typing.Dict[str, typing.Any], _instantiation_metadata: typing.Optional[InstantiationMetadata] = None):
return super()._from_openapi_data(arg, _instantiation_metadata=_instantiation_metadata)
- def __new__(cls, *args: typing.Union[dict, frozendict], **kwargs: typing.Union[dict, frozendict, list, tuple, Decimal, float, int, str, date, datetime, bool, None, bytes, Schema, Unset, InstantiationMetadata]):
+ def __new__(cls, *args: typing.Union[dict, frozendict], **kwargs: typing.Union[dict, frozendict, list, tuple, decimal.Decimal, float, int, str, date, datetime, bool, None, bytes, Schema, Unset, InstantiationMetadata]):
return super().__new__(cls, *args, **kwargs)
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_additional_properties_class.py b/samples/openapi3/client/petstore/python-experimental/test/test_additional_properties_class.py
index 442b5ed138a1..3e0f6a96aaa1 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_additional_properties_class.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_additional_properties_class.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_additional_properties_with_array_of_enums.py b/samples/openapi3/client/petstore/python-experimental/test/test_additional_properties_with_array_of_enums.py
index 076df41d63fc..4e67ade9dde7 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_additional_properties_with_array_of_enums.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_additional_properties_with_array_of_enums.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_address.py b/samples/openapi3/client/petstore/python-experimental/test/test_address.py
index 78d674007487..2890381c264e 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_address.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_address.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_animal.py b/samples/openapi3/client/petstore/python-experimental/test/test_animal.py
index 572450a9704b..7e244b29bae1 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_animal.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_animal.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_animal_farm.py b/samples/openapi3/client/petstore/python-experimental/test/test_animal_farm.py
index 3ee8615f57c8..f3d8ff2fa8fe 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_animal_farm.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_animal_farm.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_another_fake_api.py b/samples/openapi3/client/petstore/python-experimental/test/test_another_fake_api.py
index c58dfa6202bc..a2e3736712a3 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_another_fake_api.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_another_fake_api.py
@@ -9,7 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_api_response.py b/samples/openapi3/client/petstore/python-experimental/test/test_api_response.py
index 63dc0ede9b2b..c75371329f05 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_api_response.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_api_response.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_apple.py b/samples/openapi3/client/petstore/python-experimental/test/test_apple.py
index e8abc62ef046..32f95fa8345a 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_apple.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_apple.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_apple_req.py b/samples/openapi3/client/petstore/python-experimental/test/test_apple_req.py
index 38edc7a55daf..767c88cd8a61 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_apple_req.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_apple_req.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_array_holding_any_type.py b/samples/openapi3/client/petstore/python-experimental/test/test_array_holding_any_type.py
index cee2263dd67c..bcd5c9c3ec5c 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_array_holding_any_type.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_array_holding_any_type.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_array_of_array_of_number_only.py b/samples/openapi3/client/petstore/python-experimental/test/test_array_of_array_of_number_only.py
index ebf1ad383672..2ac8010f06d1 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_array_of_array_of_number_only.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_array_of_array_of_number_only.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_array_of_enums.py b/samples/openapi3/client/petstore/python-experimental/test/test_array_of_enums.py
index 44a59bb5263f..43e974c180d9 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_array_of_enums.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_array_of_enums.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_array_of_number_only.py b/samples/openapi3/client/petstore/python-experimental/test/test_array_of_number_only.py
index 21bffad3329d..b0098336e219 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_array_of_number_only.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_array_of_number_only.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_array_test.py b/samples/openapi3/client/petstore/python-experimental/test/test_array_test.py
index 4528c568690b..4efdf344f38d 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_array_test.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_array_test.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_array_with_validations_in_items.py b/samples/openapi3/client/petstore/python-experimental/test/test_array_with_validations_in_items.py
index 95a19cba751e..ae9f92a9414c 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_array_with_validations_in_items.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_array_with_validations_in_items.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_banana.py b/samples/openapi3/client/petstore/python-experimental/test/test_banana.py
index 77b1b2aaf304..693c03a89f40 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_banana.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_banana.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_banana_req.py b/samples/openapi3/client/petstore/python-experimental/test/test_banana_req.py
index 2bfbb9edb4c3..683083c66cf0 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_banana_req.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_banana_req.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_bar.py b/samples/openapi3/client/petstore/python-experimental/test/test_bar.py
index 3d9429384675..6c041955bb58 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_bar.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_bar.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_basque_pig.py b/samples/openapi3/client/petstore/python-experimental/test/test_basque_pig.py
index 4af8d8947cab..21c243e7d971 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_basque_pig.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_basque_pig.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_boolean.py b/samples/openapi3/client/petstore/python-experimental/test/test_boolean.py
index c2e2faab188a..2ae22b6a2bd4 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_boolean.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_boolean.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_boolean_enum.py b/samples/openapi3/client/petstore/python-experimental/test/test_boolean_enum.py
index 2d73bc707f55..ea61d7186ae0 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_boolean_enum.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_boolean_enum.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_capitalization.py b/samples/openapi3/client/petstore/python-experimental/test/test_capitalization.py
index 8cb68360735a..1b60714649f6 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_capitalization.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_capitalization.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_cat.py b/samples/openapi3/client/petstore/python-experimental/test/test_cat.py
index 7c2b75fe8af8..571f3b9adca5 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_cat.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_cat.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_cat_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_cat_all_of.py
index 84ebd083410a..fc203c2dbaad 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_cat_all_of.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_cat_all_of.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_category.py b/samples/openapi3/client/petstore/python-experimental/test/test_category.py
index 8f19639fb516..a37846446aab 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_category.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_category.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_child_cat.py b/samples/openapi3/client/petstore/python-experimental/test/test_child_cat.py
index f4be6a52a8d4..3537d0effcb4 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_child_cat.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_child_cat.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_child_cat_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_child_cat_all_of.py
index 410ac2772ab7..98839fa67486 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_child_cat_all_of.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_child_cat_all_of.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_class_model.py b/samples/openapi3/client/petstore/python-experimental/test/test_class_model.py
index 6a472da41aeb..fdbf0e7ff7cd 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_class_model.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_class_model.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_client.py b/samples/openapi3/client/petstore/python-experimental/test/test_client.py
index 70a26741f40f..0222983fc210 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_client.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_client.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_complex_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/test/test_complex_quadrilateral.py
index 95c686785215..e31da4be7446 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_complex_quadrilateral.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_complex_quadrilateral.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_complex_quadrilateral_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_complex_quadrilateral_all_of.py
index 96fdc5103f31..d6d7fa4cba4f 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_complex_quadrilateral_all_of.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_complex_quadrilateral_all_of.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_composed_any_of_different_types_no_validations.py b/samples/openapi3/client/petstore/python-experimental/test/test_composed_any_of_different_types_no_validations.py
index 92263d139452..96691e8f9e82 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_composed_any_of_different_types_no_validations.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_composed_any_of_different_types_no_validations.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_composed_array.py b/samples/openapi3/client/petstore/python-experimental/test/test_composed_array.py
index 3e48ed79fe5a..a83aa868cdc2 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_composed_array.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_composed_array.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_composed_bool.py b/samples/openapi3/client/petstore/python-experimental/test/test_composed_bool.py
index 790edcc16d39..8ccaed5ee13c 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_composed_bool.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_composed_bool.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_composed_none.py b/samples/openapi3/client/petstore/python-experimental/test/test_composed_none.py
index 65c7dd5adb91..0669698ed2ba 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_composed_none.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_composed_none.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_composed_number.py b/samples/openapi3/client/petstore/python-experimental/test/test_composed_number.py
index 66fdc3c591e0..162b7bcaf8df 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_composed_number.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_composed_number.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_composed_object.py b/samples/openapi3/client/petstore/python-experimental/test/test_composed_object.py
index 6212b89f9bc1..a2d8b85a34fd 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_composed_object.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_composed_object.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_composed_one_of_different_types.py b/samples/openapi3/client/petstore/python-experimental/test/test_composed_one_of_different_types.py
index b15712de301e..c33fd21e5e4d 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_composed_one_of_different_types.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_composed_one_of_different_types.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_composed_string.py b/samples/openapi3/client/petstore/python-experimental/test/test_composed_string.py
index 2bfcf2f74d36..902d75278d4e 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_composed_string.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_composed_string.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_currency.py b/samples/openapi3/client/petstore/python-experimental/test/test_currency.py
new file mode 100644
index 000000000000..06f8236b892e
--- /dev/null
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_currency.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 unittest
+
+import petstore_api
+from petstore_api.model.currency import Currency
+
+
+class TestCurrency(unittest.TestCase):
+ """Currency unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def test_Currency(self):
+ """Test Currency"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = Currency() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_danish_pig.py b/samples/openapi3/client/petstore/python-experimental/test/test_danish_pig.py
index 1a46253ed9f5..e1c66fdf6d2f 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_danish_pig.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_danish_pig.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_date_time_test.py b/samples/openapi3/client/petstore/python-experimental/test/test_date_time_test.py
index 275b74c92a25..597abd5ba8cb 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_date_time_test.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_date_time_test.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_date_time_with_validations.py b/samples/openapi3/client/petstore/python-experimental/test/test_date_time_with_validations.py
index 0edf5c5e85be..7f8c4c3bb460 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_date_time_with_validations.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_date_time_with_validations.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_date_with_validations.py b/samples/openapi3/client/petstore/python-experimental/test/test_date_with_validations.py
index 866e5529225b..2656d3b91fc1 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_date_with_validations.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_date_with_validations.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_decimal_payload.py b/samples/openapi3/client/petstore/python-experimental/test/test_decimal_payload.py
new file mode 100644
index 000000000000..b50d4fbc8a60
--- /dev/null
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_decimal_payload.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 unittest
+
+import petstore_api
+from petstore_api.model.decimal_payload import DecimalPayload
+
+
+class TestDecimalPayload(unittest.TestCase):
+ """DecimalPayload unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def test_DecimalPayload(self):
+ """Test DecimalPayload"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = DecimalPayload() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_default_api.py b/samples/openapi3/client/petstore/python-experimental/test/test_default_api.py
index caf174d6d4ba..2af6b820e00a 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_default_api.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_default_api.py
@@ -9,7 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_dog.py b/samples/openapi3/client/petstore/python-experimental/test/test_dog.py
index 4643c7af8353..4adcdd278cf3 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_dog.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_dog.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_dog_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_dog_all_of.py
index 89526f7051f0..3a11693e9b15 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_dog_all_of.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_dog_all_of.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_drawing.py b/samples/openapi3/client/petstore/python-experimental/test/test_drawing.py
index 091d89c80e15..d08e8a6fbedd 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_drawing.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_drawing.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_enum_arrays.py b/samples/openapi3/client/petstore/python-experimental/test/test_enum_arrays.py
index 0b7e553a7d16..55b12169e27f 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_enum_arrays.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_enum_arrays.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_enum_class.py b/samples/openapi3/client/petstore/python-experimental/test/test_enum_class.py
index 298c740defab..18688309ecd0 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_enum_class.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_enum_class.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_enum_test.py b/samples/openapi3/client/petstore/python-experimental/test/test_enum_test.py
index 2022b10d5d56..9952acb68206 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_enum_test.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_enum_test.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_equilateral_triangle.py b/samples/openapi3/client/petstore/python-experimental/test/test_equilateral_triangle.py
index d85647271ce1..62308d48c8a1 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_equilateral_triangle.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_equilateral_triangle.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_equilateral_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_equilateral_triangle_all_of.py
index 9651e4efd43f..8ff85083ffde 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_equilateral_triangle_all_of.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_equilateral_triangle_all_of.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_fake_classname_tags_123_api.py b/samples/openapi3/client/petstore/python-experimental/test/test_fake_classname_tags_123_api.py
index b7724aaed7d1..63c46155bd68 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_fake_classname_tags_123_api.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_fake_classname_tags_123_api.py
@@ -9,7 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
import unittest
import petstore_api
@@ -25,8 +24,8 @@ class TestFakeClassnameTags123Api(unittest.TestCase):
def tearDown(self):
pass
- def test_test_classname(self):
- """Test case for test_classname
+ def test_classname(self):
+ """Test case for classname
To test class name in snake case # noqa: E501
"""
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_file.py b/samples/openapi3/client/petstore/python-experimental/test/test_file.py
index 7154338bc7a5..240760a67d37 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_file.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_file.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_file_schema_test_class.py b/samples/openapi3/client/petstore/python-experimental/test/test_file_schema_test_class.py
index 0b56063d59f6..fc4828d0edb8 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_file_schema_test_class.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_file_schema_test_class.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_foo.py b/samples/openapi3/client/petstore/python-experimental/test/test_foo.py
index 69fbc69ba9e5..4ee6344ea273 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_foo.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_foo.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_format_test.py b/samples/openapi3/client/petstore/python-experimental/test/test_format_test.py
index e5d081ceaa48..46d4794bbe6e 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_format_test.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_format_test.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_fruit.py b/samples/openapi3/client/petstore/python-experimental/test/test_fruit.py
index 43a58a870c30..490ce5cf9522 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_fruit.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_fruit.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_fruit_req.py b/samples/openapi3/client/petstore/python-experimental/test/test_fruit_req.py
index 3745b38f17ea..ceae8a934240 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_fruit_req.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_fruit_req.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_gm_fruit.py b/samples/openapi3/client/petstore/python-experimental/test/test_gm_fruit.py
index 487e5275516e..c924c45e5592 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_gm_fruit.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_gm_fruit.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_grandparent_animal.py b/samples/openapi3/client/petstore/python-experimental/test/test_grandparent_animal.py
index 8820ad5f253f..34edef400637 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_grandparent_animal.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_grandparent_animal.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_has_only_read_only.py b/samples/openapi3/client/petstore/python-experimental/test/test_has_only_read_only.py
index 0019338c2bc7..8ed163b7621c 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_has_only_read_only.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_has_only_read_only.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_health_check_result.py b/samples/openapi3/client/petstore/python-experimental/test/test_health_check_result.py
index e654924727bc..2bf06af9a63b 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_health_check_result.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_health_check_result.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_inline_response_default.py b/samples/openapi3/client/petstore/python-experimental/test/test_inline_response_default.py
index 98b9b31821a7..19408e88f662 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_inline_response_default.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_inline_response_default.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum.py b/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum.py
index b94fef7543a3..abd3db17c9c0 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_big.py b/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_big.py
index 61052164aee9..d905b1d6404a 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_big.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_big.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_one_value.py b/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_one_value.py
index 9c94769ef704..f3dee3f395bf 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_one_value.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_one_value.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_with_default_value.py b/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_with_default_value.py
index bcdd005b2fb5..48ffddb7b02c 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_with_default_value.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_integer_enum_with_default_value.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_integer_max10.py b/samples/openapi3/client/petstore/python-experimental/test/test_integer_max10.py
index 9a982a0cb284..fd4a0d07930d 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_integer_max10.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_integer_max10.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_integer_min15.py b/samples/openapi3/client/petstore/python-experimental/test/test_integer_min15.py
index b54a5c3e1a1f..05898df5126b 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_integer_min15.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_integer_min15.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_isosceles_triangle.py b/samples/openapi3/client/petstore/python-experimental/test/test_isosceles_triangle.py
index 00a236f55444..c17549e2b1bf 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_isosceles_triangle.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_isosceles_triangle.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_isosceles_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_isosceles_triangle_all_of.py
index ec2e16403f70..a9a8903953b6 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_isosceles_triangle_all_of.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_isosceles_triangle_all_of.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_mammal.py b/samples/openapi3/client/petstore/python-experimental/test/test_mammal.py
index 361f043de97d..df83e514618f 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_mammal.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_mammal.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_map_test.py b/samples/openapi3/client/petstore/python-experimental/test/test_map_test.py
index 7239da64e296..21305dee99bd 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_map_test.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_map_test.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_mixed_properties_and_additional_properties_class.py b/samples/openapi3/client/petstore/python-experimental/test/test_mixed_properties_and_additional_properties_class.py
index 8291a671896f..9f54921c6951 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_mixed_properties_and_additional_properties_class.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_mixed_properties_and_additional_properties_class.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_model200_response.py b/samples/openapi3/client/petstore/python-experimental/test/test_model200_response.py
index 11caf2a0c0b5..48f8ea5e01c1 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_model200_response.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_model200_response.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_model_return.py b/samples/openapi3/client/petstore/python-experimental/test/test_model_return.py
index 61841ab2acb6..79b04d0931d5 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_model_return.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_model_return.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_money.py b/samples/openapi3/client/petstore/python-experimental/test/test_money.py
new file mode 100644
index 000000000000..2eb90df6644e
--- /dev/null
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_money.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 unittest
+
+import petstore_api
+from petstore_api.model.money import Money
+
+
+class TestMoney(unittest.TestCase):
+ """Money unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def test_Money(self):
+ """Test Money"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = Money() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_name.py b/samples/openapi3/client/petstore/python-experimental/test/test_name.py
index 67b92d6ef0d3..ec115ac670e7 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_name.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_name.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_no_additional_properties.py b/samples/openapi3/client/petstore/python-experimental/test/test_no_additional_properties.py
index a76654032454..59ccb034d648 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_no_additional_properties.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_no_additional_properties.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_nullable_class.py b/samples/openapi3/client/petstore/python-experimental/test/test_nullable_class.py
index 8eeb087512f4..5b4cfeb945b5 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_nullable_class.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_nullable_class.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_nullable_shape.py b/samples/openapi3/client/petstore/python-experimental/test/test_nullable_shape.py
index 7126a23ed427..697c8d663297 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_nullable_shape.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_nullable_shape.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_nullable_string.py b/samples/openapi3/client/petstore/python-experimental/test/test_nullable_string.py
index fac8c8653bf2..38fcd7262bbe 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_nullable_string.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_nullable_string.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_number.py b/samples/openapi3/client/petstore/python-experimental/test/test_number.py
index 9dff8542047a..6f7f55b9402a 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_number.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_number.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_number_only.py b/samples/openapi3/client/petstore/python-experimental/test/test_number_only.py
index a1572ab7f9e5..69073964b8e5 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_number_only.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_number_only.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_number_with_validations.py b/samples/openapi3/client/petstore/python-experimental/test/test_number_with_validations.py
index 919d7c0d5a64..b7dbd3ba66d2 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_number_with_validations.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_number_with_validations.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_object_interface.py b/samples/openapi3/client/petstore/python-experimental/test/test_object_interface.py
index 42994360b373..45cd46414d57 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_object_interface.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_object_interface.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_object_model_with_ref_props.py b/samples/openapi3/client/petstore/python-experimental/test/test_object_model_with_ref_props.py
index 6c8aaa4c9cf9..0a1045ece2a9 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_object_model_with_ref_props.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_object_model_with_ref_props.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_object_with_decimal_properties.py b/samples/openapi3/client/petstore/python-experimental/test/test_object_with_decimal_properties.py
new file mode 100644
index 000000000000..f8c4ff1a6c9e
--- /dev/null
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_object_with_decimal_properties.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 unittest
+
+import petstore_api
+from petstore_api.model.object_with_decimal_properties import ObjectWithDecimalProperties
+
+
+class TestObjectWithDecimalProperties(unittest.TestCase):
+ """ObjectWithDecimalProperties unit test stubs"""
+
+ def setUp(self):
+ pass
+
+ def tearDown(self):
+ pass
+
+ def test_ObjectWithDecimalProperties(self):
+ """Test ObjectWithDecimalProperties"""
+ # FIXME: construct object with mandatory attributes with example values
+ # model = ObjectWithDecimalProperties() # noqa: E501
+ pass
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_object_with_difficultly_named_props.py b/samples/openapi3/client/petstore/python-experimental/test/test_object_with_difficultly_named_props.py
index 6bd3ec317cd4..c59598309485 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_object_with_difficultly_named_props.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_object_with_difficultly_named_props.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
@@ -28,27 +26,9 @@ class TestObjectWithDifficultlyNamedProps(unittest.TestCase):
def test_ObjectWithDifficultlyNamedProps(self):
"""Test ObjectWithDifficultlyNamedProps"""
- kwargs = {
- '$special[property.name]': 1,
- '123-list': '',
- '123Number': 2,
- }
- model = ObjectWithDifficultlyNamedProps(**kwargs)
- self.assertEqual(model['$special[property.name]'], 1)
- self.assertEqual(model['123-list'], '')
- self.assertEqual(model['123Number'], 2)
- self.assertEqual(model, kwargs)
-
- # without the required argument, an exception is raised
- optional_kwargs = {
- '$special[property.name]': 1,
- '123Number': 2,
- }
- with self.assertRaisesRegex(
- petstore_api.ApiTypeError,
- r"ObjectWithDifficultlyNamedProps is missing 1 required argument: ['123-list']"
- ):
- ObjectWithDifficultlyNamedProps(**optional_kwargs)
+ # FIXME: construct object with mandatory attributes with example values
+ # model = ObjectWithDifficultlyNamedProps() # noqa: E501
+ pass
if __name__ == '__main__':
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_object_with_validations.py b/samples/openapi3/client/petstore/python-experimental/test/test_object_with_validations.py
index cfe0400fcee9..128755642ee2 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_object_with_validations.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_object_with_validations.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_order.py b/samples/openapi3/client/petstore/python-experimental/test/test_order.py
index 9463845b34a2..bfed83072aed 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_order.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_order.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_parent_pet.py b/samples/openapi3/client/petstore/python-experimental/test/test_parent_pet.py
index d1507e114f0c..0c9d1876520c 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_parent_pet.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_parent_pet.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_pet.py b/samples/openapi3/client/petstore/python-experimental/test/test_pet.py
index dc34ae0012b9..133ae47f409d 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_pet.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_pet.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_pet_api.py b/samples/openapi3/client/petstore/python-experimental/test/test_pet_api.py
index d545f497297a..494be2ebd848 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_pet_api.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_pet_api.py
@@ -9,7 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
import unittest
import petstore_api
@@ -74,13 +73,6 @@ class TestPetApi(unittest.TestCase):
"""
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
@@ -88,6 +80,13 @@ class TestPetApi(unittest.TestCase):
"""
pass
+ def test_upload_image(self):
+ """Test case for upload_image
+
+ uploads an image # noqa: E501
+ """
+ pass
+
if __name__ == '__main__':
unittest.main()
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_pig.py b/samples/openapi3/client/petstore/python-experimental/test/test_pig.py
index 8c092a8465b1..547a45679b63 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_pig.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_pig.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_player.py b/samples/openapi3/client/petstore/python-experimental/test/test_player.py
index ba15e0f576a0..b3d3d685d65a 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_player.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_player.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/test/test_quadrilateral.py
index cc0c203d2eaf..f21755a58ee9 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_quadrilateral.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_quadrilateral.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_quadrilateral_interface.py b/samples/openapi3/client/petstore/python-experimental/test/test_quadrilateral_interface.py
index cec68e36cf53..e1d318d03114 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_quadrilateral_interface.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_quadrilateral_interface.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_read_only_first.py b/samples/openapi3/client/petstore/python-experimental/test/test_read_only_first.py
index d447437eb165..ce3245015e5b 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_read_only_first.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_read_only_first.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_scalene_triangle.py b/samples/openapi3/client/petstore/python-experimental/test/test_scalene_triangle.py
index 8df062169260..8e20abb64570 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_scalene_triangle.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_scalene_triangle.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_scalene_triangle_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_scalene_triangle_all_of.py
index f81248b1517a..8907e705a985 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_scalene_triangle_all_of.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_scalene_triangle_all_of.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_shape.py b/samples/openapi3/client/petstore/python-experimental/test/test_shape.py
index f34053a9bcb8..ac59550d5393 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_shape.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_shape.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_shape_or_null.py b/samples/openapi3/client/petstore/python-experimental/test/test_shape_or_null.py
index ee182f6298cc..e014a9f0b159 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_shape_or_null.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_shape_or_null.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_simple_quadrilateral.py b/samples/openapi3/client/petstore/python-experimental/test/test_simple_quadrilateral.py
index 8a6ce429abf5..a06f65e3f180 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_simple_quadrilateral.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_simple_quadrilateral.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_simple_quadrilateral_all_of.py b/samples/openapi3/client/petstore/python-experimental/test/test_simple_quadrilateral_all_of.py
index ad9d92251b40..af618a805178 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_simple_quadrilateral_all_of.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_simple_quadrilateral_all_of.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_some_object.py b/samples/openapi3/client/petstore/python-experimental/test/test_some_object.py
index f3b94113824d..f1fe6af15812 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_some_object.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_some_object.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_special_model_name.py b/samples/openapi3/client/petstore/python-experimental/test/test_special_model_name.py
index b74b45db1224..bfc1af2691ca 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_special_model_name.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_special_model_name.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_store_api.py b/samples/openapi3/client/petstore/python-experimental/test/test_store_api.py
index 3680a34b42a0..14918e6e47d6 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_store_api.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_store_api.py
@@ -9,7 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_string.py b/samples/openapi3/client/petstore/python-experimental/test/test_string.py
index 1c62f3606b8e..d3b7bff446ea 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_string.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_string.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_string_boolean_map.py b/samples/openapi3/client/petstore/python-experimental/test/test_string_boolean_map.py
index bf39e456cf0c..d211c69d25db 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_string_boolean_map.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_string_boolean_map.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_string_enum.py b/samples/openapi3/client/petstore/python-experimental/test/test_string_enum.py
index c63cb8cba8fe..9e464a1404d2 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_string_enum.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_string_enum.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_string_enum_with_default_value.py b/samples/openapi3/client/petstore/python-experimental/test/test_string_enum_with_default_value.py
index 87073fe5be27..06aba4d70446 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_string_enum_with_default_value.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_string_enum_with_default_value.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_string_with_validation.py b/samples/openapi3/client/petstore/python-experimental/test/test_string_with_validation.py
index 338768440244..df7fef9ecd2e 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_string_with_validation.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_string_with_validation.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_tag.py b/samples/openapi3/client/petstore/python-experimental/test/test_tag.py
index a0325e55679f..3638a780a82a 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_tag.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_tag.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_triangle.py b/samples/openapi3/client/petstore/python-experimental/test/test_triangle.py
index e7978b7d1bf2..5c51dc41ae82 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_triangle.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_triangle.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_triangle_interface.py b/samples/openapi3/client/petstore/python-experimental/test/test_triangle_interface.py
index 9e498660c0b0..fa7414066b2b 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_triangle_interface.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_triangle_interface.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_user.py b/samples/openapi3/client/petstore/python-experimental/test/test_user.py
index 8d6e394ecb3c..24ef5a009703 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_user.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_user.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_user_api.py b/samples/openapi3/client/petstore/python-experimental/test/test_user_api.py
index abf57b0733da..3fa565f40fe2 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_user_api.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_user_api.py
@@ -9,7 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_whale.py b/samples/openapi3/client/petstore/python-experimental/test/test_whale.py
index 16cfebae3379..e19eb56a55c2 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_whale.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_whale.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/test/test_zebra.py b/samples/openapi3/client/petstore/python-experimental/test/test_zebra.py
index dc53745dea55..003ad25d8787 100644
--- a/samples/openapi3/client/petstore/python-experimental/test/test_zebra.py
+++ b/samples/openapi3/client/petstore/python-experimental/test/test_zebra.py
@@ -9,8 +9,6 @@
Generated by: https://openapi-generator.tech
"""
-
-import sys
import unittest
import petstore_api
diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_any_type_schema.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_any_type_schema.py
index e10f99b44bca..059c5eaac60f 100644
--- a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_any_type_schema.py
+++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_any_type_schema.py
@@ -11,6 +11,7 @@
import unittest
+from decimal import Decimal
import petstore_api
from petstore_api.schemas import (
@@ -24,9 +25,9 @@ from petstore_api.schemas import (
NoneSchema,
DateSchema,
DateTimeSchema,
+ DecimalSchema,
ComposedSchema,
frozendict,
- Decimal,
NoneClass,
BoolClass
)
@@ -268,6 +269,31 @@ class TestAnyTypeSchema(unittest.TestCase):
assert isinstance(m, str)
assert m == '2020-01-01T00:00:00'
+ def testDecimalSchema(self):
+ class Model(ComposedSchema):
+
+ @classmethod
+ @property
+ def _composed_schemas(cls):
+ return {
+ 'allOf': [
+ AnyTypeSchema,
+ DecimalSchema,
+ ],
+ 'oneOf': [
+ ],
+ 'anyOf': [
+ ],
+ }
+
+ m = Model('12.34')
+ assert isinstance(m, Model)
+ assert isinstance(m, AnyTypeSchema)
+ assert isinstance(m, DecimalSchema)
+ assert isinstance(m, str)
+ assert m == '12.34'
+ assert m.as_decimal == Decimal('12.34')
+
if __name__ == '__main__':
unittest.main()
diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_decimal_payload.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_decimal_payload.py
new file mode 100644
index 000000000000..25122fc35f43
--- /dev/null
+++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_decimal_payload.py
@@ -0,0 +1,46 @@
+# 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 decimal
+import unittest
+
+import petstore_api
+from petstore_api.schemas import DecimalSchema
+from petstore_api.model.decimal_payload import DecimalPayload
+
+
+class TestDecimalPayload(unittest.TestCase):
+ """DecimalPayload unit test stubs"""
+
+ def test_DecimalPayload(self):
+ """Test DecimalPayload"""
+
+ m = DecimalPayload('12')
+ assert isinstance(m, DecimalPayload)
+ assert isinstance(m, DecimalSchema)
+ assert isinstance(m, str)
+ assert m == '12'
+ assert m.as_decimal == decimal.Decimal('12')
+
+ m = DecimalPayload('12.34')
+ assert isinstance(m, DecimalPayload)
+ assert isinstance(m, DecimalSchema)
+ assert isinstance(m, str)
+ assert m == '12.34'
+ assert m.as_decimal == decimal.Decimal('12.34')
+
+ # passing in a Decimal does not work
+ with self.assertRaises(petstore_api.ApiTypeError):
+ DecimalPayload(decimal.Decimal('12.34'))
+
+
+if __name__ == '__main__':
+ unittest.main()
diff --git a/samples/openapi3/client/petstore/python-experimental/tests_manual/test_money.py b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_money.py
new file mode 100644
index 000000000000..a4bd764cc87f
--- /dev/null
+++ b/samples/openapi3/client/petstore/python-experimental/tests_manual/test_money.py
@@ -0,0 +1,34 @@
+# 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 decimal
+import unittest
+
+from petstore_api.model.money import Money
+
+
+class TestMoney(unittest.TestCase):
+ """Money unit test stubs"""
+
+ def test_Money(self):
+ """Test Money"""
+ price = Money(
+ currency='usd',
+ amount='10.99'
+ )
+ self.assertEqual(price.amount.as_decimal, decimal.Decimal('10.99'))
+ self.assertEqual(
+ price,
+ dict(currency='usd', amount='10.99')
+ )
+
+
+if __name__ == '__main__':
+ unittest.main()