File tree 2 files changed +10
-7
lines changed 2 files changed +10
-7
lines changed Original file line number Diff line number Diff line change @@ -503,6 +503,7 @@ def _setting(name, default=None):
503
503
'utilities.custom_inspectors.IdInFilterInspector' ,
504
504
'drf_yasg.inspectors.CoreAPICompatInspector' ,
505
505
],
506
+ 'DEFAULT_INFO' : 'netbox.urls.openapi_info' ,
506
507
'DEFAULT_MODEL_DEPTH' : 1 ,
507
508
'DEFAULT_PAGINATOR_INSPECTORS' : [
508
509
'utilities.custom_inspectors.NullablePaginatorInspector' ,
Original file line number Diff line number Diff line change 9
9
from users .views import LoginView , LogoutView
10
10
from .admin import admin_site
11
11
12
+ openapi_info = openapi .Info (
13
+ title = "NetBox API" ,
14
+ default_version = 'v2' ,
15
+ description = "API to access NetBox" ,
16
+ terms_of_service = "https://github.com/netbox-community/netbox" ,
17
+ license = openapi .License (name = "Apache v2 License" ),
18
+ )
19
+
12
20
schema_view = get_schema_view (
13
- openapi .Info (
14
- title = "NetBox API" ,
15
- default_version = 'v2' ,
16
- description = "API to access NetBox" ,
17
- terms_of_service = "https://github.com/netbox-community/netbox" ,
18
- license = openapi .License (name = "Apache v2 License" ),
19
- ),
21
+ openapi_info ,
20
22
validators = ['flex' , 'ssv' ],
21
23
public = True ,
22
24
)
You can’t perform that action at this time.
0 commit comments