* 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)
23 lines
648 B
Python
23 lines
648 B
Python
"""
|
|
Open API support.
|
|
"""
|
|
|
|
from rest_framework import permissions
|
|
from drf_yasg.views import get_schema_view
|
|
from drf_yasg import openapi
|
|
|
|
openapi_info = openapi.Info(
|
|
title="Open edX API",
|
|
default_version="v1",
|
|
description="APIs for access to Open edX information",
|
|
#terms_of_service="https://www.google.com/policies/terms/", # TODO: Do we have these?
|
|
contact=openapi.Contact(email="oscm@edx.org"),
|
|
#license=openapi.License(name="BSD License"), # TODO: What does this mean?
|
|
)
|
|
|
|
schema_view = get_schema_view(
|
|
openapi_info,
|
|
public=True,
|
|
permission_classes=(permissions.AllowAny,),
|
|
)
|