32 lines
1.1 KiB
Python
32 lines
1.1 KiB
Python
from django.contrib import admin
|
|
from django.urls import path, include
|
|
from drf_yasg import openapi
|
|
from drf_yasg.views import get_schema_view
|
|
|
|
openapi_info = openapi.Info(
|
|
title="Toolshed API",
|
|
default_version='v1',
|
|
description="API for all things …",
|
|
)
|
|
|
|
schema_view = get_schema_view(
|
|
openapi_info,
|
|
public=True,
|
|
permission_classes=[],
|
|
)
|
|
|
|
urlpatterns = [
|
|
path('djangoadmin/', admin.site.urls),
|
|
path('auth/', include('authentication.api')),
|
|
path('admin/', include('hostadmin.api')),
|
|
path('api/version/', include('toolshed.api.version')),
|
|
path('api/v1/', include('toolshed.api.info')),
|
|
path('api/v1/', include('toolshed.api.friend')),
|
|
path('api/v1/', include('toolshed.api.group')),
|
|
path('api/v1/', include('toolshed.api.idmap')),
|
|
path('api/v1/', include('toolshed.api.inventory')),
|
|
path('api/v1/', include('toolshed.api.files')),
|
|
path('api/v1/', include('toolshed.api.offlinedata')),
|
|
path('media/', include('files.media_urls')),
|
|
path('docs/', schema_view.with_ui('swagger', cache_timeout=0), name='api-docs'),
|
|
]
|