Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: axnsan12/drf-yasg
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 0d7c8cf4548801fdae30784fa56cc3079ed00e59
Choose a base ref
..
head repository: axnsan12/drf-yasg
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 17aecc3311e68443e010a80f334f583454e77771
Choose a head ref
Showing with 12 additions and 12 deletions.
  1. +2 −2 .travis.yml
  2. +1 −1 README.rst
  3. +1 −1 src/drf_yasg/codecs.py
  4. +1 −1 src/drf_yasg/generators.py
  5. +1 −1 src/drf_yasg/openapi.py
  6. +2 −2 src/drf_yasg/views.py
  7. +2 −2 testproj/testproj/settings/base.py
  8. +1 −1 testproj/testproj/urls.py
  9. +1 −1 tests/urlconfs/non_public_urls.py
4 changes: 2 additions & 2 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@ python:
- '3.6'
- '3.7'
- '3.8'
- '3.9-dev'
- '3.9'

dist: focal

@@ -13,7 +13,7 @@ matrix:
include:
- python: '3.8'
env: TOXENV=docs
- python: '3.9-dev'
- python: '3.9'
env: TOXENV=djmaster
- python: '3.8'
env: TOXENV=lint
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -148,7 +148,7 @@ In ``urls.py``:
license=openapi.License(name="BSD License"),
),
public=True,
permission_classes=(permissions.AllowAny,),
permission_classes=[permissions.AllowAny],
)
urlpatterns = [
2 changes: 1 addition & 1 deletion src/drf_yasg/codecs.py
Original file line number Diff line number Diff line change
@@ -3,7 +3,7 @@
import logging
from collections import OrderedDict

from coreapi.compat import force_bytes
from django.utils.encoding import force_bytes
from ruamel import yaml

from . import openapi
2 changes: 1 addition & 1 deletion src/drf_yasg/generators.py
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
import copy
import logging
import re
import urllib.parse as urlparse
from collections import OrderedDict, defaultdict

import uritemplate
from coreapi.compat import urlparse
from django.urls import URLPattern, URLResolver
from rest_framework import versioning
from rest_framework.schemas import SchemaGenerator
2 changes: 1 addition & 1 deletion src/drf_yasg/openapi.py
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
import collections
import logging
import re
import urllib.parse as urlparse
from collections import OrderedDict

from coreapi.compat import urlparse
from django.urls import get_script_prefix
from django.utils.functional import Promise
from inflection import camelize
4 changes: 2 additions & 2 deletions src/drf_yasg/views.py
Original file line number Diff line number Diff line change
@@ -58,8 +58,8 @@ def get_schema_view(info=None, url=None, patterns=None, urlconf=None, public=Fal
:param bool public: if False, includes only the endpoints that are accesible by the user viewing the schema
:param list validators: a list of validator names to apply; the only allowed value is ``ssv``, for now
:param type generator_class: schema generator class to use; should be a subclass of :class:`.OpenAPISchemaGenerator`
:param tuple authentication_classes: authentication classes for the schema view itself
:param tuple permission_classes: permission classes for the schema view itself
:param list authentication_classes: authentication classes for the schema view itself
:param list permission_classes: permission classes for the schema view itself
:return: SchemaView class
:rtype: type[drf_yasg.views.SchemaView]
"""
4 changes: 2 additions & 2 deletions testproj/testproj/settings/base.py
Original file line number Diff line number Diff line change
@@ -88,9 +88,9 @@

# Django Rest Framework
REST_FRAMEWORK = {
'DEFAULT_PERMISSION_CLASSES': (
'DEFAULT_PERMISSION_CLASSES': [
'rest_framework.permissions.IsAuthenticated',
)
]
}

OAUTH2_CLIENT_ID = '12ee6bgxtpSEgP8TioWcHSXOiDBOUrVav4mRbVEs'
2 changes: 1 addition & 1 deletion testproj/testproj/urls.py
Original file line number Diff line number Diff line change
@@ -26,7 +26,7 @@
SchemaView = get_schema_view(
validators=['ssv', 'flex'],
public=True,
permission_classes=(permissions.AllowAny,),
permission_classes=[permissions.AllowAny],
)


2 changes: 1 addition & 1 deletion tests/urlconfs/non_public_urls.py
Original file line number Diff line number Diff line change
@@ -8,7 +8,7 @@
view = get_schema_view(
openapi.Info('bla', 'ble'),
public=False,
permission_classes=(permissions.AllowAny,)
permission_classes=[permissions.AllowAny]
)
view = view.without_ui(cache_timeout=None)