Skip to content

Commit f1070a5

Browse files
committed
fix model_<anyof/oneof>.mustache
1 parent 039a1bd commit f1070a5

2 files changed

Lines changed: 3 additions & 8 deletions

File tree

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,12 @@
11
from __future__ import annotations
2-
from inspect import getfullargspec
3-
import json
4-
import pprint
52
import re # noqa: F401
63
{{#vendorExtensions.x-py-other-imports}}
74
{{{.}}}
85
{{/vendorExtensions.x-py-other-imports}}
96
{{#vendorExtensions.x-py-model-imports}}
107
{{{.}}}
118
{{/vendorExtensions.x-py-model-imports}}
12-
from typing import Union, Any, List, Set, TYPE_CHECKING, Optional, Dict, Literal, Self
9+
from typing import Union
1310
from pydantic import Field, RootModel
1411

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

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,12 @@
11
from __future__ import annotations
2-
import json
3-
import pprint
42
{{#vendorExtensions.x-py-other-imports}}
53
{{{.}}}
64
{{/vendorExtensions.x-py-other-imports}}
75
{{#vendorExtensions.x-py-model-imports}}
86
{{{.}}}
97
{{/vendorExtensions.x-py-model-imports}}
10-
from pydantic import BaseModel, ConfigDict, StrictStr, Field, RootModel, model_validator
11-
from typing import Any, Union, List, Set, Optional, Dict, Union, Literal, Self
8+
from pydantic import Field, RootModel
9+
from typing import Union
1210

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

0 commit comments

Comments
 (0)