Exemplo n.º 1
0
def swagger_views(config_name=None, path_prefix='^'):
    return [
        url(
            path_prefix + r'swagger\.json$',
            Swagger2JSONView.as_view(swagger_config_name=config_name),
            name='django.swagger.2.0.json.view'
        ),
        url(
            path_prefix + r'$',
            SwaggerUIView.as_view(swagger_config_name=config_name),
            name="django.swagger.base.view"
        ),
    ]
Exemplo n.º 2
0
from django.conf.urls import patterns
from django.conf.urls import url
from rest_framework_swagger.views import SwaggerResourcesView, SwaggerApiView, SwaggerUIView


urlpatterns = patterns(
    '',
    url(r'^$', SwaggerUIView.as_view(), name="django.swagger.base.view"),
    url(r'^v(?P<version>\d+(\.\d+)?)/$', SwaggerUIView.as_view(), name="django.swagger.base.view__versioned"),
    url(r'^api-docs/v(?P<version>\d+(\.\d+)?)/$', SwaggerResourcesView.as_view(), name="django.swagger.resources.view"),
    url(r'^api-docs/v(?P<version>\d+(\.\d+)?)/(?P<path>.*)/?$', SwaggerApiView.as_view(), name='django.swagger.api.view'),
)
Exemplo n.º 3
0
from django.conf.urls import url
from rest_framework_swagger.views import SwaggerResourcesView, SwaggerApiView, SwaggerUIView


urlpatterns = [
    url(r'^$', SwaggerUIView.as_view(), name="django.swagger.base.view"),
    url(r'^api-docs/$', SwaggerResourcesView.as_view(), name="django.swagger.resources.view"),
    url(r'^api-docs/(?P<path>.*)/?$', SwaggerApiView.as_view(), name='django.swagger.api.view'),
]
Exemplo n.º 4
0
from django.conf.urls import patterns
from django.conf.urls import url
from rest_framework_swagger.views import SwaggerResourcesView, SwaggerApiView, SwaggerUIView

urlpatterns = patterns(
    '',
    url(r'^$', SwaggerUIView.as_view(), name="django.swagger.base.view"),
    url(r'^api-docs/$',
        SwaggerResourcesView.as_view(),
        name="django.swagger.resources.view"),
    url(r'^api-docs/(?P<path>.*)/?$',
        SwaggerApiView.as_view(),
        name='django.swagger.api.view'),
)
Exemplo n.º 5
0
Arquivo: urls.py Projeto: agh-glk/fcs
                                                           name='resume_task'),
                                                       url(r'^stop/(?P<task_id>\d+)/$', 'stop_task', name='stop_task'),
                                                       url(r'^get_data/(?P<task_id>\d+)/$', 'get_data',
                                                           name='get_data'),
                                                       url(r'^get_data/(?P<task_id>\d+)/(?P<size>\d+)/$', 'get_data',
                                                           name='get_data'),
                                                       url(r'^send_feedback/(?P<task_id>\d+)/$',
                                                           'send_feedback', name='send_feedback'),
                       ))),

                       #REST API
                       url(r'^api/', include('fcs.manager.api_urls', namespace='api')),
                       url(r'^auth/', include('oauth2_provider.urls', namespace='oauth2_provider')),

                       #Swagger REST API documentation
                       url(r'^docs/$', SwaggerUIView.as_view(), name='api_docs_ui'),
                       url(r'^docs/api-docs/$', views.api_docs_resources, name='api_docs_resources'),
                       url(r'^docs/api-docs/(?P<path>.*)/?$', views.api_docs_declaration, name='api_docs_declaration'),

                       #Autoscaling module
                       url(r'^autoscale/server/register/$', autoscale_views.register_task_server, name='register_task_server'),
                       url(r'^autoscale/server/unregister/$', autoscale_views.unregister_task_server,
                            name='unregister_task_server'),
                       url(r'^autoscale/server/stop_task/$', autoscale_views.stop_task,
                           name='stop_task_by_server'),
                       url(r'^autoscale/crawler/register/$', autoscale_views.register_crawler,
                           name='register_task_server'),
                       url(r'^autoscale/crawler/unregister/$', autoscale_views.unregister_crawler,
                           name='unregister_task_server'),

)
Exemplo n.º 6
0
from django.conf.urls import patterns
from rest_framework_swagger.views import SwaggerResourcesView, SwaggerApiView, SwaggerUIView


urlpatterns = patterns('',
    (r'^$', SwaggerUIView.as_view()),
    (r'^api-docs/$', SwaggerResourcesView.as_view()),
    (r'^api-docs/(?P<path>.*)/$', SwaggerApiView.as_view()),
)
Exemplo n.º 7
0
from django.conf.urls import patterns
from django.conf.urls import url
from rest_framework_swagger.views import SwaggerUIView, Swagger2JSONView

urlpatterns = patterns(
    '',
    url(
        r'^(?P<swagger_config_name>[\w]+)/swagger\.json$',
        Swagger2JSONView.as_view(),
        name='django.swagger.2.0.json.view'
    ),
    url(
        r'^swagger\.json$',
        Swagger2JSONView.as_view(),
        name='django.swagger.2.0.json.view'
    ),
    url(
        r'^(?P<swagger_config_name>[\w]+)/?$',
        SwaggerUIView.as_view(),
        name="django.swagger.base.view"
    ),
    url(
        r'^$',
        SwaggerUIView.as_view(),
        name="django.swagger.base.view"
    )
)
Exemplo n.º 8
0
from django.conf.urls import patterns
from rest_framework_swagger.views import SwaggerResourcesView, SwaggerApiView, SwaggerUIView

urlpatterns = patterns(
    '',
    (r'^$', SwaggerUIView.as_view()),
    (r'^api-docs/$', SwaggerResourcesView.as_view()),
    (r'^api-docs/(?P<path>.*)/$', SwaggerApiView.as_view()),
)
Exemplo n.º 9
0
from django.conf.urls import patterns
from django.conf.urls import url
from rest_framework_swagger.views import SwaggerResourcesView, SwaggerApiView, SwaggerUIView


urlpatterns = patterns(
    '',
    url(r'^$', SwaggerUIView.as_view(), name="django.swagger.base.view"),
    url(r'^api-docs/$', SwaggerResourcesView.as_view(), name="django.swagger.resources.view"),
    url(r'^api-docs/(?P<path>.*)/?$', SwaggerApiView.as_view(), name='django.swagger.api.view'),
    url(r'^v(?P<api_version>[0-9.]+)/$', SwaggerUIView.as_view(), name="django.swagger.base.view"),
    url(r'^v(?P<api_version>[0-9.]+)/api-docs/$', SwaggerResourcesView.as_view(), name="django.swagger.resources.view"),
    url(r'^v(?P<api_version>[0-9.]+)/api-docs/(?P<path>.*)/?$', SwaggerApiView.as_view(), name='django.swagger.api.view'),
)