-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
3a0c5e4
commit 944831b
Showing
4 changed files
with
33 additions
and
11 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,11 +6,29 @@ | |
from rest_framework.routers import DefaultRouter | ||
from rest_framework_nested.routers import NestedSimpleRouter | ||
|
||
from rest_framework import permissions | ||
from drf_yasg.views import get_schema_view | ||
from drf_yasg import openapi | ||
|
||
from cloud_native_gis.api.layer import ( | ||
LayerViewSet, LayerStyleViewSet | ||
) | ||
from cloud_native_gis.api.vector_tile import (VectorTileLayer) | ||
|
||
schema_view = get_schema_view( | ||
openapi.Info( | ||
title="Cloud Native GIS API", | ||
default_version='v1', | ||
description="API documentation for the Cloud Native GIS project", | ||
terms_of_service="https://www.example.com/terms/", | ||
contact=openapi.Contact(email="[email protected]"), | ||
license=openapi.License(name="BSD License"), | ||
), | ||
public=True, | ||
permission_classes=(permissions.AllowAny,), | ||
) | ||
|
||
|
||
router = DefaultRouter() | ||
router.register( | ||
r'layer', LayerViewSet, basename='cloud-native-gis-layer' | ||
|
@@ -35,5 +53,7 @@ | |
'maputnik/', | ||
TemplateView.as_view(template_name='cloud_native_gis/maputnik.html'), | ||
name='cloud-native-gis-maputnik' | ||
) | ||
), | ||
path('swagger/', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui'), | ||
path('redoc/', schema_view.with_ui('redoc', cache_timeout=0), name='schema-redoc-ui'), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -19,3 +19,4 @@ black | |
cffi | ||
# Needed for PDF back page QR Code | ||
qrcode | ||
drf-yasg==1.21.7 |