tomchristie / django-rest-raml Goto Github PK
View Code? Open in Web Editor NEWRAML Documentation Generator for Django REST framework
License: Other
RAML Documentation Generator for Django REST framework
License: Other
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),
]
[27/Oct/2016 22:18:17] "GET /raml HTTP/1.1" 301 0
Internal Server Error: /raml/
Traceback (most recent call last):
File ".../lib/python3.5/site-packages/django/core/handlers/exception.py", line 39, in inner
response = get_response(request)
File ".../lib/python3.5/site-packages/django/core/handlers/base.py", line 187, in _get_response
response = self.process_exception_by_middleware(e, request)
File ".../lib/python3.5/site-packages/django/core/handlers/base.py", line 185, in _get_response
response = wrapped_callback(request, _callback_args, *_callback_kwargs)
File "/usr/local/Cellar/python3/3.5.2_2/Frameworks/Python.framework/Versions/3.5/lib/python3.5/contextlib.py", line 30, in inner
return func(_args, *_kwds)
File ".../lib/python3.5/site-packages/django/views/decorators/csrf.py", line 58, in wrapped_view
return view_func(_args, *_kwargs)
File ".../lib/python3.5/site-packages/django/views/generic/base.py", line 68, in view
return self.dispatch(request, _args, *_kwargs)
File "../lib/python3.5/site-packages/rest_framework/views.py", line 477, in dispatch
response = self.handle_exception(exc)
File ".../lib/python3.5/site-packages/rest_framework/views.py", line 437, in handle_exception
self.raise_uncaught_exception(exc)
File ".../lib/python3.5/site-packages/rest_framework/views.py", line 448, in raise_uncaught_exception
raise exc
File ".../lib/python3.5/site-packages/rest_framework/views.py", line 474, in dispatch
response = handler(request, _args, *_kwargs)
File ".../lib/python3.5/site-packages/rest_framework/schemas.py", line 589, in get
schema = generator.get_schema(request)
File ".../lib/python3.5/site-packages/rest_framework/schemas.py", line 240, in get_schema
links = self.get_links(request)
File ".../lib/python3.5/site-packages/rest_framework/schemas.py", line 264, in get_links
prefix = self.determine_path_prefix(paths)
File ".../lib/python3.5/site-packages/rest_framework/schemas.py", line 306, in determine_path_prefix
return common_path(prefixes)
File ".../lib/python3.5/site-packages/rest_framework/schemas.py", line 41, in common_path
s1 = min(split_paths)
ValueError: min() arg is an empty sequence
I am getting a blank screen after loading icon briefly showing up.
Browser console displays the following error:
api-console-vendor.js:424252 TypeError: Cannot read property 'buffer' of undefined
at api-console.js:1117
at processQueue (api-console-vendor.js:425864)
at api-console-vendor.js:425880
at Scope.$eval (api-console-vendor.js:427116)
at Scope.$digest (api-console-vendor.js:426932)
at api-console-vendor.js:427155
at completeOutstandingRequest (api-console-vendor.js:417486)
at api-console-vendor.js:417874
whitenoise.django.MissingFileError: The file 'rest_framework_raml/fonts/Lato-HairlineItalic.woff2' could not be found with <whitenoise.django.GzipManifestStaticFilesStorage object at 0x7f1bdd98bf50>.
The CSS file 'rest_framework_raml/styles/api-console-light-theme.css' references a file which could not be found:
rest_framework_raml/fonts/Lato-HairlineItalic.woff2
Please check the URL references in this CSS file, particularly any
relative paths which might be pointing to the wrong location.
This is a great documentation library for DRF! However, you will get an error of:
ImportError: No module named raml_codec
When you just follow the steps on the README and needs to run
pip install raml-codec
for it to work
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.