Skip to content

Commit

Permalink
Remove drf-yasg as I like drf_spectacular better
Browse files Browse the repository at this point in the history
  • Loading branch information
joshSzep committed Jul 8, 2024
1 parent ab4b206 commit f69e866
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 85 deletions.
14 changes: 7 additions & 7 deletions challenges/urls.py
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
from django.urls import include, path
from django.urls import include
from django.urls import path
from rest_framework import routers

from .views import (
ChallengeResultViewSet,
ChallengeViewSet,
SentenceViewSet,
challenge_view,
)
from .views import ChallengeResultViewSet
from .views import ChallengeViewSet
from .views import SentenceViewSet
from .views import challenge_view


router = routers.DefaultRouter()
router.register(r"sentences", SentenceViewSet)
Expand Down
1 change: 0 additions & 1 deletion hangul_tutor/settings.py
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@
"django.contrib.messages",
"django.contrib.staticfiles",
"rest_framework",
"drf_yasg",
"core",
"challenges",
"marketing",
Expand Down
23 changes: 0 additions & 23 deletions hangul_tutor/urls.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,35 +23,12 @@
from drf_spectacular.views import SpectacularAPIView
from drf_spectacular.views import SpectacularRedocView
from drf_spectacular.views import SpectacularSwaggerView
from drf_yasg import openapi
from drf_yasg.views import get_schema_view
from rest_framework import permissions


schema_view = get_schema_view(
openapi.Info(
title="Hangul Typing Tutor API",
default_version="v1",
description="API for Hangul Typing Tutor",
terms_of_service="",
contact=openapi.Contact(email="[email protected]"),
license=openapi.License(name="MIT License"),
),
public=True,
permission_classes=(permissions.AllowAny,),
)


urlpatterns = [
path("admin/", admin.site.urls),
path("", include("challenges.urls")),
path("", include("marketing.urls")),
# drf-yasg views
path(
"swagger/",
schema_view.with_ui("swagger", cache_timeout=0),
name="schema-swagger-ui",
),
# drf-spectacular views
path(
"schema/",
Expand Down
52 changes: 1 addition & 51 deletions poetry.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 1 addition & 3 deletions pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -10,9 +10,7 @@ python = "^3.12"
Django = "^5.0.6"
djangorestframework = "^3.15.2"
uuid7 = "^0.1.0"
drf-yasg = "^1.21.7"
setuptools = "^70.2.0"
drf-spectacular = {extras = ["sidecar"], version = "^0.27.2"}
drf-spectacular = { extras = ["sidecar"], version = "^0.27.2" }

[tool.poetry.group.dev.dependencies]
isort = "^5.13.2"
Expand Down

0 comments on commit f69e866

Please sign in to comment.