Skip to content
Snippets Groups Projects
Verified Commit 2424a333 authored by Ernesto Rico Schmidt's avatar Ernesto Rico Schmidt
Browse files

Annonate APIImageViewSet

parent a0c9ea47
No related branches found
No related tags found
No related merge requests found
......@@ -299,6 +299,20 @@ class APIUserViewSet(
return Response(serializer.errors, status=status.HTTP_400_BAD_REQUEST)
@extend_schema_view(
create=extend_schema(summary="Create a new image."),
destroy=extend_schema(summary="Delete an existing image."),
list=extend_schema(summary="List all images."),
partial_update=extend_schema(
summary="Partially update an existing image.",
description="Only `alt_text`, `credits`, and `ppoi` can be updated.",
),
retrieve=extend_schema(summary="Retrieve a single image."),
update=extend_schema(
summary="Update an existing image.",
description="Only `alt_text`, `credits`, and `ppoi` can be updated.",
),
)
class APIImageViewSet(viewsets.ModelViewSet):
queryset = Image.objects.all()
serializer_class = ImageSerializer
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment