"""Versioned API v2 stub.

The goal of v2 is **not** to rewrite v1 — it's to give us a stable mount
point we can route new endpoints into without breaking v1 clients.
Until a real v2 endpoint ships, this router only exposes a metadata view
so smoke-tests / discovery clients can confirm the version is reachable.
"""

from __future__ import annotations

from django.urls import path
from rest_framework.decorators import api_view, permission_classes
from rest_framework.permissions import AllowAny
from rest_framework.response import Response


@api_view(["GET"])
@permission_classes([AllowAny])
def version_info(_request):
    return Response(
        {
            "version": "v2",
            "status": "preview",
            "notes": "v2 is a forward-compatibility seam; new endpoints land here.",
        }
    )


urlpatterns: list = [
    path("", version_info, name="api-v2-root"),
]
