File tree Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Expand file tree Collapse file tree 1 file changed +9
-2
lines changed Original file line number Diff line number Diff line change 2
2
3
3
import json
4
4
import os .path
5
+ import pprint
5
6
import sys
6
7
7
8
from fastapi .openapi .utils import get_openapi
8
9
9
10
# we need to import OLS app from directory above, so it is needed to update
10
11
# search path accordingly
11
- sys .path .append (
12
- os .path .abspath (os .path .join (os .path .dirname (__file__ ), os .path .pardir ))
12
+ # it needs to go into the 1st place to be used first
13
+ sys .path .insert (
14
+ 0 , os .path .abspath (os .path .join (os .path .dirname (__file__ ), os .path .pardir ))
13
15
)
14
16
15
17
# pylint: disable-next=C0413
40
42
print (app .title )
41
43
print (app .description )
42
44
45
+ print ()
46
+
47
+ print ("Routes:" )
48
+ pprint .pprint (app .routes )
49
+
43
50
# retrieve OpenAPI schema via initialized app
44
51
open_api = get_openapi (
45
52
title = app .title ,
You can’t perform that action at this time.
0 commit comments