fastapi-voyager 0.11.6__py3-none-any.whl → 0.11.7__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/version.py +1 -1
- fastapi_voyager/voyager.py +5 -2
- {fastapi_voyager-0.11.6.dist-info → fastapi_voyager-0.11.7.dist-info}/METADATA +3 -1
- {fastapi_voyager-0.11.6.dist-info → fastapi_voyager-0.11.7.dist-info}/RECORD +7 -7
- {fastapi_voyager-0.11.6.dist-info → fastapi_voyager-0.11.7.dist-info}/WHEEL +0 -0
- {fastapi_voyager-0.11.6.dist-info → fastapi_voyager-0.11.7.dist-info}/entry_points.txt +0 -0
- {fastapi_voyager-0.11.6.dist-info → fastapi_voyager-0.11.7.dist-info}/licenses/LICENSE +0 -0
fastapi_voyager/version.py
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
__all__ = ["__version__"]
|
|
2
|
-
__version__ = "0.11.
|
|
2
|
+
__version__ = "0.11.7"
|
fastapi_voyager/voyager.py
CHANGED
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
from pydantic import BaseModel
|
|
2
2
|
from fastapi import FastAPI, routing
|
|
3
|
+
from typing import Callable
|
|
3
4
|
from fastapi_voyager.type_helper import (
|
|
4
5
|
get_core_types,
|
|
5
6
|
full_class_name,
|
|
@@ -27,7 +28,8 @@ class Voyager:
|
|
|
27
28
|
module_color: dict[str, str] | None = None,
|
|
28
29
|
route_name: str | None = None,
|
|
29
30
|
hide_primitive_route: bool = False,
|
|
30
|
-
show_module: bool = True
|
|
31
|
+
show_module: bool = True,
|
|
32
|
+
route_name_fn: Callable | None = None
|
|
31
33
|
):
|
|
32
34
|
|
|
33
35
|
self.routes: list[Route] = []
|
|
@@ -50,6 +52,7 @@ class Voyager:
|
|
|
50
52
|
self.route_name = route_name
|
|
51
53
|
self.hide_primitive_route = hide_primitive_route
|
|
52
54
|
self.show_module = show_module
|
|
55
|
+
self.route_name_fn = route_name_fn
|
|
53
56
|
|
|
54
57
|
|
|
55
58
|
def _get_available_route(self, app: FastAPI):
|
|
@@ -123,7 +126,7 @@ class Voyager:
|
|
|
123
126
|
id=route_id,
|
|
124
127
|
name=route_name,
|
|
125
128
|
module=route_module,
|
|
126
|
-
unique_id=route.unique_id,
|
|
129
|
+
unique_id=self.route_name_fn(route) if self.route_name_fn else route.unique_id,
|
|
127
130
|
response_schema=get_type_name(route.response_model),
|
|
128
131
|
is_primitive=is_primitive_response
|
|
129
132
|
)
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fastapi-voyager
|
|
3
|
-
Version: 0.11.
|
|
3
|
+
Version: 0.11.7
|
|
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
|
|
@@ -274,6 +274,8 @@ or you can open router_viz.dot with vscode extension `graphviz interactive previ
|
|
|
274
274
|
- 0.11.6
|
|
275
275
|
- [x] flag of loading full graph in first render or not
|
|
276
276
|
- [x] optimize loading static resource
|
|
277
|
+
- 0.11.7
|
|
278
|
+
- [x] fix swagger link
|
|
277
279
|
|
|
278
280
|
#### 0.12
|
|
279
281
|
- [ ] add tests
|
|
@@ -6,8 +6,8 @@ fastapi_voyager/render.py,sha256=vdwqIync2wsP8gMPY0v_XjRhdPBtbKyRT8yTBa_Ep3Y,874
|
|
|
6
6
|
fastapi_voyager/server.py,sha256=upc38XFWr3UqAxbst-EAqf3_uaA9eS0Q_pzn3gE59jk,7143
|
|
7
7
|
fastapi_voyager/type.py,sha256=VmcTB1G-LOT70EWCzi4LU_FUkSGWUIBJX15T_J5HnOo,1764
|
|
8
8
|
fastapi_voyager/type_helper.py,sha256=QqP4c642vEkoWTZAtl_Vvt-kys3MkVDp4BNkLrw5mHQ,9477
|
|
9
|
-
fastapi_voyager/version.py,sha256=
|
|
10
|
-
fastapi_voyager/voyager.py,sha256=
|
|
9
|
+
fastapi_voyager/version.py,sha256=FDsWNAszzeAI5uYptGQNcnHKwUJ5yQ8avSPu41kgadI,49
|
|
10
|
+
fastapi_voyager/voyager.py,sha256=Ocj4gKK8S3QMBlJYUmqRzSEKjGLV1lBuNsljEKYLV5M,13673
|
|
11
11
|
fastapi_voyager/web/graph-ui.js,sha256=DTedkpZNbtufexONVkJ8mOwF_-VnvxoReYHtox6IKR4,5842
|
|
12
12
|
fastapi_voyager/web/graphviz.svg.css,sha256=zDCjjpT0Idufu5YOiZI76PL70-avP3vTyzGPh9M85Do,1563
|
|
13
13
|
fastapi_voyager/web/graphviz.svg.js,sha256=lvAdbjHc-lMSk4GQp-iqYA2PCFX4RKnW7dFaoe0LUHs,16005
|
|
@@ -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.7.dist-info/METADATA,sha256=M0F4nnUPt_wY5cot9IIf_fpFieR80iMDwN8nBmwblfk,9780
|
|
30
|
+
fastapi_voyager-0.11.7.dist-info/WHEEL,sha256=qtCwoSJWgHk21S1Kb4ihdzI2rlJ1ZKaIurTj_ngOhyQ,87
|
|
31
|
+
fastapi_voyager-0.11.7.dist-info/entry_points.txt,sha256=pEIKoUnIDXEtdMBq8EmXm70m16vELIu1VPz9-TBUFWM,53
|
|
32
|
+
fastapi_voyager-0.11.7.dist-info/licenses/LICENSE,sha256=lNVRR3y_bFVoFKuK2JM8N4sFaj3m-7j29kvL3olFi5Y,1067
|
|
33
|
+
fastapi_voyager-0.11.7.dist-info/RECORD,,
|
|
File without changes
|
|
File without changes
|
|
File without changes
|