File tree Expand file tree Collapse file tree
src/openapi_python_generator Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -28,6 +28,7 @@ class Formatter(str, Enum):
2828 BLACK = "black"
2929 NONE = "none"
3030
31+
3132class FormatOptions :
3233 skip_validation : bool = False
3334 line_length : int = 120
Original file line number Diff line number Diff line change 1- from typing import List
1+ from typing import List , Union
22from typing import Optional
33
4- from openapi_pydantic .v3 .v3_0 import Operation , PathItem , Schema
4+ from openapi_pydantic .v3 .v3_0 import (
5+ Operation as Operation30 ,
6+ PathItem as PathItem30 ,
7+ Schema as Schema30 ,
8+ )
9+ from openapi_pydantic .v3 .v3_1 import (
10+ Operation as Operation31 ,
11+ PathItem as PathItem31 ,
12+ Schema as Schema31 ,
13+ )
514from pydantic import BaseModel
615
16+ # Type unions for compatibility with both OpenAPI 3.0 and 3.1
17+ Operation = Union [Operation30 , Operation31 ]
18+ PathItem = Union [PathItem30 , PathItem31 ]
19+ Schema = Union [Schema30 , Schema31 ]
20+
721
822class LibraryConfig (BaseModel ):
923 name : str
You can’t perform that action at this time.
0 commit comments