File tree Expand file tree Collapse file tree 2 files changed +4
-4
lines changed
modules/openapi-generator/src/main/resources Expand file tree Collapse file tree 2 files changed +4
-4
lines changed Original file line number Diff line number Diff line change @@ -17,7 +17,7 @@ from typing import TYPE_CHECKING
17
17
from importlib import import_module
18
18
if TYPE_CHECKING:
19
19
{ {#mappedModels} }
20
- from { {packageName} }.models.{ {model.classVarName } } import { {modelName} }
20
+ from { {packageName} }.models.{ {model.classFilename } } import { {modelName} }
21
21
{ {/mappedModels} }
22
22
23
23
{ {/discriminator} }
@@ -238,7 +238,7 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}}
238
238
object_type = cls.get_discriminator_value(obj)
239
239
{ {#mappedModels} }
240
240
if object_type == '{ {{modelName} }}':
241
- return import_module("{ {packageName} }.models.{ {model.classVarName } }").{ {modelName} }.from_dict(obj)
241
+ return import_module("{ {packageName} }.models.{ {model.classFilename } }").{ {modelName} }.from_dict(obj)
242
242
{ {/mappedModels} }
243
243
raise ValueError("{ {{classname} }} failed to lookup discriminator value from " +
244
244
json.dumps(obj) + ". Discriminator property name: " + cls.__discriminator_property_name +
Original file line number Diff line number Diff line change @@ -18,7 +18,7 @@ from typing_extensions import Self
18
18
from typing import TYPE_CHECKING
19
19
if TYPE_CHECKING:
20
20
{ {#mappedModels} }
21
- from { {packageName} }.models.{ {model.classVarName } } import { {modelName} }
21
+ from { {packageName} }.models.{ {model.classFilename } } import { {modelName} }
22
22
{ {/mappedModels} }
23
23
24
24
{ {/discriminator} }
@@ -261,7 +261,7 @@ class {{classname}}({{#parent}}{{{.}}}{{/parent}}{{^parent}}BaseModel{{/parent}}
261
261
object_type = cls.get_discriminator_value(obj)
262
262
{ {#mappedModels} }
263
263
if object_type == '{ {{modelName} }}':
264
- return import_module("{ {packageName} }.models.{ {model.classVarName } }").{ {modelName} }.from_dict(obj)
264
+ return import_module("{ {packageName} }.models.{ {model.classFilename } }").{ {modelName} }.from_dict(obj)
265
265
{ {/mappedModels} }
266
266
267
267
raise ValueError("{ {{classname} }} failed to lookup discriminator value from " +
You can’t perform that action at this time.
0 commit comments