concentricsky / django-tastypie-swagger

An adapter to use swagger-ui with django-tastypie.
Other
132 stars 144 forks source link

Regression with names #75

Open Seraf opened 10 years ago

Seraf commented 10 years ago

I'm using the 1.3 version, and I can't display endpoint with / in their names :

Here is my extra_actions :

 extra_actions = [
            {
                'name': 'engine/reload',
                'http_method': 'GET',
                'fields': {}
            },
            {
                'name': 'scheduler/reload',
                'http_method': 'GET',
                'fields': {}
            },
            {
                'name': 'intents',
                'http_method': 'GET',
                'fields': {}
            },
]

The intents endpoint will display with no problems, but the two first will crash with a javascript error : Uncaught Error: Syntax error, unrecognized expression: /google_post_4_content jquery-1.8.0.min.js:2 Z.error jquery-1.8.0.min.js:2 bg jquery-1.8.0.min.js:2 Z.compile jquery-1.8.0.min.js:2 bm jquery-1.8.0.min.js:2 h.querySelectorAll.bm jquery-1.8.0.min.js:2 Z jquery-1.8.0.min.js:2 p.fn.extend.find jquery-1.8.0.min.js:2 p.fn.p.init jquery-1.8.0.min.js:2 p jquery-1.8.0.min.js:2 OperationView.toggleOperationContent swagger-ui.js:1692 p.event.dispatch jquery-1.8.0.min.js:2 g.handle.h

johnraz commented 10 years ago

From the distance it looks more like a swagger-ui error :( The traceback seems cut-off by the way ;)

Seraf commented 10 years ago

It's the outpout of my chrome browser. You're right, I tried to rollback to swagger 1.2 and have the same bug. It was working last year, maybe a regression on the swagger side. I will try it again when swagger 2.0 will be merged into django-tastypie-swagger :D

Thanks

On Tue, Jun 10, 2014 at 9:54 AM, Jonathan Liuti notifications@github.com wrote:

From the distance it looks more like a swagger-ui error :( The traceback seems cut-off by the way ;)

— Reply to this email directly or view it on GitHub https://github.com/concentricsky/django-tastypie-swagger/issues/75#issuecomment-45583889 .

Julien Syx Ingénieur Systèmes & Réseaux

johnraz commented 10 years ago

Ack, I'd rather keep the issue open so we don't lose track of it.

skakri commented 10 years ago

Hey, I've just set up django-tastypie-swagger and I'm having the same issue. @Seraf maybe you have found a workaround?

Seraf commented 10 years ago

Hi @skakri , I didn't found workaround except named differently my endpoints. But @johnraz is right, it's an issue in the javascript