pyopenapi-gen 2.7.2__py3-none-any.whl → 2.7.4__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- pyopenapi_gen/__init__.py +1 -1
- pyopenapi_gen/visit/model/model_visitor.py +10 -1
- {pyopenapi_gen-2.7.2.dist-info → pyopenapi_gen-2.7.4.dist-info}/METADATA +1 -1
- {pyopenapi_gen-2.7.2.dist-info → pyopenapi_gen-2.7.4.dist-info}/RECORD +7 -7
- {pyopenapi_gen-2.7.2.dist-info → pyopenapi_gen-2.7.4.dist-info}/WHEEL +0 -0
- {pyopenapi_gen-2.7.2.dist-info → pyopenapi_gen-2.7.4.dist-info}/entry_points.txt +0 -0
- {pyopenapi_gen-2.7.2.dist-info → pyopenapi_gen-2.7.4.dist-info}/licenses/LICENSE +0 -0
pyopenapi_gen/__init__.py
CHANGED
|
@@ -50,7 +50,7 @@ __all__ = [
|
|
|
50
50
|
]
|
|
51
51
|
|
|
52
52
|
# Semantic version of the generator core – automatically managed by semantic-release.
|
|
53
|
-
__version__: str = "2.7.
|
|
53
|
+
__version__: str = "2.7.4"
|
|
54
54
|
|
|
55
55
|
# ---------------------------------------------------------------------------
|
|
56
56
|
# Lazy-loading and autocompletion support (This part remains)
|
|
@@ -77,7 +77,16 @@ class ModelVisitor(Visitor[IRSchema, str]):
|
|
|
77
77
|
# --- Model Type Detection Logic ---
|
|
78
78
|
is_enum = bool(schema.name and schema.enum and schema.type in ("string", "integer"))
|
|
79
79
|
|
|
80
|
-
|
|
80
|
+
# Check for discriminated union types (oneOf, anyOf) which should be Union type aliases
|
|
81
|
+
# Note: allOf is for schema composition/merging, not discriminated unions
|
|
82
|
+
is_union_type = bool(schema.name and (schema.one_of or schema.any_of))
|
|
83
|
+
|
|
84
|
+
is_type_alias = bool(
|
|
85
|
+
schema.name
|
|
86
|
+
and not schema.properties
|
|
87
|
+
and not is_enum
|
|
88
|
+
and (schema.type != "object" or is_union_type) # Allow object types if they're union compositions
|
|
89
|
+
)
|
|
81
90
|
|
|
82
91
|
if schema.type == "array" and schema.items and schema.items.type == "object" and schema.items.name is None:
|
|
83
92
|
if is_type_alias:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: pyopenapi-gen
|
|
3
|
-
Version: 2.7.
|
|
3
|
+
Version: 2.7.4
|
|
4
4
|
Summary: Modern, async-first Python client generator for OpenAPI specifications with advanced cycle detection and unified type resolution
|
|
5
5
|
Project-URL: Homepage, https://github.com/your-org/pyopenapi-gen
|
|
6
6
|
Project-URL: Documentation, https://github.com/your-org/pyopenapi-gen/blob/main/README.md
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
pyopenapi_gen/__init__.py,sha256=
|
|
1
|
+
pyopenapi_gen/__init__.py,sha256=zuPT808r7WFgX96LDB9lbpItlNt_2LTfDrwNuStMMiE,7632
|
|
2
2
|
pyopenapi_gen/__main__.py,sha256=4-SCaCNhBd7rtyRK58uoDbdl93J0KhUeajP_b0CPpLE,110
|
|
3
3
|
pyopenapi_gen/cli.py,sha256=TA3bpe8kmUuyA4lZqAHHx5YkWQvrNq81WuEDAtPO6JQ,2147
|
|
4
4
|
pyopenapi_gen/http_types.py,sha256=EMMYZBt8PNVZKPFu77TQija-JI-nOKyXvpiQP9-VSWE,467
|
|
@@ -129,9 +129,9 @@ pyopenapi_gen/visit/model/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJW
|
|
|
129
129
|
pyopenapi_gen/visit/model/alias_generator.py,sha256=wEMHipPA1_CFxvQ6CS9j4qgXK93seI1bI_tFJvIrb70,3563
|
|
130
130
|
pyopenapi_gen/visit/model/dataclass_generator.py,sha256=NVQY3PNptVJn31zJv3pysPT8skLLoPObcQ906NvJ6gs,21869
|
|
131
131
|
pyopenapi_gen/visit/model/enum_generator.py,sha256=AXqKUFuWUUjUF_6_HqBKY8vB5GYu35Pb2C2WPFrOw1k,10061
|
|
132
|
-
pyopenapi_gen/visit/model/model_visitor.py,sha256=
|
|
133
|
-
pyopenapi_gen-2.7.
|
|
134
|
-
pyopenapi_gen-2.7.
|
|
135
|
-
pyopenapi_gen-2.7.
|
|
136
|
-
pyopenapi_gen-2.7.
|
|
137
|
-
pyopenapi_gen-2.7.
|
|
132
|
+
pyopenapi_gen/visit/model/model_visitor.py,sha256=Xrlk0Re5PN7XhaO3R3q2G4Qf0p8kkZeWlBkyCuaLS98,9857
|
|
133
|
+
pyopenapi_gen-2.7.4.dist-info/METADATA,sha256=q7XtojZUBPDVkB5bQ1iN2T60pbxcT1YgHe58AdWHxDw,39057
|
|
134
|
+
pyopenapi_gen-2.7.4.dist-info/WHEEL,sha256=WLgqFyCfm_KASv4WHyYy0P3pM_m7J5L9k2skdKLirC8,87
|
|
135
|
+
pyopenapi_gen-2.7.4.dist-info/entry_points.txt,sha256=gxSlNiwom50T3OEZnlocA6qRjGdV0bn6hN_Xr-Ub5wA,56
|
|
136
|
+
pyopenapi_gen-2.7.4.dist-info/licenses/LICENSE,sha256=UFAyTWKa4w10-QerlJaHJeep7G2gcwpf-JmvI2dS2Gc,1088
|
|
137
|
+
pyopenapi_gen-2.7.4.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|