# Path: tests/project/admin_api.py
# class FooAPI(BananasAdminAPI):
# 
#     name = lazy_title(_("foo"))
#     serializer_class = HamSerializer
# 
#     def list(self, request: Request) -> Response:
#         serializer = self.serializer_class({"spam": "Skinka"})
#         return Response(serializer.data)
# 
#     @action(detail=False)
#     def bar(self, request: Request) -> Response:
#         return Response({"bar": True})
# 
#     @tags(include=["navigation"])
#     @action(detail=False, methods=["get", "post"])
#     def baz(self, request: Request) -> Response:
#         return Response({"baz": True})
# 
# class HamAPI(BananasAPI, viewsets.ModelViewSet):
# 
#     name = lazy_capitalize(_("ham"))
#     serializer_class = HamSerializer
# 
#     def get_queryset(self) -> QuerySet:
#         return None  # type: ignore
# 
#     @tags(exclude=["navigation"])
#     def list(self, request: Request, *args: Any, **kwargs: Any) -> Response:
#         return Response()
# 
# Path: tests/project/drf/fenced_api.py
# class SimpleSerializer(ModelSerializer):
#     class Meta:
# class AllowIfUnmodifiedSinceAPI(FencedUpdateModelMixin, GenericViewSet):
# class AllowIfMatchAPI(FencedUpdateModelMixin, GenericViewSet):
#     def get_queryset(self) -> "QuerySet[Parent]":


from django.urls import include, re_path
from bananas import admin
from bananas.admin import api
from . import separate_api
from .admin_api import FooAPI, HamAPI
from .drf import fenced_api



urlpatterns = [re_path(r"^admin/", admin.site.urls)]


api.register(FooAPI)
api.register(HamAPI)

urlpatterns += [
    re_path(r"^api/bananas", include("bananas.admin.api.urls")),
    re_path(r"^api/separate", include(separate_api)),

# Path: tests/project/admin_api.py
# class FooAPI(BananasAdminAPI):
# 
#     name = lazy_title(_("foo"))
#     serializer_class = HamSerializer
# 
#     def list(self, request: Request) -> Response:
#         serializer = self.serializer_class({"spam": "Skinka"})
#         return Response(serializer.data)
# 
#     @action(detail=False)
#     def bar(self, request: Request) -> Response:
#         return Response({"bar": True})
# 
#     @tags(include=["navigation"])
#     @action(detail=False, methods=["get", "post"])
#     def baz(self, request: Request) -> Response:
#         return Response({"baz": True})
# 
# class HamAPI(BananasAPI, viewsets.ModelViewSet):
# 
#     name = lazy_capitalize(_("ham"))
#     serializer_class = HamSerializer
# 
#     def get_queryset(self) -> QuerySet:
#         return None  # type: ignore
# 
#     @tags(exclude=["navigation"])
#     def list(self, request: Request, *args: Any, **kwargs: Any) -> Response:
#         return Response()
# 
# Path: tests/project/drf/fenced_api.py
# class SimpleSerializer(ModelSerializer):
#     class Meta:
# class AllowIfUnmodifiedSinceAPI(FencedUpdateModelMixin, GenericViewSet):
# class AllowIfMatchAPI(FencedUpdateModelMixin, GenericViewSet):
#     def get_queryset(self) -> "QuerySet[Parent]":


# Path: tests/project/urls.py
from django.urls import include, re_path
from bananas import admin
from bananas.admin import api
from . import separate_api
from .admin_api import FooAPI, HamAPI
from .drf import fenced_api




urlpatterns = [re_path(r"^admin/", admin.site.urls)]


api.register(FooAPI)
api.register(HamAPI)

urlpatterns += [
    re_path(r"^api/bananas", include("bananas.admin.api.urls")),
    re_path(r"^api/separate", include(separate_api)),

    re_path(r"^api/", include(fenced_api)),