Project

Profile

Help

Issue #5016

Artifact creation endpoint should accept json requests

Added by daviddavis 7 months ago. Updated about 1 month ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
Assignee:
-
Category:
-
Sprint/Milestone:
Start date:
Due date:
Severity:
2. Medium
Version:
Platform Release:
Blocks Release:
OS:
Backwards Incompatible:
No
Triaged:
No
Groomed:
No
Sprint Candidate:
No
Tags:
QA Contact:
Complexity:
Smash Test:
Verified:
No
Verification Required:
No
Sprint:

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." 
}

Associated revisions

Revision 01c67625 View on GitHub
Added by daviddavis 7 months ago

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

History

#1 Updated by daviddavis 7 months 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).

#2 Updated by daviddavis 7 months 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.

#3 Updated by daviddavis 7 months ago

  • Status changed from CLOSED - WONTFIX to POST

#4 Updated by daviddavis 7 months ago

  • Status changed from POST to MODIFIED

#5 Updated by bmbouter about 1 month ago

  • Sprint/Milestone set to 3.0.0

#6 Updated by bmbouter about 1 month ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF