jararaca 0.3.13__py3-none-any.whl → 0.3.14__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.
Potentially problematic release.
This version of jararaca might be problematic. Click here for more details.
- jararaca/tools/typescript/interface_parser.py +21 -1
- {jararaca-0.3.13.dist-info → jararaca-0.3.14.dist-info}/METADATA +1 -1
- {jararaca-0.3.13.dist-info → jararaca-0.3.14.dist-info}/RECORD +7 -7
- pyproject.toml +1 -1
- {jararaca-0.3.13.dist-info → jararaca-0.3.14.dist-info}/LICENSE +0 -0
- {jararaca-0.3.13.dist-info → jararaca-0.3.14.dist-info}/WHEEL +0 -0
- {jararaca-0.3.13.dist-info → jararaca-0.3.14.dist-info}/entry_points.txt +0 -0
|
@@ -26,7 +26,7 @@ from uuid import UUID
|
|
|
26
26
|
from fastapi import Request, Response, UploadFile
|
|
27
27
|
from fastapi.params import Body, Cookie, Depends, Form, Header, Path, Query
|
|
28
28
|
from fastapi.security.http import HTTPBase
|
|
29
|
-
from pydantic import BaseModel, PlainValidator
|
|
29
|
+
from pydantic import BaseModel, PlainValidator, RootModel
|
|
30
30
|
from pydantic_core import PydanticUndefined
|
|
31
31
|
|
|
32
32
|
from jararaca.microservice import Microservice
|
|
@@ -314,6 +314,26 @@ def get_field_type_for_ts(field_type: Any, context_suffix: str = "") -> Any:
|
|
|
314
314
|
field_type: The Python type to convert
|
|
315
315
|
context_suffix: Suffix for split models (e.g., "Input", "Output")
|
|
316
316
|
"""
|
|
317
|
+
# Handle RootModel types - use the wrapped type directly
|
|
318
|
+
if inspect.isclass(field_type) and issubclass(field_type, RootModel):
|
|
319
|
+
# For concrete RootModel subclasses, get the wrapped type from annotations
|
|
320
|
+
if (
|
|
321
|
+
hasattr(field_type, "__annotations__")
|
|
322
|
+
and "root" in field_type.__annotations__
|
|
323
|
+
):
|
|
324
|
+
wrapped_type = field_type.__annotations__["root"]
|
|
325
|
+
return get_field_type_for_ts(wrapped_type, context_suffix)
|
|
326
|
+
|
|
327
|
+
# For parameterized RootModel[T] types, get the type from pydantic metadata
|
|
328
|
+
if hasattr(field_type, "__pydantic_generic_metadata__"):
|
|
329
|
+
metadata = field_type.__pydantic_generic_metadata__
|
|
330
|
+
if metadata.get("origin") is RootModel and metadata.get("args"):
|
|
331
|
+
# Get the first (and only) type argument
|
|
332
|
+
wrapped_type = metadata["args"][0]
|
|
333
|
+
return get_field_type_for_ts(wrapped_type, context_suffix)
|
|
334
|
+
|
|
335
|
+
return "unknown"
|
|
336
|
+
|
|
317
337
|
if field_type is Response:
|
|
318
338
|
return "unknown"
|
|
319
339
|
if field_type is Any:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
2
2
|
README.md,sha256=2qMM__t_MoLKZr4IY9tXjo-Jn6LKjuHMb1qbyXpgL08,3401
|
|
3
|
-
pyproject.toml,sha256=
|
|
3
|
+
pyproject.toml,sha256=IfsmxqO5BSGKKD-BllRRLcf9hrjv2Oxmup2_3dq5iWk,2057
|
|
4
4
|
jararaca/__init__.py,sha256=qWLfavFIGRC3dfcTmiNP3kDh1Iih9wPMTTUOtLjtT_M,22186
|
|
5
5
|
jararaca/__main__.py,sha256=-O3vsB5lHdqNFjUtoELDF81IYFtR-DSiiFMzRaiSsv4,67
|
|
6
6
|
jararaca/broker_backend/__init__.py,sha256=GzEIuHR1xzgCJD4FE3harNjoaYzxHMHoEL0_clUaC-k,3528
|
|
@@ -70,12 +70,12 @@ jararaca/tools/app_config/decorators.py,sha256=-ckkMZ1dswOmECdo1rFrZ15UAku--txaN
|
|
|
70
70
|
jararaca/tools/app_config/interceptor.py,sha256=HV8h4AxqUc_ACs5do4BSVlyxlRXzx7HqJtoVO9tfRnQ,2611
|
|
71
71
|
jararaca/tools/typescript/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
72
72
|
jararaca/tools/typescript/decorators.py,sha256=y1zBq8mBZ8CBXlZ0nKy2RyIgCvP9kp4elACbaC6dptQ,2946
|
|
73
|
-
jararaca/tools/typescript/interface_parser.py,sha256=
|
|
73
|
+
jararaca/tools/typescript/interface_parser.py,sha256=iSkE6fEAdWejIOsiOy4xCxGv9HYs1BeaDZB7RzzwwCQ,54988
|
|
74
74
|
jararaca/utils/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
|
75
75
|
jararaca/utils/rabbitmq_utils.py,sha256=ytdAFUyv-OBkaVnxezuJaJoLrmN7giZgtKeet_IsMBs,10918
|
|
76
76
|
jararaca/utils/retry.py,sha256=DzPX_fXUvTqej6BQ8Mt2dvLo9nNlTBm7Kx2pFZ26P2Q,4668
|
|
77
|
-
jararaca-0.3.
|
|
78
|
-
jararaca-0.3.
|
|
79
|
-
jararaca-0.3.
|
|
80
|
-
jararaca-0.3.
|
|
81
|
-
jararaca-0.3.
|
|
77
|
+
jararaca-0.3.14.dist-info/LICENSE,sha256=OXLcl0T2SZ8Pmy2_dmlvKuetivmyPd5m1q-Gyd-zaYY,35149
|
|
78
|
+
jararaca-0.3.14.dist-info/METADATA,sha256=_PnQKjQqxnI81jI9mjdmzzoEh_O1pB5PVd1dOVInuHM,5033
|
|
79
|
+
jararaca-0.3.14.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
|
80
|
+
jararaca-0.3.14.dist-info/entry_points.txt,sha256=WIh3aIvz8LwUJZIDfs4EeH3VoFyCGEk7cWJurW38q0I,45
|
|
81
|
+
jararaca-0.3.14.dist-info/RECORD,,
|
pyproject.toml
CHANGED
|
File without changes
|
|
File without changes
|
|
File without changes
|