fastapi-voyager 0.11.9__py3-none-any.whl → 0.11.10__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.
- fastapi_voyager/type_helper.py +6 -9
- fastapi_voyager/version.py +1 -1
- {fastapi_voyager-0.11.9.dist-info → fastapi_voyager-0.11.10.dist-info}/METADATA +3 -1
- {fastapi_voyager-0.11.9.dist-info → fastapi_voyager-0.11.10.dist-info}/RECORD +7 -7
- {fastapi_voyager-0.11.9.dist-info → fastapi_voyager-0.11.10.dist-info}/WHEEL +0 -0
- {fastapi_voyager-0.11.9.dist-info → fastapi_voyager-0.11.10.dist-info}/entry_points.txt +0 -0
- {fastapi_voyager-0.11.9.dist-info → fastapi_voyager-0.11.10.dist-info}/licenses/LICENSE +0 -0
fastapi_voyager/type_helper.py
CHANGED
|
@@ -232,27 +232,24 @@ def safe_issubclass(kls, classinfo):
|
|
|
232
232
|
try:
|
|
233
233
|
return issubclass(kls, classinfo)
|
|
234
234
|
except TypeError:
|
|
235
|
-
|
|
235
|
+
# may raise error for corner case such as ForwardRef
|
|
236
|
+
print(str(kls), 'is not a target class')
|
|
236
237
|
return False
|
|
237
238
|
|
|
238
239
|
|
|
239
240
|
def update_forward_refs(kls):
|
|
240
241
|
# TODO: refactor
|
|
241
|
-
def update_pydantic_forward_refs(
|
|
242
|
+
def update_pydantic_forward_refs(pydantic_kls: Type[BaseModel]):
|
|
242
243
|
"""
|
|
243
244
|
recursively update refs.
|
|
244
245
|
"""
|
|
245
246
|
|
|
246
|
-
|
|
247
|
-
setattr(
|
|
247
|
+
pydantic_kls.model_rebuild()
|
|
248
|
+
setattr(pydantic_kls, const.PYDANTIC_FORWARD_REF_UPDATED, True)
|
|
248
249
|
|
|
249
|
-
values =
|
|
250
|
+
values = pydantic_kls.model_fields.values()
|
|
250
251
|
for field in values:
|
|
251
252
|
update_forward_refs(field.annotation)
|
|
252
|
-
|
|
253
|
-
if safe_issubclass(kls, BaseModel):
|
|
254
|
-
kls.model_rebuild()
|
|
255
|
-
setattr(kls, const.PYDANTIC_FORWARD_REF_UPDATED, True)
|
|
256
253
|
|
|
257
254
|
for shelled_type in get_core_types(kls):
|
|
258
255
|
if getattr(shelled_type, const.PYDANTIC_FORWARD_REF_UPDATED, False):
|
fastapi_voyager/version.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
__all__ = ["__version__"]
|
|
2
|
-
__version__ = "0.11.
|
|
2
|
+
__version__ = "0.11.10"
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fastapi-voyager
|
|
3
|
-
Version: 0.11.
|
|
3
|
+
Version: 0.11.10
|
|
4
4
|
Summary: Visualize FastAPI application's routing tree and dependencies
|
|
5
5
|
Project-URL: Homepage, https://github.com/allmonday/fastapi-voyager
|
|
6
6
|
Project-URL: Source, https://github.com/allmonday/fastapi-voyager
|
|
@@ -277,6 +277,8 @@ or you can open router_viz.dot with vscode extension `graphviz interactive previ
|
|
|
277
277
|
- [x] fix swagger link in another way
|
|
278
278
|
- 0.11.9
|
|
279
279
|
- [x] replace issubclass with safe_issubclass to prevent exception.
|
|
280
|
+
- 0.11.10
|
|
281
|
+
- [x] fix bug during updating forward refs
|
|
280
282
|
|
|
281
283
|
#### 0.12
|
|
282
284
|
- [ ] add tests
|
|
@@ -5,8 +5,8 @@ fastapi_voyager/module.py,sha256=Z2QHNmiLk6ZAJlm2nSmO875Q33TweSg8UxZSzIpU9zY,349
|
|
|
5
5
|
fastapi_voyager/render.py,sha256=vdwqIync2wsP8gMPY0v_XjRhdPBtbKyRT8yTBa_Ep3Y,8744
|
|
6
6
|
fastapi_voyager/server.py,sha256=G48St-leUcEwshIhTYVotxuFWXDAvzjthOCK9AKh9dI,6497
|
|
7
7
|
fastapi_voyager/type.py,sha256=VmcTB1G-LOT70EWCzi4LU_FUkSGWUIBJX15T_J5HnOo,1764
|
|
8
|
-
fastapi_voyager/type_helper.py,sha256=
|
|
9
|
-
fastapi_voyager/version.py,sha256
|
|
8
|
+
fastapi_voyager/type_helper.py,sha256=CxlUIDlM9fo2MP9UDPNkgFOYTeycBAVk3WRYanBMy6I,9448
|
|
9
|
+
fastapi_voyager/version.py,sha256=-MakJnXzJx3P6EPKM_MRAeT0qupzHiUMfwjS2gq2lvY,50
|
|
10
10
|
fastapi_voyager/voyager.py,sha256=nioo56oFDeZ8nwwPWDtaQbkpe4pVssFoBVHCWFhs0K4,13549
|
|
11
11
|
fastapi_voyager/web/graph-ui.js,sha256=DTedkpZNbtufexONVkJ8mOwF_-VnvxoReYHtox6IKR4,5842
|
|
12
12
|
fastapi_voyager/web/graphviz.svg.css,sha256=zDCjjpT0Idufu5YOiZI76PL70-avP3vTyzGPh9M85Do,1563
|
|
@@ -26,8 +26,8 @@ fastapi_voyager/web/icon/favicon-16x16.png,sha256=JC07jEzfIYxBIoQn_FHXvyHuxESdhW
|
|
|
26
26
|
fastapi_voyager/web/icon/favicon-32x32.png,sha256=C7v1h58cfWOsiLp9yOIZtlx-dLasBcq3NqpHVGRmpt4,1859
|
|
27
27
|
fastapi_voyager/web/icon/favicon.ico,sha256=tZolYIXkkBcFiYl1A8ksaXN2VjGamzcSdes838dLvNc,15406
|
|
28
28
|
fastapi_voyager/web/icon/site.webmanifest,sha256=ep4Hzh9zhmiZF2At3Fp1dQrYQuYF_3ZPZxc1KcGBvwQ,263
|
|
29
|
-
fastapi_voyager-0.11.
|
|
30
|
-
fastapi_voyager-0.11.
|
|
31
|
-
fastapi_voyager-0.11.
|
|
32
|
-
fastapi_voyager-0.11.
|
|
33
|
-
fastapi_voyager-0.11.
|
|
29
|
+
fastapi_voyager-0.11.10.dist-info/METADATA,sha256=X_RI_ODfUGnK0XWGptR1coXHtV4ojNMQiyyNJiBfzjk,10713
|
|
30
|
+
fastapi_voyager-0.11.10.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
31
|
+
fastapi_voyager-0.11.10.dist-info/entry_points.txt,sha256=pEIKoUnIDXEtdMBq8EmXm70m16vELIu1VPz9-TBUFWM,53
|
|
32
|
+
fastapi_voyager-0.11.10.dist-info/licenses/LICENSE,sha256=lNVRR3y_bFVoFKuK2JM8N4sFaj3m-7j29kvL3olFi5Y,1067
|
|
33
|
+
fastapi_voyager-0.11.10.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|