Exemple #1
0
from rest_framework import permissions
from drf_yasg.views import get_schema_view
from drf_yasg import openapi

schema_view = get_schema_view(
    openapi.Info(
        title="free5gmano NM manager API",
        default_version='v1',
        description="ETSI TS 128 541 V15.5.0 - 5G Management and orchestration;\
        5G Network Resource Model (NRM); Stage 2 and stage 3 IMPORTANT: In case of \
        Please note that this file might be not aligned to the current version of \
        discrepancies the published ETSI Group Specification takes precedence. refer \
        https://www.etsi.org/deliver/etsi_ts/128500_128599/128541/15.05.00_60/ts_128541v150500p.pdf\
        ",
        terms_of_service="https://github.com/free5gmano/free5gmano",
        contact=openapi.Contact(email="*****@*****.**"),
        license=openapi.License(name="BSD License"),
    ),
    public=False,
    permission_classes=(permissions.AllowAny, ),
)

urlpatterns = [
    url(r'^swagger(?P<format>\.json|\.yaml)$',
        schema_view.without_ui(cache_timeout=0),
        name='schema-json'),
    url(r'^swagger/$',
        schema_view.with_ui('swagger', cache_timeout=0),
        name='schema-swagger-ui'),
    url(r'^redoc/$',
        schema_view.with_ui('redoc', cache_timeout=0),
Exemple #2
0
router.register(r"scan_commands",
                views.ScanCommandViewSet,
                base_name="scan_commands")
router.register(r"scans", views.ScanViewSet, base_name="scans")
router.register(r"scheduled_scans",
                views.ScheduledScanViewSet,
                base_name="scheduled_scans")
router.register(r"sites", views.SiteViewSet, base_name="sites")

schema_view = get_schema_view(
    openapi.Info(
        title="Scantron API",
        default_version="v1",
        description="Scantron API documentation",
        terms_of_service="https://github.com/rackerlabs/scantron",
        contact=openapi.Contact(
            email="https://github.com/rackerlabs/scantron"),
        license=openapi.License(name="Apache License, Version 2.0"),
    ),
    public=False,
    permission_classes=(
        permissions.IsAuthenticated, ),  # comma needed inside parenthesis.
)

urlpatterns = [
    url(r"^swagger(?P<format>\.json|\.yaml)$",
        schema_view.without_ui(cache_timeout=0),
        name="schema-json"),
    url(r"^swagger/$",
        schema_view.with_ui("swagger", cache_timeout=0),
        name="schema-swagger-ui"),
    url(r"^redoc/$",
Exemple #3
0
api_version = "v1"

router = routers.DefaultRouter()
router.register(r"raw-materials", RawMaterialViewSet)
router.register(r"employees", EmployeeViewSet)
router.register(r"final-products", FinalProductViewSet)

schema_view = get_schema_view(
    openapi.Info(
        title="Production Center API",
        default_version=api_version,
        description=
        "An API to manage the entities Raw Material, Employee, Final Product and generate reports for.",
        terms_of_service=
        "http://generator.lorem-ipsum.info/terms-and-conditions",
        contact=openapi.Contact(email="*****@*****.**"),
        license=openapi.License(name="BSD License"),
    ),
    public=True,
    permission_classes=(permissions.AllowAny, ),
)

patterns = (
    [
        path("swagger", schema_view.with_ui("swagger", cache_timeout=0)),
        path("redoc", schema_view.with_ui("redoc", cache_timeout=0)),
        path("api/v1/", include(router.urls, None)),
    ],
    api_version,
)
Exemple #4
0
#     url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
#     url(r'^api-token-auth/', obtain_jwt_token),
#     url(r"^docs/$", schema_view)
# ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

from rest_framework import permissions
from drf_yasg.views import get_schema_view
from drf_yasg import openapi

schema_view = get_schema_view(
    openapi.Info(
        title="Phoenix 资产系统",
        default_version='v1',
        description="Phoenix 资产系统文档",
        terms_of_service="http://phoenix.xxxx.com/",
        contact=openapi.Contact(email="*****@*****.**"),
        license=openapi.License(name="MIT License"),
    ),
    public=True,
    permission_classes=(permissions.AllowAny, ),
)

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^api/', include(router.urls)),
    url(r'^api-auth/',
        include('rest_framework.urls', namespace='rest_framework')),
    url(r'^api-token-auth/', obtain_jwt_token),
    url(r'^swagger(?P<format>\.json|\.yaml)$',
        schema_view.without_ui(cache_timeout=0),
        name='schema-json'),
Exemple #5
0
from apps.core.api.views import TokenObtainPairExtendedView
from apps.core.views import MainView

API_TITLE = 'PmDragon API'
API_DESCRIPTION = 'Web API for PmDragon service'
schema_url_patterns = [
	url(r'^api/', include('apps.core.api.urls'))
]

schema_view = get_schema_view(
	openapi.Info(
		title="PmDragon API",
		default_version='v1',
		description="Swagger documentation for PmDragon API",
		contact=openapi.Contact(email="*****@*****.**"),
		license=openapi.License(name="MIT License"),
	),
	public=True,
	permission_classes=(AllowAny,),
)

app_name = 'auth_api'

urlpatterns = [
	path('', MainView.as_view()),
	path('admin/', admin.site.urls),
	path('login/', auth_views.LoginView.as_view(), name='login'),

	path('schema/', schema_view.without_ui(cache_timeout=0), name='openapi-schema'),
# JWT Authentication
from rest_framework_simplejwt import views as jwt_views

# Swagger
from rest_framework import permissions
from drf_yasg.views import get_schema_view
from drf_yasg import openapi

schema_view = get_schema_view(
    openapi.Info(
        title="Restful API",
        default_version='v1',
        description="Restful API Boilerplate",
        terms_of_service="https://example.com/policies/terms/",
        contact=openapi.Contact(email="*****@*****.**"),
        license=openapi.License(name="BSD License"),
    ),
    public=True,
    permission_classes=(permissions.AllowAny, ),
)

router = routers.DefaultRouter()
router.register(r'users', core_views.UserViewSet)
# router.register(r'groups', core_views.GroupViewSet)
router.register(r'posts', post_views.PostViewSet)

urlpatterns = [
    path('admin/', admin.site.urls),
    # path('api/', schema_view, name='openapi-schema'),
Exemple #7
0
from django.conf.urls.static import static
from django.contrib import admin
from django.urls import include, path
from drf_yasg import openapi
from drf_yasg.views import get_schema_view
from rest_framework import permissions

from service.settings import MEDIA_ROOT, MEDIA_URL

schema_view = get_schema_view(
    openapi.Info(
        title="Users API",
        default_version='v1',
        description="User Service API",
        terms_of_service="",
        contact=openapi.Contact(email="*****@*****.**"),
        license=openapi.License(name="Apache License"),
    ),
    public=True,
    permission_classes=(permissions.AllowAny, ),
)

urlpatterns = [
    path('', include('users.urls')),
    path('admin/', admin.site.urls),
    path('api-auth/', include('rest_framework.urls',
                              namespace='rest_framework')),
    url(r'^swagger(?P<format>\.json|\.yaml)$',
        schema_view.without_ui(cache_timeout=0),
        name='schema-json'),
    url(r'^swagger/$',
Exemple #8
0
                path("token/", TokenObtainPairView.as_view(), name="token_obtain_pair"),
                path("token/refresh/", TokenRefreshView.as_view(), name="token_refresh"),
                path("api/token/verify/", TokenVerifyView.as_view(), name="token_verify"),
            ],
        ),
    ),
]

if settings.DEBUG:
    import debug_toolbar
    from drf_yasg import openapi
    from drf_yasg.views import get_schema_view

    schema_view = get_schema_view(
        openapi.Info(
            title="drf-base",
            default_version="v1",
            description="drf boilerplate",
            contact=openapi.Contact(email="*****@*****.**"),
        ),
        public=False,
        permission_classes=(permissions.AllowAny,),
    )

    urlpatterns = [
        *static(settings.STATIC_URL, document_root=settings.STATIC_ROOT),
        *static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT),
        path("swagger/", schema_view.with_ui("swagger", cache_timeout=0)),
        path("__debug__/", include(debug_toolbar.urls)),
    ] + urlpatterns
Exemple #9
0
    PasswordResetView,
    LogoutView,
)
from rest_framework_simplejwt.views import (
    TokenObtainPairView,
    TokenRefreshView,
)
from accounts.views import CustomConfirmEmailView

schema_view = get_schema_view(
    openapi.Info(
        title='Procure API',
        default_version='v1',
        description='Procure application: An E-commerce site',
        terms_of_service='https://www.google.com/policies/terms/',
        contact=openapi.Contact(email='*****@*****.**'),
        license=openapi.License(name='BSD License'),
    ),
    public=True,
    permission_classes=(permissions.AllowAny, ),
)

urlpatterns = [
    path('admin/', admin.site.urls),
    path('api/v1/accounts/', include('accounts.urls')),
    path('api/v1/products/', include('products.urls')),
    path('api/v1/orders/', include('orders.urls')),
    path('api-auth/', include('rest_framework.urls')),
    path('api/v1/rest-auth/registration/',
         include('rest_auth.registration.urls')),
    path('api/v1/rest-auth/login/',
Exemple #10
0
from django.contrib import admin
from django.urls import path, re_path
from django.urls.conf import include
from drf_yasg import openapi
from drf_yasg.views import get_schema_view
from dotenv import load_dotenv

load_dotenv()

schema_view = get_schema_view(
    openapi.Info(
        title="Snippets API",
        default_version='v1',
        description="Test description",
        terms_of_service="https://www.google.com/policies/terms/",
        contact=openapi.Contact(email=os.getenv('EMAIL')),
        license=openapi.License(name="BSD License"),
    ),
    public=True,
)

urlpatterns = [
    path('admin/', admin.site.urls),
    re_path(r'^swagger(?P<format>\.json|\.yaml)$',
            schema_view.without_ui(cache_timeout=0),
            name='schema-json'),
    re_path(r'^swagger/$',
            schema_view.with_ui('swagger', cache_timeout=0),
            name='schema-swagger-ui'),
    re_path(r'^redoc/$',
            schema_view.with_ui('redoc', cache_timeout=0),
Exemple #11
0
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include
from rest_framework import permissions
from drf_yasg.views import get_schema_view
from drf_yasg import openapi
from knox.views import LogoutView

schema_view = get_schema_view(
    openapi.Info(
        title="Bookateria API",
        default_version='v1',
        description="https://bookateria.net/",
        contact=openapi.Contact(email="*****@*****.**"),
    ),
    public=True,
    permission_classes=(permissions.AllowAny, ),
)

urlpatterns = [
    path('admin/', admin.site.urls),
    path('',
         schema_view.with_ui('swagger', cache_timeout=0),
         name='schema-swagger-ui'),
    path('api_auth/', include('knox.urls')),
    path('documents/', include('books.urls')),
    path('accounts/', include('accounts.urls')),
    path('forum/', include('forum.urls')),
    path('users/', include('users.urls')),
Exemple #12
0
from rest_framework.permissions import AllowAny

from .mocks import TestView, TestRelationshipViewSet

from rest_framework_nested import routers

from drf_jsonapi.generators import OpenAPISchemaGenerator
from drf_jsonapi.routers import RelationshipRouter

schema_view = get_schema_view(
    # TODO: Verify API info details
    openapi.Info(
        title="Vacasa Housekeeping API",
        default_version="v1",
        contact=openapi.Contact(email="*****@*****.**"),
    ),
    validators=[],
    public=True,
    permission_classes=(AllowAny,),
    generator_class=OpenAPISchemaGenerator,
)

urlpatterns = [
    re_path(
        r"swagger(?P<format>.json|.yaml)$",
        schema_view.without_ui(cache_timeout=1),
        name="schema-json",
    ),
    path("spec", schema_view.with_ui("redoc", cache_timeout=1), name="schema-redoc"),
]
Exemple #13
0
urlpatterns += [
    path("api-auth/", include("rest_framework.urls")),
    # Implement your own User Authentication End points
    path("dj-rest-auth/", include("dj_rest_auth.urls")),
    path("dj-rest-auth/registration/",
         include("dj_rest_auth.registration.urls")),
]

# Adding the Django Rest Framework's Documents
schema_view = get_schema_view(
    openapi.Info(
        title="Blog API",
        default_version="v1",
        description="A simple API for learning DRF",
        terms_of_service="https://policies.google.com/terms",
        contact=openapi.Contact(email="*****@*****.**"),
        license=openapi.License(name="BSD License"),
    ),
    public=True,
    permission_classes=(permissions.AllowAny, ),
)

# Adding the Swagger API Documentation
urlpatterns += [
    path("swagger/",
         schema_view.with_ui("swagger", cache_timeout=0),
         name="schema-ui"),
    path("redoc/",
         schema_view.with_ui("redoc", cache_kwargs=0),
         name="schema-doc"),
]
Exemple #14
0
from rest_framework import permissions
from drf_yasg.views import get_schema_view
from drf_yasg import openapi

from service.views import IlceViewSet, SehirViewSet, KategoriViewSet, AltKategoriViewSet, UrunViewSet, \
   UrunResimlerViewSet, UrunOzellikleriViewSet, UrunFiyatViewSet, AdresViewSet, UrunDetailSet, Files_APIView, \
   Files_APIView_Detail

schema_view = get_schema_view(
    openapi.Info(
        title="E-COMMERCE API",
        default_version='v1',
        description="Test description",
        terms_of_service="https://www.ecommerce.com/policies/terms/",
        contact=openapi.Contact(email="*****@*****.**"),
        license=openapi.License(name="BSD License"),
    ),
    public=True,
    permission_classes=(permissions.AllowAny, ),
)

router = routers.DefaultRouter()
"""
router.register(r'Ilce', IlceViewSet)
router.register(r'Sehir', SehirViewSet)
router.register(r'Adres', AdresViewSet)
router.register(r'Kategori', KategoriViewSet)
router.register(r'AltKategori', AltKategoriViewSet)"""
router.register(r'Urun', UrunViewSet)
#router.register(r'UrunDetay', UrunDetailSet)
Exemple #15
0
from django.views.decorators.csrf import csrf_exempt
from django.http import HttpResponse
from django.utils.encoding import iri_to_uri
from rest_framework import permissions
from drf_yasg.views import get_schema_view
from drf_yasg import openapi

from .views import IndexView, LunaView

schema_view = get_schema_view(
    openapi.Info(
        title="Glance API Docs",
        default_version='v1',
        description="Glance Restful api docs",
        terms_of_service="https://www.glance.org",
        contact=openapi.Contact(email="*****@*****.**"),
        license=openapi.License(name="GPLv2 License"),
    ),
    public=True,
    permission_classes=(permissions.AllowAny, ),
)
api_url_pattern = re.compile(
    r'^/api/(?P<version>\w+)/(?P<app>\w+)/(?P<extra>.*)$')


class HttpResponseTemporaryRedirect(HttpResponse):
    status_code = 307

    def __init__(self, redirect_to):
        HttpResponse.__init__(self)
        self['Location'] = iri_to_uri(redirect_to)
Exemple #16
0
admin.site.site_header = "falco Administration"

schema_view = get_schema_view(
    openapi.Info(
        title="Falco API",
        default_version="",
        description=
        """This is the API documentation for this instance of [Falco](https://getfal.co).

If you have any question or would want to raise an issue, head to the [GitHub repository](https://github.com/theodo/falco).


To obtain a Falco API Key, you can login to Falco and inspect any XHR call inside the Dev Tools.""",
        terms_of_service=
        "https://github.com/theodo/falco/blob/master/CODE_OF_CONDUCT.md",
        contact=openapi.Contact(email="*****@*****.**"),
        license=openapi.License(name="MIT License"),
    ),
    public=True,
    permission_classes=(permissions.AllowAny, ),
)

urlpatterns = [
    url(
        r"^swagger(?P<format>\.json|\.yaml)$",
        schema_view.without_ui(cache_timeout=0),
        name="schema-json",
    ),
    url(
        r"^swagger/$",
        schema_view.with_ui("swagger", cache_timeout=0),
Exemple #17
0
"""
from django.conf.urls import url
from django.contrib import admin
from django.urls import path, include
from drf_yasg import openapi
from drf_yasg.views import get_schema_view
from rest_framework.permissions import AllowAny

admin.site.site_header = "NU Laundry Administration"
admin.site.site_title = "NU Laundry Administration"

schema_view = get_schema_view(openapi.Info(
    title='NU Laundry API',
    default_version='v1',
    description="API based on DRF YASG for NU Laundry",
    contact=openapi.Contact(email="*****@*****.**"),
    license=openapi.License(name="BSD License")),
                              validators=['flex', 'ssv'],
                              public=True,
                              permission_classes=(AllowAny, ))

urlpatterns = [
    url(r'^swagger(?P<format>\.json|\.yaml)$',
        schema_view.without_ui(cache_timeout=0),
        name='schema-json'),
    url(r'^swagger/$',
        schema_view.with_ui('swagger', cache_timeout=0),
        name='schema-swagger-ui'),
    url(r'^redoc/$',
        schema_view.with_ui('redoc', cache_timeout=0),
        name='schema-redoc'),
Exemple #18
0
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include
from rest_framework import permissions
from drf_yasg.views import get_schema_view
from drf_yasg import openapi

schema_view = get_schema_view(
    openapi.Info(
        title="Andy API",
        default_version="v1",
        description="Proof of concept",
        terms_of_service="https://www.google.com/policies/terms/",
        contact=openapi.Contact(email="*****@*****.**"),
        license=openapi.License(name="BSD License"),
    ),
    public=True,
    permission_classes=(permissions.AllowAny, ),
)

urlpatterns = [
    path('admin/', admin.site.urls),
    path('api/', include('pages.urls')),
    path('api-auth/', include('rest_framework.urls')),
    path('api/dj-rest-auth/', include('dj_rest_auth.urls')),
    # path('api/dj-rest-auth/registration/', include('dj_rest_auth.registration.urls')),
    path('swagger/',
         schema_view.with_ui('swagger', cache_timeout=0),
         name='schema-swagger-ui'),
Exemple #19
0
from rest_framework import permissions
from drf_yasg.views import get_schema_view
from drf_yasg import openapi

schema_view = get_schema_view(
    openapi.Info(
        title="Just dating API",
        default_version='v1',
        description=''' Documentation
      The `ReDoc` view can be found [here](/doc).
      The Mobile Ionic app can be found [here](/mobi).
      The Web app can be found [here](/web).
      ''',
        terms_of_service="https://www.google.com/policies/terms/",
        contact=openapi.Contact(email="*****@*****.**"),
        license=openapi.License(name="BSD License"),
    ),
    public=True,
    permission_classes=(permissions.AllowAny, ),
)

from web.views import index_web, index_mobi

urlpatterns = [
    path('web/', index_web),
    path('mobi/', index_mobi),
    path('mobi/folder/Inbox', index_mobi),
    path('mobi/<slug:slug>', index_mobi),
    path('mobi/chat/<slug:slug>', index_mobi),
    path(
Exemple #20
0
from django.conf.urls.static import static
from main.views import CategoryViewSet, PostViewSet,CommentViewSet, RatingViewSet, LikeAPIView, \
    HistoryAPIView, ParsAPIView

from django.contrib import admin
from django.urls import path, include
from drf_yasg import openapi
from drf_yasg.views import get_schema_view
from rest_framework.routers import DefaultRouter

schema_view = get_schema_view(
    openapi.Info(
        title='Stack API',
        default_version='v1',
        description='Test Description',
        contact=openapi.Contact(email='*****@*****.**'),
    ),
    public=True,
)

router = DefaultRouter()
router.register('posts', PostViewSet)
router.register('comments', CommentViewSet)
router.register('categories', CategoryViewSet)
router.register('rating', RatingViewSet)

urlpatterns = [
    path('admin/', admin.site.urls),
    path('api/v1/docs/', schema_view.with_ui()),
    path('api-auth/', include('rest_framework.urls')),
    path('v1/api/like/<int:post_id>/', LikeAPIView.as_view()),
Exemple #21
0
from drf_yasg import openapi
from drf_yasg.views import get_schema_view
from rest_framework import permissions, authentication

from environments.views import SDKIdentitiesDeprecated, SDKTraitsDeprecated, SDKIdentities, SDKTraits
from features.views import SDKFeatureStates
from environments.views import SDKIdentities, SDKTraits
from segments.views import SDKSegments

schema_view = get_schema_view(
    openapi.Info(
        title="Bullet Train API",
        default_version='v1',
        description="",
        license=openapi.License(name="BSD License"),
        contact=openapi.Contact(email="*****@*****.**"),
    ),
    public=False,
    permission_classes=(permissions.AllowAny, ),
    authentication_classes=(authentication.SessionAuthentication, ))

current_urls = [
    url(r'^organisations/', include('organisations.urls')),
    url(r'^projects/', include('projects.urls')),
    url(r'^environments/', include('environments.urls')),
    url(r'^users/', include('users.urls')),
    url(r'^auth/', include('rest_auth.urls')),
    url(r'^auth/register/', include('rest_auth.registration.urls')),
    url(r'^account/', include('allauth.urls')),
    url(r'^e2etests/', include('e2etests.urls')),
    url(r'^features/', include('features.urls')),
Exemple #22
0
grouped_url_patterns = {
    'base_patterns': [
        re_path(r'^status/', include('health.urls')),
    ],
    'bouwdossiers_patterns': [
        re_path(r'^iiif-metadata/', include(bouwdossiers_urls.urls)),
    ],
}

schema_view = get_schema_view(
    openapi.Info(
        title="Bouwdossiers API",
        default_version='v1',
        description="Bouwdossiers API",
        terms_of_service="https://data.amsterdam.nl/",
        contact=openapi.Contact(email="*****@*****.**"),
        license=openapi.License(name="CC0 1.0 Universal"),
    ),
    public=True,
    permission_classes=(permissions.AllowAny, ),
)

urlpatterns = [
    re_path(r'^iiif-metadata/docs/swagger(?P<format>\.json|\.yaml)$',
            schema_view.without_ui(cache_timeout=None),
            name='schema-json'),
    re_path(r'^iiif-metadata/docs/swagger/$',
            schema_view.with_ui('swagger', cache_timeout=None),
            name='schema-swagger-ui'),
    re_path(r'^iiif-metadata/docs/redoc/$',
            schema_view.with_ui('redoc', cache_timeout=None),
Exemple #23
0
"""
from django.contrib import admin
from django.urls import path,include


from rest_framework import permissions
from drf_yasg.views import get_schema_view
from drf_yasg import openapi

schema_view = get_schema_view(
    openapi.Info(
        title="Contact List API",
        default_version='v1',
        description="An api for contacts",
        terms_of_service="https://yourco/terms/",
        contact=openapi.Contact(email="*****@*****.**"),
        license=openapi.License(name="Test License"),
    ),
    public=True,
    permission_classes=(permissions.AllowAny,),
)


urlpatterns = [
    path('admin/', admin.site.urls),

    path('api/auth/', include('authentication.urls')),
    path('api/contact/', include('contact.urls')),

     path('', schema_view.with_ui('swagger',
                                 cache_timeout=0), name='schema-swagger-ui'),
Exemple #24
0
from django.conf import settings
from django.conf.urls import include
from django.views.generic.base import RedirectView
from django.views.static import serve
from rest_framework.permissions import AllowAny
from drf_yasg.views import get_schema_view
from drf_yasg import openapi

from core import views

handler500 = 'core.views.custom_500'

schema_view = get_schema_view(
    openapi.Info(title="Label Studio API",
                 default_version='v2',
                 contact=openapi.Contact(url="https://labelstud.io"),
                 x_logo={"url": "../../static/icons/logo-black.svg"}),
    public=True,
    permission_classes=(AllowAny, ),
)

urlpatterns = [
    re_path(r'^$', views.main, name='main'),
    re_path(
        r'^favicon\.ico$',
        RedirectView.as_view(url='/static/images/favicon.ico',
                             permanent=True)),
    re_path(r'^label-studio-frontend/(?P<path>.*)$',
            serve,
            kwargs={
                'document_root': settings.EDITOR_ROOT,
from rest_framework import permissions
from drf_yasg.views import get_schema_view
from drf_yasg import openapi

schema_view = get_schema_view(
    openapi.Info(
        title=
        'Medicare Appeals Sweeping Transparency and Reconciliation Prototype API',
        default_version='v0.1',
        description=
        'Medicare Appeals Sweeping Transparency and Reconciliation Prototype API documentation',
        terms_of_service='Terms of Service: TDB',
        contact=openapi.Contact(email='*****@*****.**'),
        license=openapi.License(name='CC0 1.0 Universal'),
    ),
    public=True,
    permission_classes=(permissions.AllowAny, ),
)
Exemple #26
0
from django.contrib import admin
from django.urls import path, include
from rest_framework.documentation import include_docs_urls
from rest_framework import permissions
from drf_yasg.views import get_schema_view
from drf_yasg import openapi

schema_view = get_schema_view(
    openapi.Info(
        title="Budget-Go API",
        default_version='v1',
        description="Budget-Go API",
        terms_of_service="https://www.google.com/policies/terms/",
        contact=openapi.Contact(email="*****@*****.**"),
        license=openapi.License(name="MIT License"),
    ),
    public=True,
    permission_classes=(permissions.AllowAny, ),
)

urlpatterns = [
    path('auth/', include('rest_framework.urls')),
    path('admin/', admin.site.urls),
    path('api/accounts/', include('accounts.urls')),
    path('api/budget/', include('budget.urls')),
    path('',
         schema_view.with_ui('swagger', cache_timeout=0),
         name='Budget-Go API'),  # Doc with swagger schema
    path('api/redoc/',
         schema_view.with_ui('redoc', cache_timeout=0),
         name='Budget-Go API'),  # Doc with redoc schema
Exemple #27
0
from django.contrib import admin
from django.urls import path, include
from drf_yasg.views import get_schema_view
from drf_yasg import openapi
from rest_framework import permissions


schema_view = get_schema_view(
   openapi.Info(
      title="MoveOn API",
      default_version='v1',
      description="This is a swagger api for MoveOn app",
      contact=openapi.Contact(email="*****@*****.**"),
      license=openapi.License(name="BSD License"),
   ),
   public=True,
   permission_classes=[permissions.AllowAny],
)

urlpatterns = [
    path('swagger/', schema_view.with_ui('swagger', cache_timeout = 0), name='schema-swagger-ui '),
    path('people/', include('person.urls'))
]
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include
from core import views

from rest_framework import permissions
from drf_yasg.views import get_schema_view
from drf_yasg import openapi

schema_view = get_schema_view(
   openapi.Info(
      title="Fastbreak API",
      default_version='v1',
      description="Test description",
      terms_of_service="https://www.google.com/policies/terms/",
      contact=openapi.Contact(email="*****@*****.**"),
      license=openapi.License(name="BSD License"),
      url="fastbreak-api.herokuapp.com"
   ),
   public=True,
   permission_classes=[permissions.AllowAny],
)

urlpatterns = [
    path('admin/', admin.site.urls),
    path('api-auth/', include('rest_framework.urls')),
    path('', views.get_data, name = "api"),
]
Exemple #29
0
from django.contrib import admin
from django.urls import path, re_path
from rest_framework import permissions
from drf_yasg.views import get_schema_view
from drf_yasg import openapi

from parliment_api import views


schema_view = get_schema_view(
   openapi.Info(
      title="Parliament API",
      default_version='v1',
      description="API for scraped parliament data",
      terms_of_service="https://www.google.com/policies/terms/",
      contact=openapi.Contact(email="*****@*****.**"),
      license=openapi.License(name="BSD License"),
   ),
   public=True,
   permission_classes=(permissions.AllowAny,),
)


urlpatterns = [
    path('admin/', admin.site.urls),
    path('list/', views.ParliamentData.as_view(), name='home'),
    re_path('search/', views.FilterParliamentData.as_view(), name='filtered_data'),
    path('mp/<int:pk>/', views.ParliamentDataById.as_view(), name='mp_by_id'),
    path('', schema_view.with_ui('swagger', cache_timeout=0), name='schema-swagger-ui')
]
Exemple #30
0
from drf_yasg.views import get_schema_view
from drf_yasg import openapi

schema_view = get_schema_view(
    openapi.Info(
        title="MakeWebnBot Contact API",
        default_version='v1',
        description='''
        메이크웹앤봇 문의확인 게시판 API 문서입니다.
        
        현재 List, Create만 API 구현이 되어 있습니다.
        
        Create 메뉴를 눌러 응답을 확인 해주세요.
        ''',
        terms_of_service="https://www.google.com/policies/terms/",
        contact=openapi.Contact(email="*****@*****.**"),
        license=openapi.License(name="BSD License"),
    ),
    public=True,
    permission_classes=(permissions.AllowAny, ),
)

urlpatterns = [
    path('swagger<str:format>',
         schema_view.without_ui(cache_timeout=0),
         name='schema-json'),
    path('swagger/',
         schema_view.with_ui('swagger', cache_timeout=0),
         name='schema-swagger-ui'),
    path('docs/',
         schema_view.with_ui('redoc', cache_timeout=0),