11import re
22
3- REGEX__SAFE__STR__FAST_API__TITLE = re .compile (r'[^a-zA-Z0-9 _()-]' )
4-
5-
6- EXPECTED_ROUTES_METHODS = ['info' , 'redirect_to_docs' , 'routes__html' , 'routes__json' , 'status' , 'version' ]
7- EXPECTED_ROUTES_PATHS = ['/' ,
8- '/config/info' ,
9- '/config/routes/html' ,
10- '/config/routes/json' ,
11- '/config/status' ,
12- '/config/version' ]
13- EXPECTED_DEFAULT_ROUTES = ['/docs' , '/openapi.json' , '/redoc' , '/static-docs' ]
14-
15-
16- ROUTES__CONFIG = [{ 'http_methods' : ['GET' ], 'http_path' : '/config/info' , 'method_name' : 'info' },
17- { 'http_methods' : ['GET' ], 'http_path' : '/config/status' , 'method_name' : 'status' },
18- { 'http_methods' : ['GET' ], 'http_path' : '/config/version' , 'method_name' : 'version' },
19- { 'http_methods' : ['GET' ], 'http_path' : '/config/routes/json' , 'method_name' : 'routes__json' },
20- { 'http_methods' : ['GET' ], 'http_path' : '/config/routes/html' , 'method_name' : 'routes__html' }]
21- ROUTES__STATIC_DOCS = [{'http_methods' : ['GET' , 'HEAD' ], 'http_path' : '/static-docs' , 'method_name' : 'static-docs' }]
22- ROUTES_PATHS__CONFIG = ['/config/status' , '/config/version' ]
3+ # todo: the names of these variables need a bit of refactoring and normalising
4+
5+ REGEX__SAFE__STR__FAST_API__TITLE = re .compile (r'[^a-zA-Z0-9 _()-]' )
6+
7+ DEFAULT_ROUTES_PATHS = ['/' , '/config/status' , '/config/version' ]
8+ DEFAULT__NAME__FAST_API = 'Fast_API'
9+ ENV_VAR__FAST_API__AUTH__API_KEY__NAME = 'FAST_API__AUTH__API_KEY__NAME'
10+ ENV_VAR__FAST_API__AUTH__API_KEY__VALUE = 'FAST_API__AUTH__API_KEY__VALUE'
11+
12+ ROUTE_REDIRECT_TO_DOCS = {'http_methods' : ['GET' ], 'http_path' : '/' , 'method_name' : 'redirect_to_docs' }
13+ FAST_API_DEFAULT_ROUTES_PATHS = ['/docs' , '/docs/oauth2-redirect' , '/openapi.json' , '/redoc' , '/static-docs' ]
14+ FAST_API_DEFAULT_ROUTES = [ { 'http_methods' : ['GET' ,'HEAD' ], 'http_path' : '/openapi.json' , 'method_name' : 'openapi' },
15+ ROUTE_REDIRECT_TO_DOCS ,
16+ { 'http_methods' : ['GET' ], 'http_path' : '/docs' , 'method_name' : 'swagger_ui_html' },
17+ { 'http_methods' : ['GET' ], 'http_path' : '/redoc' , 'method_name' : 'redoc_html' }]
18+
19+
20+ EXPECTED_ROUTES_METHODS = ['auth_cookie_form' ,
21+ 'info' ,
22+ 'redirect_to_docs' ,
23+ 'routes__html' ,
24+ 'routes__json' ,
25+ 'set_auth_cookie' ,
26+ 'status' ,
27+ 'version' ]
28+ EXPECTED_ROUTES_PATHS = ['/' ,
29+ '/auth/auth-cookie-form' ,
30+ '/auth/set-auth-cookie' ,
31+ '/config/info' ,
32+ '/config/routes/html' ,
33+ '/config/routes/json' ,
34+ '/config/status' ,
35+ '/config/version' ]
36+ EXPECTED_DEFAULT_ROUTES = ['/docs' , '/openapi.json' , '/redoc' , '/static-docs' ]
37+
38+
39+ ROUTES__CONFIG = [{ 'http_methods' : ['GET' ], 'http_path' : '/config/info' , 'method_name' : 'info' },
40+ { 'http_methods' : ['GET' ], 'http_path' : '/config/status' , 'method_name' : 'status' },
41+ { 'http_methods' : ['GET' ], 'http_path' : '/config/version' , 'method_name' : 'version' },
42+ { 'http_methods' : ['GET' ], 'http_path' : '/config/routes/json' , 'method_name' : 'routes__json' },
43+ { 'http_methods' : ['GET' ], 'http_path' : '/config/routes/html' , 'method_name' : 'routes__html' },
44+ { 'http_methods' : ['GET' ], 'http_path' : '/auth/auth-cookie-form' , 'method_name' : 'auth_cookie_form' },
45+ { 'http_methods' : ['POST' ], 'http_path' : '/auth/set-auth-cookie' , 'method_name' : 'set_auth_cookie' },]
46+ ROUTES__STATIC_DOCS = [{'http_methods' : ['GET' , 'HEAD' ], 'http_path' : '/static-docs' , 'method_name' : 'static-docs' }]
47+ ROUTES_PATHS__CONFIG = ['/config/status' , '/config/version' ]
0 commit comments