Skip to content

Commit 867f497

Browse files
committed
[FIX] anyof/oneof imports
1 parent 1a1736b commit 867f497

28 files changed

Lines changed: 28 additions & 28 deletions

File tree

modules/openapi-generator/src/main/resources/python/model_anyof.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import pprint
44
{{{.}}}
55
{{/vendorExtensions.x-py-model-imports}}
66
from pydantic import Field, RootModel
7-
from typing import Any, Dict, Union, Self
7+
from typing import Any, Dict, List, Union, Self
88

99
{{#lambda.uppercase}}{{{classname}}}{{/lambda.uppercase}}_ANY_OF_SCHEMAS = [{{#anyOf}}"{{.}}"{{^-last}}, {{/-last}}{{/anyOf}}]
1010

modules/openapi-generator/src/main/resources/python/model_oneof.mustache

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import pprint
44
{{{.}}}
55
{{/vendorExtensions.x-py-model-imports}}
66
from pydantic import Field, RootModel
7-
from typing import Any, Dict, Union, Self
7+
from typing import Any, Dict, List, Union, Self
88

99

1010
{{#lambda.uppercase}}{{{classname}}}{{/lambda.uppercase}}_ONE_OF_SCHEMAS = [{{#oneOf}}"{{.}}"{{^-last}}, {{/-last}}{{/oneOf}}]

samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/any_of_color.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from __future__ import annotations
1616
import pprint
1717
from pydantic import Field, RootModel
18-
from typing import Any, Dict, Union, Self
18+
from typing import Any, Dict, List, Union, Self
1919

2020
ANYOFCOLOR_ANY_OF_SCHEMAS = ["List[int]", "str"]
2121

samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/any_of_pig.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from petstore_api.models.basque_pig import BasquePig
1818
from petstore_api.models.danish_pig import DanishPig
1919
from pydantic import Field, RootModel
20-
from typing import Any, Dict, Union, Self
20+
from typing import Any, Dict, List, Union, Self
2121

2222
ANYOFPIG_ANY_OF_SCHEMAS = ["BasquePig", "DanishPig"]
2323

samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/color.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from __future__ import annotations
1616
import pprint
1717
from pydantic import Field, RootModel
18-
from typing import Any, Dict, Union, Self
18+
from typing import Any, Dict, List, Union, Self
1919

2020

2121
COLOR_ONE_OF_SCHEMAS = ["List[int]", "str"]

samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/int_or_string.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from __future__ import annotations
1616
import pprint
1717
from pydantic import Field, RootModel
18-
from typing import Any, Dict, Union, Self
18+
from typing import Any, Dict, List, Union, Self
1919

2020

2121
INTORSTRING_ONE_OF_SCHEMAS = ["int", "str"]

samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/pig.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from petstore_api.models.basque_pig import BasquePig
1818
from petstore_api.models.danish_pig import DanishPig
1919
from pydantic import Field, RootModel
20-
from typing import Any, Dict, Union, Self
20+
from typing import Any, Dict, List, Union, Self
2121

2222

2323
PIG_ONE_OF_SCHEMAS = ["BasquePig", "DanishPig"]

samples/openapi3/client/petstore/python-aiohttp/petstore_api/models/task_activity.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@
1818
from petstore_api.models.feeding import Feeding
1919
from petstore_api.models.poop_cleaning import PoopCleaning
2020
from pydantic import Field, RootModel
21-
from typing import Any, Dict, Union, Self
21+
from typing import Any, Dict, List, Union, Self
2222

2323

2424
TASKACTIVITY_ONE_OF_SCHEMAS = ["Bathing", "Feeding", "PoopCleaning"]

samples/openapi3/client/petstore/python-httpx/petstore_api/models/any_of_color.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@
1515
from __future__ import annotations
1616
import pprint
1717
from pydantic import Field, RootModel
18-
from typing import Any, Dict, Union, Self
18+
from typing import Any, Dict, List, Union, Self
1919

2020
ANYOFCOLOR_ANY_OF_SCHEMAS = ["List[int]", "str"]
2121

samples/openapi3/client/petstore/python-httpx/petstore_api/models/any_of_pig.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
from petstore_api.models.basque_pig import BasquePig
1818
from petstore_api.models.danish_pig import DanishPig
1919
from pydantic import Field, RootModel
20-
from typing import Any, Dict, Union, Self
20+
from typing import Any, Dict, List, Union, Self
2121

2222
ANYOFPIG_ANY_OF_SCHEMAS = ["BasquePig", "DanishPig"]
2323

0 commit comments

Comments
 (0)