diff --git a/netbox/netbox/urls.py b/netbox/netbox/urls.py index 45c99beb9..ab3fcf5c6 100644 --- a/netbox/netbox/urls.py +++ b/netbox/netbox/urls.py @@ -18,6 +18,7 @@ schema_view = get_schema_view( license=openapi.License(name="Apache v2 License"), ), validators=['flex', 'ssv'], + validators=[], public=True, ) @@ -50,9 +51,9 @@ _patterns = [ url(r'^api/secrets/', include('secrets.api.urls')), url(r'^api/tenancy/', include('tenancy.api.urls')), url(r'^api/virtualization/', include('virtualization.api.urls')), - url(r'^api/docs/$', schema_view.with_ui('swagger'), name='api_docs'), - url(r'^api/redoc/$', schema_view.with_ui('redoc'), name='api_redocs'), - url(r'^api/swagger(?P.json|.yaml)$', schema_view.without_ui(), name='schema_swagger'), + url(r'^api/docs/$', schema_view.with_ui('swagger', cache_timeout=600), name='api_docs'), + url(r'^api/redoc/$', schema_view.with_ui('redoc', cache_timeout=600), name='api_redocs'), + url(r'^api/swagger(?P.json|.yaml)$', schema_view.without_ui(cache_timeout=600), name='schema_swagger'), # Serving static media in Django to pipe it through LoginRequiredMiddleware url(r'^media/(?P.*)$', serve, {'document_root': settings.MEDIA_ROOT}),