Skip to content
Snippets Groups Projects

GREG-25: Adding namespace versioning

Merged Tore.Brede requested to merge GREG-25_add_api_versioning into master
1 file
+ 2
12
Compare changes
  • Side-by-side
  • Inline
+ 2
12
from django.core.exceptions import ValidationError
from django_filters import rest_framework as filters
from drf_spectacular.utils import extend_schema, OpenApiParameter
from rest_framework import viewsets, status, mixins
from rest_framework import viewsets, status
from rest_framework.response import Response
from rest_framework.viewsets import GenericViewSet
from greg.api.filters import PersonFilter, PersonRoleFilter, PersonIdentityFilter
from greg.api.pagination import PrimaryKeyCursorPagination
from greg.api.serializers.person import (
PersonSerializer,
PersonRoleSerializer,
PersonIdentitySerializer, PersonSummarySerializer,
PersonIdentitySerializer,
)
from greg.models import Person, PersonRole, PersonIdentity
@@ -115,12 +114,3 @@ class PersonIdentityViewSet(viewsets.ModelViewSet):
return Response(
serializer.data, status=status.HTTP_201_CREATED, headers=headers
)
class PersonSummaryViewSet(mixins.ListModelMixin, GenericViewSet):
queryset = Person.objects.all().order_by("id")
serializer_class = PersonSummarySerializer
pagination_class = PrimaryKeyCursorPagination
Loading