chore(api): document version endpoint

This commit is contained in:
jo 2022-07-19 18:53:06 +02:00 committed by Jonas L
parent 0e3ede5a1a
commit 1f7c2fa0ab
8 changed files with 40 additions and 15 deletions

View file

@ -0,0 +1,14 @@
from django.conf import settings
from rest_framework.permissions import AllowAny
from rest_framework.response import Response
from rest_framework.views import APIView
from ..serializers import VersionSerializer
class VersionView(APIView):
permission_classes = [AllowAny]
serializer_class = VersionSerializer
def get(self, request):
return Response({"api_version": settings.API_VERSION})