fastapi-voyager 0.10.3__tar.gz → 0.10.4__tar.gz
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-0.10.3 → fastapi_voyager-0.10.4}/PKG-INFO +10 -2
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/README.md +9 -1
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/version.py +1 -1
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/web/index.html +39 -39
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/web/vue-main.js +4 -3
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/tests/demo.py +5 -1
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/.gitignore +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/.python-version +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/LICENSE +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/pyproject.toml +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/__init__.py +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/cli.py +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/filter.py +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/module.py +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/render.py +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/server.py +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/type.py +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/type_helper.py +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/voyager.py +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/web/component/render-graph.js +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/web/component/route-code-display.js +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/web/component/schema-code-display.js +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/web/component/schema-field-filter.js +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/web/graph-ui.js +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/web/graphviz.svg.css +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/web/graphviz.svg.js +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/web/icon/android-chrome-192x192.png +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/web/icon/android-chrome-512x512.png +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/web/icon/apple-touch-icon.png +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/web/icon/favicon-16x16.png +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/web/icon/favicon-32x32.png +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/web/icon/favicon.ico +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/web/icon/site.webmanifest +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/web/quasar.min.css +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/web/quasar.min.js +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/tests/__init__.py +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/tests/demo_anno.py +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/tests/programatic.py +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/tests/service/__init__.py +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/tests/service/schema.py +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/tests/test_analysis.py +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/tests/test_filter.py +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/tests/test_generic.py +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/tests/test_import.py +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/tests/test_module.py +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/tests/test_type_helper.py +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/uv.lock +0 -0
- {fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/voyager.jpg +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: fastapi-voyager
|
|
3
|
-
Version: 0.10.
|
|
3
|
+
Version: 0.10.4
|
|
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
|
|
@@ -32,7 +32,9 @@ Description-Content-Type: text/markdown
|
|
|
32
32
|
|
|
33
33
|
> This repo is still in early stage, it supports pydantic v2 only
|
|
34
34
|
|
|
35
|
-
Inspect your API interactively!
|
|
35
|
+
Inspect your API interactively!
|
|
36
|
+
|
|
37
|
+
[visit online demo](https://www.newsyeah.fun/voyager/) of project: [composition oriented development pattern](https://github.com/allmonday/composition-oriented-development-pattern)
|
|
36
38
|
|
|
37
39
|
<p align="center"><img src="./voyager.jpg" alt="" /></p>
|
|
38
40
|
<p align="center"><a target="_blank" rel="" href="https://www.youtube.com/watch?v=PGlbQq1M-n8"><img src="http://img.youtube.com/vi/PGlbQq1M-n8/0.jpg" alt="" style="max-width: 100%;"></a></p>
|
|
@@ -170,6 +172,8 @@ or you can open router_viz.dot with vscode extension `graphviz interactive previ
|
|
|
170
172
|
- [ ] optimize static resource (allow manually config url)
|
|
171
173
|
- [ ] improve search dialog
|
|
172
174
|
- [ ] add route/tag list
|
|
175
|
+
- [ ] type alias should not be kept as node instead of compiling to original type
|
|
176
|
+
- [ ] how to correctly handle the generic type ?
|
|
173
177
|
|
|
174
178
|
### in analysis
|
|
175
179
|
- [ ] click field to highlight links
|
|
@@ -240,6 +244,9 @@ or you can open router_viz.dot with vscode extension `graphviz interactive previ
|
|
|
240
244
|
- [x] fix focus in brief-mode
|
|
241
245
|
- [x] ui: adjust focus position
|
|
242
246
|
- [x] refactor naming
|
|
247
|
+
- 0.10.4
|
|
248
|
+
- [x] fix: when focus is on, should ensure changes from other params not broken.
|
|
249
|
+
|
|
243
250
|
|
|
244
251
|
#### 0.11
|
|
245
252
|
- [ ] enable/disable module cluster (to save space)
|
|
@@ -248,6 +255,7 @@ or you can open router_viz.dot with vscode extension `graphviz interactive previ
|
|
|
248
255
|
- [ ] support opening route in swagger
|
|
249
256
|
- config docs path
|
|
250
257
|
- [ ] add tests
|
|
258
|
+
- [ ] fix: focus should reset zoom
|
|
251
259
|
|
|
252
260
|
#### 0.12
|
|
253
261
|
- [ ] integration with pydantic-resolve
|
|
@@ -5,7 +5,9 @@
|
|
|
5
5
|
|
|
6
6
|
> This repo is still in early stage, it supports pydantic v2 only
|
|
7
7
|
|
|
8
|
-
Inspect your API interactively!
|
|
8
|
+
Inspect your API interactively!
|
|
9
|
+
|
|
10
|
+
[visit online demo](https://www.newsyeah.fun/voyager/) of project: [composition oriented development pattern](https://github.com/allmonday/composition-oriented-development-pattern)
|
|
9
11
|
|
|
10
12
|
<p align="center"><img src="./voyager.jpg" alt="" /></p>
|
|
11
13
|
<p align="center"><a target="_blank" rel="" href="https://www.youtube.com/watch?v=PGlbQq1M-n8"><img src="http://img.youtube.com/vi/PGlbQq1M-n8/0.jpg" alt="" style="max-width: 100%;"></a></p>
|
|
@@ -143,6 +145,8 @@ or you can open router_viz.dot with vscode extension `graphviz interactive previ
|
|
|
143
145
|
- [ ] optimize static resource (allow manually config url)
|
|
144
146
|
- [ ] improve search dialog
|
|
145
147
|
- [ ] add route/tag list
|
|
148
|
+
- [ ] type alias should not be kept as node instead of compiling to original type
|
|
149
|
+
- [ ] how to correctly handle the generic type ?
|
|
146
150
|
|
|
147
151
|
### in analysis
|
|
148
152
|
- [ ] click field to highlight links
|
|
@@ -213,6 +217,9 @@ or you can open router_viz.dot with vscode extension `graphviz interactive previ
|
|
|
213
217
|
- [x] fix focus in brief-mode
|
|
214
218
|
- [x] ui: adjust focus position
|
|
215
219
|
- [x] refactor naming
|
|
220
|
+
- 0.10.4
|
|
221
|
+
- [x] fix: when focus is on, should ensure changes from other params not broken.
|
|
222
|
+
|
|
216
223
|
|
|
217
224
|
#### 0.11
|
|
218
225
|
- [ ] enable/disable module cluster (to save space)
|
|
@@ -221,6 +228,7 @@ or you can open router_viz.dot with vscode extension `graphviz interactive previ
|
|
|
221
228
|
- [ ] support opening route in swagger
|
|
222
229
|
- config docs path
|
|
223
230
|
- [ ] add tests
|
|
231
|
+
- [ ] fix: focus should reset zoom
|
|
224
232
|
|
|
225
233
|
#### 0.12
|
|
226
234
|
- [ ] integration with pydantic-resolve
|
|
@@ -1,2 +1,2 @@
|
|
|
1
1
|
__all__ = ["__version__"]
|
|
2
|
-
__version__ = "0.10.
|
|
2
|
+
__version__ = "0.10.4"
|
|
@@ -64,7 +64,7 @@
|
|
|
64
64
|
<div id="q-app">
|
|
65
65
|
<q-layout view="hHh lpR fff">
|
|
66
66
|
<q-header bordered class="bg-primary text-white">
|
|
67
|
-
<q-toolbar class="row text-grey-9 bg-white" style="width: 100
|
|
67
|
+
<q-toolbar class="row text-grey-9 bg-white" style="width: 100%; border-bottom: 2px solid #009485;">
|
|
68
68
|
<div
|
|
69
69
|
class="col-auto text-primary"
|
|
70
70
|
style="font-size: 18px; font-weight: bold; display: flex; align-items: baseline;"
|
|
@@ -86,39 +86,21 @@
|
|
|
86
86
|
/>
|
|
87
87
|
</div>
|
|
88
88
|
<div class="col-auto q-ml-auto">
|
|
89
|
-
<q-toggle
|
|
90
|
-
v-if="state.enableBriefMode"
|
|
91
|
-
class="q-mr-md"
|
|
92
|
-
v-model="state.brief"
|
|
93
|
-
label="Brief Mode"
|
|
94
|
-
@update:model-value="(val) => toggleBrief(val)"
|
|
95
|
-
title="skip middle classes, config module_prefix to enable it"
|
|
96
|
-
dense
|
|
97
|
-
/>
|
|
98
|
-
</div>
|
|
99
|
-
<div class="col-auto">
|
|
100
|
-
<q-toggle
|
|
101
|
-
v-model="state.hidePrimitiveRoute"
|
|
102
|
-
@update:model-value="(val) => toggleHidePrimitiveRoute(val)"
|
|
103
|
-
label="Hide Primitive"
|
|
104
|
-
title="hide routes return primitive"
|
|
105
|
-
class="q-mr-md"
|
|
106
|
-
dense
|
|
107
|
-
/>
|
|
108
|
-
</div>
|
|
109
|
-
<div class="col-auto">
|
|
110
89
|
<q-btn
|
|
111
90
|
outline
|
|
112
91
|
@click="onReset"
|
|
113
92
|
title="may be very slow"
|
|
114
|
-
|
|
115
|
-
|
|
93
|
+
icon="border_all"
|
|
94
|
+
flat
|
|
95
|
+
class="q-mr-sm"
|
|
96
|
+
label="Full Graph"
|
|
116
97
|
/>
|
|
117
98
|
</div>
|
|
118
99
|
<div class="col-auto">
|
|
119
100
|
<q-btn
|
|
120
101
|
outline
|
|
121
102
|
icon="search"
|
|
103
|
+
flat
|
|
122
104
|
label="Search"
|
|
123
105
|
class="q-mr-md"
|
|
124
106
|
@click="showDialog()"
|
|
@@ -131,7 +113,7 @@
|
|
|
131
113
|
flat
|
|
132
114
|
icon="help_outline"
|
|
133
115
|
aria-label="Help"
|
|
134
|
-
|
|
116
|
+
style="margin-right: 40px"
|
|
135
117
|
>
|
|
136
118
|
<q-tooltip
|
|
137
119
|
anchor="bottom middle"
|
|
@@ -156,7 +138,7 @@
|
|
|
156
138
|
</div>
|
|
157
139
|
</q-tooltip>
|
|
158
140
|
</q-btn>
|
|
159
|
-
</div>
|
|
141
|
+
<a href="https://github.com/allmonday/fastapi-voyager" target="_blank" class="github-corner" aria-label="View source on GitHub"><svg width="52" height="52" viewBox="0 0 250 250" style="fill:#009485; color:#fff; position: absolute; top: 0; border: 0; right: 0;" aria-hidden="true"><path d="M0,0 L115,115 L130,115 L142,142 L250,250 L250,0 Z"/><path d="M128.3,109.0 C113.8,99.7 119.0,89.6 119.0,89.6 C122.0,82.7 120.5,78.6 120.5,78.6 C119.2,72.0 123.4,76.3 123.4,76.3 C127.3,80.9 125.5,87.3 125.5,87.3 C122.9,97.6 130.6,101.9 134.4,103.2" fill="currentColor" style="transform-origin: 130px 106px;" class="octo-arm"/><path d="M115.0,115.0 C114.9,115.1 118.7,116.5 119.8,115.4 L133.7,101.6 C136.9,99.2 139.9,98.4 142.2,98.6 C133.8,88.0 127.5,74.4 143.8,58.0 C148.5,53.4 154.0,51.2 159.7,51.0 C160.3,49.4 163.2,43.6 171.4,40.1 C171.4,40.1 176.1,42.5 178.8,56.2 C183.1,58.6 187.2,61.8 190.9,65.4 C194.5,69.0 197.7,73.2 200.1,77.6 C213.8,80.2 216.3,84.9 216.3,84.9 C212.7,93.1 206.9,96.0 205.4,96.6 C205.1,102.4 203.0,107.8 198.3,112.5 C181.9,128.9 168.3,122.5 157.7,114.1 C157.9,116.9 156.7,120.9 152.7,124.9 L141.0,136.5 C139.8,137.7 141.6,141.9 141.8,141.8 Z" fill="currentColor" class="octo-body"/></svg></a><style>.github-corner:hover .octo-arm{animation:octocat-wave 560ms ease-in-out}@keyframes octocat-wave{0%,100%{transform:rotate(0)}20%,60%{transform:rotate(-25deg)}40%,80%{transform:rotate(10deg)}}@media (max-width:500px){.github-corner:hover .octo-arm{animation:none}.github-corner .octo-arm{animation:octocat-wave 560ms ease-in-out}}</style></div>
|
|
160
142
|
<!-- <q-toolbar-title class="text-primary row">
|
|
161
143
|
</q-toolbar-title> -->
|
|
162
144
|
</q-toolbar>
|
|
@@ -232,14 +214,13 @@
|
|
|
232
214
|
content-class="q-pa-none"
|
|
233
215
|
>
|
|
234
216
|
<template #header>
|
|
235
|
-
<div class="
|
|
236
|
-
<div class="row items-center">
|
|
217
|
+
<div class="" style="white-space: nowrap; width: 100%">
|
|
237
218
|
<q-icon
|
|
219
|
+
style="vertical-align: top;"
|
|
238
220
|
class="q-mr-sm"
|
|
239
221
|
:name="state.tag == tag.name ? 'folder' : 'folder_open'"
|
|
240
222
|
></q-icon>
|
|
241
|
-
<span>{{ tag.name }} <q-chip class="q-ml-sm" dense>{{ tag.routes.length }}</q-chip></span>
|
|
242
|
-
</div>
|
|
223
|
+
<span>{{ tag.name }} <q-chip style="position:relative; top: -1px;" class="q-ml-sm" dense>{{ tag.routes.length }}</q-chip></span>
|
|
243
224
|
</div>
|
|
244
225
|
</template>
|
|
245
226
|
<q-list separator style="overflow: auto; max-height: 60vh;">
|
|
@@ -280,15 +261,34 @@
|
|
|
280
261
|
<template #after>
|
|
281
262
|
<div style="position: relative; width: 100%; height: 100%;">
|
|
282
263
|
<div id="graph" class="adjust-fit"></div>
|
|
283
|
-
<
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
264
|
+
<div style="position: absolute; left: 8px; bottom: 8px; z-index: 10; background: rgba(255,255,255,0.85); border-radius: 4px; padding: 2px 8px;">
|
|
265
|
+
<div>
|
|
266
|
+
<q-toggle
|
|
267
|
+
v-model="state.focus"
|
|
268
|
+
v-show="schemaCodeName"
|
|
269
|
+
@update:model-value="val => onFocusChange(val)"
|
|
270
|
+
label="Focus"
|
|
271
|
+
title="pick a schema and toggle focus on to display related nodes only"
|
|
272
|
+
/>
|
|
273
|
+
</div>
|
|
274
|
+
<div>
|
|
275
|
+
<q-toggle
|
|
276
|
+
v-if="state.enableBriefMode"
|
|
277
|
+
v-model="state.brief"
|
|
278
|
+
label="Brief Mode"
|
|
279
|
+
@update:model-value="(val) => toggleBrief(val)"
|
|
280
|
+
title="skip middle classes, config module_prefix to enable it"
|
|
281
|
+
/>
|
|
282
|
+
</div>
|
|
283
|
+
<div>
|
|
284
|
+
<q-toggle
|
|
285
|
+
v-model="state.hidePrimitiveRoute"
|
|
286
|
+
@update:model-value="(val) => toggleHidePrimitiveRoute(val)"
|
|
287
|
+
label="Hide Primitive"
|
|
288
|
+
title="hide routes return primitive"
|
|
289
|
+
/>
|
|
290
|
+
</div>
|
|
291
|
+
</div>
|
|
292
292
|
</div>
|
|
293
293
|
</template>
|
|
294
294
|
</q-splitter>
|
|
@@ -88,9 +88,9 @@ const app = createApp({
|
|
|
88
88
|
|
|
89
89
|
async function onFocusChange(val) {
|
|
90
90
|
if (val) {
|
|
91
|
-
await onGenerate(false
|
|
91
|
+
await onGenerate(false)
|
|
92
92
|
} else {
|
|
93
|
-
await onGenerate(false
|
|
93
|
+
await onGenerate(false)
|
|
94
94
|
setTimeout(() => {
|
|
95
95
|
const ele = $(`[data-name='${schemaCodeName.value}'] polygon`)
|
|
96
96
|
ele.click()
|
|
@@ -98,7 +98,8 @@ const app = createApp({
|
|
|
98
98
|
}
|
|
99
99
|
}
|
|
100
100
|
|
|
101
|
-
async function onGenerate(resetZoom = true
|
|
101
|
+
async function onGenerate(resetZoom = true) {
|
|
102
|
+
const schema_name = state.focus ? schemaCodeName.value : null;
|
|
102
103
|
state.generating = true;
|
|
103
104
|
try {
|
|
104
105
|
const payload = {
|
|
@@ -98,6 +98,10 @@ def get_page_test_2():
|
|
|
98
98
|
def get_page_test_3_long_long_long_name():
|
|
99
99
|
return True
|
|
100
100
|
|
|
101
|
-
@app.get("/page_test_4/", tags=['for-page'
|
|
101
|
+
@app.get("/page_test_4/", tags=['for-page'])
|
|
102
|
+
def get_page_test_3_no_response_model():
|
|
103
|
+
return True
|
|
104
|
+
|
|
105
|
+
@app.get("/page_test_5/", tags=['long_long_long_tag_name', 'group_b'])
|
|
102
106
|
def get_page_test_3_no_response_model():
|
|
103
107
|
return True
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/web/component/render-graph.js
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/web/icon/apple-touch-icon.png
RENAMED
|
File without changes
|
{fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/web/icon/favicon-16x16.png
RENAMED
|
File without changes
|
{fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/web/icon/favicon-32x32.png
RENAMED
|
File without changes
|
|
File without changes
|
{fastapi_voyager-0.10.3 → fastapi_voyager-0.10.4}/src/fastapi_voyager/web/icon/site.webmanifest
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|