Skip to content

Commit

Permalink
New endpoint - all collection versions unpaginated
Browse files Browse the repository at this point in the history
  • Loading branch information
fao89 committed Jan 8, 2021
1 parent 25c4359 commit e32bff6
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 0 deletions.
2 changes: 2 additions & 0 deletions CHANGES/7941.feature
@@ -0,0 +1,2 @@
Introduce a new ``v3/metadata/<str:namespace>/<str:name>/versions/`` endpoint returning
all collections versions unpaginated
6 changes: 6 additions & 0 deletions pulp_ansible/app/galaxy/v3/views.py
Expand Up @@ -333,6 +333,12 @@ def list(self, request, *args, **kwargs):
return Response(serializer.data)


class UnpaginatedCollectionVersionViewSet(CollectionVersionViewSet):
"""Unpaginated ViewSet for CollectionVersions."""

pagination_class = None


class CollectionVersionDocsViewSet(
CollectionVersionRetrieveMixin,
ExceptionHandlerMixin,
Expand Down
5 changes: 5 additions & 0 deletions pulp_ansible/app/urls.py
Expand Up @@ -77,6 +77,11 @@
views_v3.UnpaginatedCollectionViewSet.as_view({"get": "list"}),
name="metadata-collection-list",
),
path(
"metadata/<str:namespace>/<str:name>/versions/",
views_v3.UnpaginatedCollectionVersionViewSet.as_view({"get": "list"}),
name="metadata-collection-versions-list",
),
]

urlpatterns = [
Expand Down

0 comments on commit e32bff6

Please sign in to comment.