|
|
|
|
@ -14,6 +14,7 @@ from .views import ( |
|
|
|
|
ImageTextViewSet, VideoViewSet, |
|
|
|
|
GalleryViewSet, GalleryImageViewSet, |
|
|
|
|
UserViewSet, LessonViewSet, ImageObjectViewSet, |
|
|
|
|
SchoolScheduleViewSet, |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
router = DefaultRouter() |
|
|
|
|
@ -30,24 +31,27 @@ router.register(r'image-texts', ImageTextViewSet, base_name='image-texts') |
|
|
|
|
router.register(r'videos', VideoViewSet, base_name='videos') |
|
|
|
|
router.register(r'galleries', GalleryViewSet, base_name='galleries') |
|
|
|
|
router.register(r'gallery-images', GalleryImageViewSet, base_name='gallery-images') |
|
|
|
|
|
|
|
|
|
router.register(r'school-schedules', SchoolScheduleViewSet, base_name='school-schedules') |
|
|
|
|
|
|
|
|
|
router.register(r'users', UserViewSet, base_name='users') |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
schema_view = get_schema_view( |
|
|
|
|
openapi.Info( |
|
|
|
|
title="Lil Sity API", |
|
|
|
|
default_version='v1', |
|
|
|
|
description="Routes of Lil City project", |
|
|
|
|
), |
|
|
|
|
validators=['flex', 'ssv'], |
|
|
|
|
public=False, |
|
|
|
|
permission_classes=(permissions.AllowAny,), |
|
|
|
|
openapi.Info( |
|
|
|
|
title="Lil Sity API", |
|
|
|
|
default_version='v1', |
|
|
|
|
description="Routes of Lil City project", |
|
|
|
|
), |
|
|
|
|
validators=['flex', 'ssv'], |
|
|
|
|
public=False, |
|
|
|
|
permission_classes=(permissions.AllowAny,), |
|
|
|
|
) |
|
|
|
|
|
|
|
|
|
urlpatterns = [ |
|
|
|
|
path('swagger(<str:format>.json|.yaml)', schema_view.without_ui(cache_timeout=None), name='schema-json'), |
|
|
|
|
path('swagger/', schema_view.with_ui('swagger', cache_timeout=None), name='schema-swagger-ui'), |
|
|
|
|
path('redoc/', schema_view.with_ui('redoc', cache_timeout=None), name='schema-redoc'), |
|
|
|
|
path('api-token-auth/', ObtainToken.as_view(), name='api-token-auth'), |
|
|
|
|
path('', include((router.urls, 'api-root')), name='api-root'), |
|
|
|
|
path('swagger(<str:format>.json|.yaml)', schema_view.without_ui(cache_timeout=None), name='schema-json'), |
|
|
|
|
path('swagger/', schema_view.with_ui('swagger', cache_timeout=None), name='schema-swagger-ui'), |
|
|
|
|
path('redoc/', schema_view.with_ui('redoc', cache_timeout=None), name='schema-redoc'), |
|
|
|
|
path('api-token-auth/', ObtainToken.as_view(), name='api-token-auth'), |
|
|
|
|
path('', include((router.urls, 'api-root')), name='api-root'), |
|
|
|
|
] |
|
|
|
|
|