API clean up work

API clean up work

  • Missing schemas

    edx.devstack.lms | 2019-09-05 12:21:08,903 WARNING 2189 [drf_yasg.inspectors.base] [user None] base.py:54 - view's BlocksInCourseView raised exception during schema generation; use `getattr(self, 'swagger_fake_view', False)` to detect and short-circuit this edx.devstack.lms | Traceback (most recent call last): edx.devstack.lms | File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/drf_yasg/inspectors/base.py", line 50, in call_view_method edx.devstack.lms | return view_method() edx.devstack.lms | File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/generics.py", line 110, in get_serializer edx.devstack.lms | serializer_class = self.get_serializer_class() edx.devstack.lms | File "/edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/generics.py", line 127, in get_serializer_class edx.devstack.lms | % self.__class__.__name__ edx.devstack.lms | AssertionError: 'BlocksInCourseView' should either include a `serializer_class` attribute, or override the `get_serializer_class()` method.

    See also https://openedx.atlassian.net/browse/ARCH-91 and:

    WARNING 2189 [py.warnings] [user None] generators.py:214 - /edx/app/edxapp/venvs/edxapp/local/lib/python2.7/site-packages/rest_framework/schemas/generators.py:214: PendingDeprecationWarning: The `EnrollmentSupportListView.exclude_from_schema` attribute is pending deprecation. Set `schema = None` instead.
  • non-"^api/" urls

    • We can add duplicate url patterns

      • need to deprecate the old url

    • Or should non-/api redirect to /api

  • Move docs from docstrings to decorators

  • Simple URL errors: 

    WARNING 2189 [drf_yasg.generators] [user None] generators.py:34 - url pattern does not end in $ ('^api/discussion/^v1/courses/(?P<course_id>[^/+]+(/|\+)[^/+]+(/|\+)[^/?]+)') - unexpected things might happen
  • The sphinx build has lots of warnings and errors...