Project

Profile

Help

Issue #4590

closed

Return relative URI for distributions

Added by ttereshc over 5 years ago. Updated almost 5 years ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Category:
-
Sprint/Milestone:
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
Yes
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Sprint 52
Quarter:

Description

When listing a publication, notice the full URL for distributions. It should be a relative URI like the rest of resources.

$ http :8000/pulp/api/v3/publications/9ba90d2f-900d-4e3c-a716-452b39d3701d/
HTTP/1.1 200 OK
Allow: GET, DELETE, HEAD, OPTIONS
Connection: close
Content-Length: 405
Content-Type: application/json
Date: Wed, 27 Mar 2019 18:00:52 GMT
Server: gunicorn/19.9.0
Vary: Accept, Cookie
X-Frame-Options: SAMEORIGIN

{
    "_created": "2019-03-27T17:14:57.727678Z",
    "_distributions": [
        "http://localhost:8000/pulp/api/v3/distributions/c63bcc77-c5dc-406a-92ee-b527433516c9/" 
    ],
    "_href": "/pulp/api/v3/publications/9ba90d2f-900d-4e3c-a716-452b39d3701d/",
    "publisher": "/pulp/api/v3/publishers/rpm/rpm/a275f1b5-d73e-4170-be98-ce338c90b2d5/",
    "repository_version": "/pulp/api/v3/repositories/64bdeb44-c6d3-4ed7-9c5a-94b264a6b7b5/versions/1/" 
}
Actions #1

Updated by CodeHeeler over 5 years ago

  • Triaged changed from No to Yes
  • Sprint set to Sprint 51
Actions #2

Updated by dkliban@redhat.com over 5 years ago

  • Status changed from NEW to POST
Actions #3

Updated by dkliban@redhat.com over 5 years ago

  • Assignee set to dkliban@redhat.com
Actions #4

Updated by rchan over 5 years ago

  • Sprint changed from Sprint 51 to Sprint 52
Actions #5

Updated by daviddavis over 5 years ago

  • Sprint/Milestone set to 3.0.0
Actions #6

Updated by bmbouter over 5 years ago

  • Tags deleted (Pulp 3)

Added by dkliban@redhat.com over 5 years ago

Revision 7aaddcc1 | View on GitHub

Problem: publication's distributions are full URLs

Solution: use RelatedField instead of HyperlinkedRelatedField

The serializer was using the wrong type of field for serializing the Publication's distrubtions field.

fixes: #4590 https://pulp.plan.io/issues/4590

Actions #7

Updated by dkliban@redhat.com over 5 years ago

  • Status changed from POST to MODIFIED
Actions #8

Updated by bmbouter almost 5 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF