|
17 | 17 |
|
18 | 18 | openapi_info = openapi.Info( |
19 | 19 | title="NetBox API", |
20 | | - default_version='v2', |
| 20 | + default_version='v3', |
21 | 21 | description="API to access NetBox", |
22 | 22 | terms_of_service="https://github.com/netbox-community/netbox", |
23 | 23 | license=openapi.License(name="Apache v2 License"), |
|
59 | 59 | path('api/users/', include('users.api.urls')), |
60 | 60 | path('api/virtualization/', include('virtualization.api.urls')), |
61 | 61 | path('api/status/', StatusView.as_view(), name='api-status'), |
62 | | - path('api/docs/', schema_view.with_ui('swagger'), name='api_docs'), |
63 | | - path('api/redoc/', schema_view.with_ui('redoc'), name='api_redocs'), |
64 | | - re_path(r'^api/swagger(?P<format>.json|.yaml)$', schema_view.without_ui(), name='schema_swagger'), |
| 62 | + path('api/docs/', schema_view.with_ui('swagger', cache_timeout=86400), name='api_docs'), |
| 63 | + path('api/redoc/', schema_view.with_ui('redoc', cache_timeout=86400), name='api_redocs'), |
| 64 | + re_path(r'^api/swagger(?P<format>.json|.yaml)$', schema_view.without_ui(cache_timeout=86400), name='schema_swagger'), |
65 | 65 |
|
66 | 66 | # GraphQL |
67 | 67 | path('graphql/', csrf_exempt(GraphQLView.as_view(graphiql=True, schema=schema)), name='graphql'), |
|
0 commit comments