* Install drf-yasg * Add drf-yasg settings and urls * Pin drf to make drf-yasg work * Adjust config-models version to be compatible * Remove django-rest-swagger (the old way)
21 lines
547 B
Python
21 lines
547 B
Python
"""
|
|
Open API support.
|
|
"""
|
|
|
|
from rest_framework import permissions
|
|
from drf_yasg.views import get_schema_view
|
|
from drf_yasg import openapi
|
|
|
|
schema_view = get_schema_view(
|
|
openapi.Info(
|
|
title="Snippets API",
|
|
default_version='v1',
|
|
description="Test description",
|
|
terms_of_service="https://www.google.com/policies/terms/",
|
|
contact=openapi.Contact(email="contact@snippets.local"),
|
|
license=openapi.License(name="BSD License"),
|
|
),
|
|
public=True,
|
|
permission_classes=(permissions.AllowAny,),
|
|
)
|