django-rest-raml icon indicating copy to clipboard operation
django-rest-raml copied to clipboard

Permissions

Open Dean-Christian-Armada opened this issue 8 years ago • 0 comments

Hi, my app currently have the Oauth2.0 Authentication on my default settings.

REST_FRAMEWORK = {
    'EXCEPTION_HANDLER': 'jaguar.utils.custom_exception_handler',
    'DEFAULT_AUTHENTICATION_CLASSES': (
        'oauth2_provider.ext.rest_framework.OAuth2Authentication',
    ),
    'DEFAULT_PERMISSION_CLASSES': (
        'rest_framework.permissions.IsAuthenticated',
    ),
    'DEFAULT_PAGINATION_CLASS':
        'rest_framework.pagination.LimitOffsetPagination',
    'DEFAULT_FILTER_BACKENDS': ('rest_framework.filters.DjangoFilterBackend',)
}

What happens is, I can not visit my documentation URL without commenting the Default Permission Class.. I wish, I can put like a decorator on my schema_view or a parameter to enable me to freely visit the documentation URL

schema_view = get_schema_view(
    title='API Documentation',
    renderer_classes=[RAMLRenderer, RAMLDocsRenderer]
)

urlpatterns = [
    url(r'^docs/$', schema_view),
]

Dean-Christian-Armada avatar Dec 06 '16 02:12 Dean-Christian-Armada