Actions
Issue #5016
closedArtifact creation endpoint should accept json requests
Start date:
Due date:
Estimated time:
Severity:
2. Medium
Version:
Platform Release:
OS:
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
Sprint:
Quarter:
Description
There are two ways to create an artifact: from a file and from a chunked upload. The chunked upload request takes an upload id. However, it looks like it doesn't work when using json:
$ http POST :24817/pulp/api/v3/artifacts/ upload=$UPLOAD
{
"detail": "Unsupported media type \"application/json\" in request."
}
Updated by daviddavis over 5 years ago
I fixed the problem by adding JSONParser to the list of parser_classes for the Artifact viewset but now the docs are wrong in that they show only json is accepted (and not multipart form as well).
Updated by daviddavis over 5 years ago
- Status changed from NEW to CLOSED - WONTFIX
This is affected by a bug in yasg. See https://github.com/axnsan12/drf-yasg/issues/386. I don't think it's worth implementing a workaround so I am closing this out.
Updated by daviddavis over 5 years ago
- Status changed from CLOSED - WONTFIX to POST
Added by daviddavis over 5 years ago
Updated by daviddavis over 5 years ago
- Status changed from POST to MODIFIED
Applied in changeset pulpcore|01c676251bdb8745ec592c796b4ec0cb6af6544c.
Updated by bmbouter almost 5 years ago
- Status changed from MODIFIED to CLOSED - CURRENTRELEASE
Actions
Allow json to be used to create artifacts from upload
I confirmed that the REST API docs display 'multipart/form-data'.
fixes #5016 https://pulp.plan.io/issues/5016