Project

Profile

Help

Story #2824

As a user, I can see the 'name' as a repository attribute for both the list and detail view

Added by daviddavis over 2 years ago. Updated 6 months ago.

Status:
MODIFIED
Priority:
Normal
Assignee:
Category:
-
Sprint/Milestone:
Start date:
Due date:
% Done:

100%

Platform Release:
Blocks Release:
Backwards Incompatible:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Easy Fix
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:

Description

This is what gets returned if I do a get on /api/v3/repositories or /api/v3/repositories/blah/:

{
            "_href": "http://127.0.0.1:1234/api/v3/repositories/blah/",
            "content": "http://127.0.0.1:1234/api/v3/repositories/blah/content/",
            "description": "123456",
            "importers": [],
            "last_content_added": null,
            "last_content_removed": null,
            "notes": {},
            "publishers": [],
            "scratchpad": {
                "test": "asgfdds" 
            }
        }

I can tell that the name of the repo is blah from the _href field. But suppose I name my repo something that needs to be escaped:

{
            "_href": "http://127.0.0.1:1234/api/v3/repositories/%E6%88%91%E7%9A%84%E6%95%B0%E6%8D%AE/",
            "content": "http://127.0.0.1:1234/api/v3/repositories/%E6%88%91%E7%9A%84%E6%95%B0%E6%8D%AE/content/",
            "description": "123456",
            "importers": [],
            "last_content_added": null,
            "last_content_removed": null,
            "notes": {},
            "publishers": [],
            "scratchpad": {
                "test": "asgfdds" 
            }
        }

Can you tell the name of the repo here?


Checklist

Associated revisions

Revision 39650365 View on GitHub
Added by daviddavis over 2 years ago

Return name for repositories in the api

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

Revision 39650365 View on GitHub
Added by daviddavis over 2 years ago

Return name for repositories in the api

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

Revision 39650365 View on GitHub
Added by daviddavis over 2 years ago

Return name for repositories in the api

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

History

#1 Updated by daviddavis over 2 years ago

  • Description updated (diff)

#2 Updated by daviddavis over 2 years ago

  • Tracker changed from Issue to Story
  • Assignee set to daviddavis
  • % Done set to 0
  • Tags Easy Fix added

#3 Updated by bmbouter over 2 years ago

  • Subject changed from Name isn't returned when querying repos to As a user, I can see the 'name' as a repository attribute for both the list and detail view

Fixing this seems as simple as adding the name to the repo list and detail views. I retitled and added some checklist items reflecting that.

#4 Updated by bizhang over 2 years ago

I think the only change needed is to remove the write_only attribute on the serializer [0] to make it readable

[0] https://github.com/pulp/pulp/blob/2ec1164d3cfea8cfdcfa0b6a2936c41765190d96/platform/pulpcore/app/serializers/repository.py#L21

#5 Updated by daviddavis over 2 years ago

  • Status changed from NEW to ASSIGNED

#6 Updated by daviddavis over 2 years ago

  • Status changed from ASSIGNED to POST

#7 Updated by daviddavis over 2 years ago

  • Status changed from POST to MODIFIED
  • % Done changed from 0 to 100

#8 Updated by kersom over 1 year ago

  • Smash Test set to 727

#9 Updated by daviddavis 6 months ago

  • Sprint/Milestone set to 3.0

#10 Updated by bmbouter 6 months ago

  • Tags deleted (Pulp 3)

Please register to edit this issue

Also available in: Atom PDF