Story #3218
closedStory #3209: As a user, I have Repository Versions
As an authenticated user, I can list repository version content, added content, removed content
100%
Description
Three detail routes need to be added to the RepositoryVersion viewset.
/api/v3/repositories/<uuid>/versions/<id>/content/ - paginated list of all content in particular version
/api/v3/repositories/<uuid>/versions/<id>/added_content/ - paginated list of content added since the previous version
/api/v3/repositories/<uuid>/versions/<id>/removed_content/ - paginated list of content removed since the previous version
Related issues
Updated by dkliban@redhat.com almost 7 years ago
- Subject changed from Add RepositoryVersion Model and Viewset to As an authenticated user, I can list repository version content, added content, removed content
- Description updated (diff)
Updated by mhrivnak almost 7 years ago
There's an important bit of nuance to the "added" and "removed" attributes that's worth capturing. They are derived attributes whose state depends on the state of previous versions. You could define them as:
"The set of content added/removed since the previous known version that has not been deleted."
The result is that deleting a version will cause the next version to inherit some or all of its changes. For example: If version 2 adds A, and version 3 adds B, then you delete version 2, the result is that version 3 will be shown as having added A and B.
Since they represent the differences between two versions, that makes them quite a bit different from the "content" attribute which is immutable and scoped to a single object. It would be a good idea to communicate this clearly in the API docs.
I wrestled with whether or not to even include the "added" and "removed" attributes directly on each version representation. Ultimately I kept them at least as a way to demonstrate how easy it is to get that information, but it might be worth considering if there is a more clear way to present it.
Updated by daviddavis almost 7 years ago
+1 to @mhrivnak's proposal of updating our docs. Added a checklist item to do so.
Updated by daviddavis almost 7 years ago
- Status changed from NEW to ASSIGNED
- Assignee set to daviddavis
Updated by daviddavis almost 7 years ago
- Status changed from ASSIGNED to POST
Updated by daviddavis almost 7 years ago
- Blocked by Issue #3283: Descriptions for actions are based on docstring added
Added by daviddavis almost 7 years ago
Added by daviddavis almost 7 years ago
Revision 8600f53b | View on GitHub
Changed routes and added docs for added/removed content
Updated by daviddavis almost 7 years ago
- Status changed from POST to MODIFIED
- % Done changed from 0 to 100
Applied in changeset pulp|8600f53b257b1ed5c2b7324f2ba8b96972c326c4.
Updated by bmbouter almost 5 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Changed routes and added docs for added/removed content
fixes #3218 https://pulp.plan.io/issues/3218