diff --git a/docs/generators/python-experimental.md b/docs/generators/python-experimental.md
index 00614e6ccb1..0d46556daf7 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 91c8870774a..00fa3cf7a5e 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 2bcbcef08d0..5424080f0d7 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 47c28bff18d..4dfc613aae2 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 a999b4b16c9..2f52783c605 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 0741ba482fe..38015e35044 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 bb220e4b8f3..e74461e8043 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 2c9a6f469ba..763da96feeb 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 14b4c5e0648..24f52cac6ca 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 0b345344c43..87fe3d0b324 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 094d7f49b65..48a4a7c85a1 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 b238468f73a..9450487cb54 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 f149e72a898..7fcdb42c7b3 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 ad8d63e86a6..fdc3984d899 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 98ccaf5dbbc..a849a36ae20 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 00000000000..9811a54c6e5
--- /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 00000000000..2e0821dd053
--- /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 00000000000..5deec5712ae
--- /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 00000000000..10bd9061c0d
--- /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 b9733311046..eef7420a019 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 b704f12197a..c1a9e4213e0 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 f0d07f51205..1958cd47e5f 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 9c44cbce507..466bb6bdeac 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 83af2ce00ca..30eb23e2260 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 c46e584ab42..7d10197e7b9 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 a99f338d61b..185f737fd61 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 49566ef541d..27c385cf6d8 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 ac4d37279eb..8d33047b77b 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 d1812acdfb6..32c09a60148 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 7f3ecf42045..f18f635fbcb 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 63faaf2db9a..5898d0608a2 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 7d8e080429d..9a0375a83d9 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 831241cba68..321959bf07e 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 dc590cb9137..77bce3d6270 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 0acc3f4491e..3dcf988a1b7 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 591f9417e3b..917d5c7b7d7 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 4b402d4e961..40880fd1b09 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 ac82ec1bca5..e2481118651 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 aaa919ec758..6e72d45b78d 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 c355d0e1183..4ec604dd98c 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 14076fea22b..8fd0b87cf6c 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 000d30c64ef..f1dda7d9754 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 51c9bd862e8..21d92e829df 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 87fa4f8dbcc..73f707e268b 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 8fbdf9bbdb8..f39892210cb 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 19c7745793a..6be2c17a026 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 d8157f7f4cf..1ccf89e848c 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 7f04e4cc3c8..80280363358 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 de6d86ed212..afb30b58048 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 d6b31e361f5..ac4b7f3ad8c 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 a4c39c6ae34..5496b92cd55 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 533b2ae23cf..549fd2aa6fc 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 71bdf386bc9..fa1b5a1bb96 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 6535b584ac8..798b70c896a 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 214bf7a41b2..c137418e02d 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 d4f494e25be..10c595a21ab 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 9dbbf03607f..1c4269d277b 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 e5e5aca7eb0..9daf61b0c08 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 11f819f27b3..99f9ecbb28f 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 ef9f9c3ba63..ba961a9921e 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 8627997a2fb..7cc7494687d 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 8694e9582ff..d3ae4f85df7 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 d1c0a1e0e87..81553c66598 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 1d3b6530820..f337efa3480 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 2a2af60d64b..fa01a390119 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 c63a4e482d1..47447322ff0 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 1e6f9443fce..99bcba58663 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 fcd3f6dcde4..472d3354b84 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 38220b88f5d..adad78a8e84 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 a9dbd2396f0..8301d14cf86 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 e6b66637e22..90d612a857a 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 255e88d8f05..95e55511dca 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 c5a1a74ddfe..f0dc6441d3e 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 4a2b3dca68a..2bb3d0259c8 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 b282cdccb5d..41f336ea8bc 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 eef32e7fc2c..05b8485a74d 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 907e5332a51..df315c8bf1c 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 a87a3963bf0..51e9aeeb603 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 0441017cce2..06912cc2194 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 84a16a901f4..19af3dc1e9f 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 befe0446d4a..c2d568e4b80 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 9d5ed1fe8f1..00d72319a69 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 0d8bd1f5f59..07b32f95f67 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 2b745add0af..4cb4561abe2 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 938ad1c8da9..b7012234a08 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 afbf24b8a22..61b13533570 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 5470dcaa409..f1e74bf1e46 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 e9f974616fc..3f35ab6a653 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 26b0d6fb5d8..cf75f7c9445 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 daef598fe3a..e5987dc9559 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 7ac8563f778..e0f0b0f2053 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 ec36b96f9f8..82c20ec0769 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 a3b9e2134d7..9f92d2b3a38 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 d165c485a8f..114bd2832d2 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 108a5620181..791f3793cb5 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 432b40a385d..37c5b23285b 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 372f5b8fe04..bc4ff7ffab3 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 ef414f33d68..422ae90d3b8 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 128d50c3f03..d24b43d5ed6 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 67f71c76782..97f75c86dda 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 197dc534477..8b20d7f0941 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 57d1a5862ee..5aa09239e14 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 7ba7de5a523..534e1ce01ca 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 f6725565fc8..c4e879ae995 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 64435b68570..f7ba1546f97 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 9f42e28f2fa..0adf69e676e 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 75a01e3dee8..6efeb9a7872 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 00000000000..1fd715f3f14
--- /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 559aefad1dc..af29f5c9e7a 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 837edc52f03..8b05311d14d 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 800e2d5fa1d..c4365f56e89 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 5c2886e4968..364759f48e2 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 00000000000..99f1f2e4735
--- /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 2556f7bab69..de0f9c174f3 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 fac002ead0c..b527aedf20b 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 fa243f3bdf1..d61f6b07be1 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 c5adca61568..a3fb56284bd 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 371b7835062..45a9a512fc0 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 6c0dd1eb4f9..7204328fc89 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 75d6046477f..9c433255529 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 a6a6e6a494d..1e23482bd9c 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 a9306665853..3bb58da7067 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 632b4be2e00..f55669e6993 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 8ad604af2b6..47357f61588 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 e86ab8fc5da..4560f080ddd 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 c4d04e6f6fa..3fba42202fe 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 5170901cec3..74414d77add 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 45a96f3718e..59d81989169 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 fce1e5b8a45..47e282a63e8 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 35a72109094..a0a1f019d81 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 db0e3586671..3ea543b0004 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 ae29e2cf1c7..146af3287ee 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 857b0cffa90..6227389dfb1 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 bcc9aa57f93..d9132eb2997 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 17b1d599779..bf6c9452502 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 2916e4fcdff..48870526b65 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 8a57a1cdd5e..087d6c07427 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 18a76f8e6ff..ef06e4d9e73 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 2f14974794e..fa8036ac0c7 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 96d8b286c0e..98351c3eb9d 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 6868e7e2a8b..c46a3dde4ad 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 9fca5b0310b..c8e7a591f8c 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 fa0afeab0be..e8bb843a7c8 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 a7fcdd30ad5..cf5dd3ae557 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 8ca497627cc..5a9f2f5bb08 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 00000000000..603573e9f99
--- /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 c5700c9b763..08f1eacf23b 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 2ec538c5dae..4e7724357e8 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 329db7acc08..d3a24743246 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 8bf418c1445..2a0c429f54e 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 db4a33d9be0..567a7fac160 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 c4c4695e8be..19c1626f487 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 d9e2b49aa81..52533d39e49 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 fa87e19d3a4..c8108d4a107 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 a5e32358a31..af87968d14a 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 005497a8fa4..14aeee17ba6 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 00000000000..074cc52aaa4
--- /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 2beb1a96edf..2429a2205a2 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 ff52e9e6a07..b0b588d04a1 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 e272d48cf0d..294687560d5 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 4946eb510dd..2775c77d79c 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 3bd1fcadb75..038a4c6f701 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 e5dc2bb1710..438831aac74 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 817770d4455..e85504879ae 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 85fa3e76334..7ce3ae227f9 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 52f17cf2ec8..ff7e85735b4 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 ebc9b3b5662..c3b568a7336 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 9bddbc85da5..721c27153e5 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 f5c2edcb720..59552599264 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 4aaa6b6be13..f61207d5b57 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 121988a3def..f78ed803a59 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 b326d1a5837..f6bf08a97e5 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 ff52c014531..8e4bea9b30e 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 2b7e243a476..3efa9b66074 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 967b02cb3d0..9a67034b34c 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 9b51e661bfd..f2f4e22231e 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 14fb2216dad..a42d77f660d 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 a8fa2a6c6ba..395d83d0f1e 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 52689f388b5..c51fbf77013 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 7b41acff15d..9eae261142d 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 0316fce5b92..1b38c173ce0 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 dae6c43d213..c312855b6bb 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 db721a77afb..a36fd79ef3f 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 c55c2e0e687..cf29c50f64f 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 dabdd735658..8d6de64ab2c 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 17d8746ce70..15bbe41e9b4 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 9d3b94558c8..07e026d2c2f 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 e230675efaa..b896e4ebe4f 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 442b5ed138a..3e0f6a96aaa 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 076df41d63f..4e67ade9dde 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 78d67400748..2890381c264 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 572450a9704..7e244b29bae 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 3ee8615f57c..f3d8ff2fa8f 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 c58dfa6202b..a2e3736712a 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 63dc0ede9b2..c75371329f0 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 e8abc62ef04..32f95fa8345 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 38edc7a55da..767c88cd8a6 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 cee2263dd67..bcd5c9c3ec5 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 ebf1ad38367..2ac8010f06d 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 44a59bb5263..43e974c180d 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 21bffad3329..b0098336e21 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 4528c568690..4efdf344f38 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 95a19cba751..ae9f92a9414 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 77b1b2aaf30..693c03a89f4 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 2bfbb9edb4c..683083c66cf 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 3d942938467..6c041955bb5 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 4af8d8947ca..21c243e7d97 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 c2e2faab188..2ae22b6a2bd 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 2d73bc707f5..ea61d7186ae 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 8cb68360735..1b60714649f 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 7c2b75fe8af..571f3b9adca 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 84ebd083410..fc203c2dbaa 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 8f19639fb51..a37846446aa 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 f4be6a52a8d..3537d0effcb 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 410ac2772ab..98839fa6748 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 6a472da41ae..fdbf0e7ff7c 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 70a26741f40..0222983fc21 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 95c68678521..e31da4be744 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 96fdc5103f3..d6d7fa4cba4 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 92263d13945..96691e8f9e8 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 3e48ed79fe5..a83aa868cdc 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 790edcc16d3..8ccaed5ee13 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 65c7dd5adb9..0669698ed2b 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 66fdc3c591e..162b7bcaf8d 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 6212b89f9bc..a2d8b85a34f 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 b15712de301..c33fd21e5e4 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 2bfcf2f74d3..902d75278d4 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 00000000000..06f8236b892
--- /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 1a46253ed9f..e1c66fdf6d2 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 275b74c92a2..597abd5ba8c 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 0edf5c5e85b..7f8c4c3bb46 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 866e5529225..2656d3b91fc 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 00000000000..b50d4fbc8a6
--- /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 caf174d6d4b..2af6b820e00 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 4643c7af835..4adcdd278cf 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 89526f7051f..3a11693e9b1 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 091d89c80e1..d08e8a6fbed 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 0b7e553a7d1..55b12169e27 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 298c740defa..18688309ecd 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 2022b10d5d5..9952acb6820 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 d85647271ce..62308d48c8a 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 9651e4efd43..8ff85083ffd 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 b7724aaed7d..63c46155bd6 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 7154338bc7a..240760a67d3 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 0b56063d59f..fc4828d0edb 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 69fbc69ba9e..4ee6344ea27 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 e5d081ceaa4..46d4794bbe6 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 43a58a870c3..490ce5cf952 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 3745b38f17e..ceae8a93424 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 487e5275516..c924c45e559 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 8820ad5f253..34edef40063 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 0019338c2bc..8ed163b7621 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 e654924727b..2bf06af9a63 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 98b9b31821a..19408e88f66 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 b94fef7543a..abd3db17c9c 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 61052164aee..d905b1d6404 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 9c94769ef70..f3dee3f395b 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 bcdd005b2fb..48ffddb7b02 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 9a982a0cb28..fd4a0d07930 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 b54a5c3e1a1..05898df5126 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 00a236f5544..c17549e2b1b 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 ec2e16403f7..a9a8903953b 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 361f043de97..df83e514618 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 7239da64e29..21305dee99b 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 8291a671896..9f54921c695 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 11caf2a0c0b..48f8ea5e01c 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 61841ab2acb..79b04d0931d 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 00000000000..2eb90df6644
--- /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 67b92d6ef0d..ec115ac670e 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 a7665403245..59ccb034d64 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 8eeb087512f..5b4cfeb945b 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 7126a23ed42..697c8d66329 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 fac8c8653bf..38fcd7262bb 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 9dff8542047..6f7f55b9402 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 a1572ab7f9e..69073964b8e 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 919d7c0d5a6..b7dbd3ba66d 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 42994360b37..45cd46414d5 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 6c8aaa4c9cf..0a1045ece2a 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 00000000000..f8c4ff1a6c9
--- /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 6bd3ec317cd..c5959830948 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 cfe0400fcee..128755642ee 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 9463845b34a..bfed83072ae 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 d1507e114f0..0c9d1876520 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 dc34ae0012b..133ae47f409 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 d545f497297..494be2ebd84 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 8c092a8465b..547a45679b6 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 ba15e0f576a..b3d3d685d65 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 cc0c203d2ea..f21755a58ee 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 cec68e36cf5..e1d318d0311 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 d447437eb16..ce3245015e5 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 8df06216926..8e20abb6457 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 f81248b1517..8907e705a98 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 f34053a9bcb..ac59550d539 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 ee182f6298c..e014a9f0b15 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 8a6ce429abf..a06f65e3f18 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 ad9d92251b4..af618a80517 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 f3b94113824..f1fe6af1581 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 b74b45db122..bfc1af2691c 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 3680a34b42a..14918e6e47d 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 1c62f3606b8..d3b7bff446e 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 bf39e456cf0..d211c69d25d 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 c63cb8cba8f..9e464a1404d 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 87073fe5be2..06aba4d7044 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 33876844024..df7fef9ecd2 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 a0325e55679..3638a780a82 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 e7978b7d1bf..5c51dc41ae8 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 9e498660c0b..fa7414066b2 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 8d6e394ecb3..24ef5a00970 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 abf57b0733d..3fa565f40fe 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 16cfebae337..e19eb56a55c 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 dc53745dea5..003ad25d878 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 e10f99b44bc..059c5eaac60 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 00000000000..25122fc35f4
--- /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 00000000000..a4bd764cc87
--- /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()