-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
5 changed files
with
183 additions
and
10 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -16,14 +16,42 @@ | |
""" | ||
|
||
from django.contrib import admin | ||
from django.urls import include, path | ||
from django.urls import include, path, re_path | ||
from drf_yasg import openapi | ||
from drf_yasg.views import get_schema_view | ||
from rest_framework import permissions | ||
|
||
from .__app_configs import Paths | ||
from .views.health import health | ||
|
||
schema_view = get_schema_view( | ||
openapi.Info( | ||
title="Sports Tracking App", | ||
default_version="v1", | ||
description="The Django App to track sport results", | ||
terms_of_service="https://www.google.com/policies/terms/", | ||
contact=openapi.Contact(email="[email protected]"), | ||
license=openapi.License(name="MIT License"), | ||
), | ||
public=True, | ||
permission_classes=(permissions.AllowAny,), | ||
) | ||
urlpatterns = [ | ||
path(Paths.calc_path.value, include("calculator.urls")), | ||
path(Paths.tennis_path.value, include("tennis.urls")), | ||
path(Paths.admin_path.value, admin.site.urls), | ||
path(Paths.health_path.value, health, name=Paths.health.value), | ||
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), name="schema-redoc" | ||
), | ||
] |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters