]) router.register('statussen', StatusViewSet) router.register('zaakobjecten', ZaakObjectViewSet) router.register('klantcontacten', KlantContactViewSet) router.register('rollen', RolViewSet) router.register('resultaten', ResultaatViewSet) # TODO: the EndpointEnumerator seems to choke on path and re_path urlpatterns = [ url( r'^v(?P<version>\d+)/', include([ # API documentation url(r'^schema/openapi(?P<format>\.json|\.yaml)$', SchemaView.without_ui(cache_timeout=None), name='schema-json'), url(r'^schema/$', SchemaView.with_ui('redoc', cache_timeout=None), name='schema-redoc'), # actual API url(r'^', include(router.urls)), # should not be picked up by drf-yasg path('', include('vng_api_common.api.urls')), path('', include('vng_api_common.notifications.api.urls')), ])), ]
router.register("rollen", RolViewSet) router.register("resultaten", ResultaatViewSet) router.register("zaakinformatieobjecten", ZaakInformatieObjectViewSet) router.register("zaakcontactmomenten", ZaakContactMomentViewSet) router.register("zaakverzoeken", ZaakVerzoekViewSet) # TODO: the EndpointEnumerator seems to choke on path and re_path urlpatterns = [ url( r"^v(?P<version>\d+)/", include([ # API documentation url( r"^schema/openapi(?P<format>\.json|\.yaml)$", SchemaView.without_ui( cache_timeout=settings.SPEC_CACHE_TIMEOUT), name="schema-json", ), url( r"^schema/$", SchemaView.with_ui("redoc", cache_timeout=settings.SPEC_CACHE_TIMEOUT), name="schema-redoc", ), # actual API url(r"^", include(router.urls)), # should not be picked up by drf-yasg path("", include("vng_api_common.api.urls")), path("", include("vng_api_common.notifications.api.urls")), ]), )
from django.conf.urls import include from django.urls import path, re_path from rest_framework import routers from vng_api_common.schema import SchemaView from .views import ObjectViewSet router = routers.DefaultRouter(trailing_slash=False) router.register(r"objects", ObjectViewSet) urlpatterns = [ path("v1/", include(router.urls)), path( "v1/", include([ re_path( r"^schema/openapi(?P<format>\.json|\.yaml)$", SchemaView.without_ui(cache_timeout=0), name="schema-json", ), re_path( r"^schema/$", SchemaView.with_ui("redoc", cache_timeout=0), name="schema-redoc", ), ]), ), ]