GithubHelp home page GithubHelp logo

tomchristie / django-rest-raml Goto Github PK

View Code? Open in Web Editor NEW
53.0 7.0 5.0 3.03 MB

RAML Documentation Generator for Django REST framework

License: Other

Python 0.03% HTML 0.01% JavaScript 98.81% CSS 1.16%

django-rest-raml's Issues

min() arg is an empty sequence

[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

Blank screen

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

Permissions

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),
]

Missing Font Files

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.

raml-codec not automatically installed

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

URI parameters incorrect info

This is one of my items in my urlpatterns

url(r'^(?P<artist_id>[0-9]+)/$', views.artist_detail, name='artists-detail')

screen shot 2016-10-21 at 6 54 27 pm

It says here string when it should be an integer according to the artist_id regex

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.