Project

Profile

Help

Issue #4683

OpenAPI schema for Artifacts create operation is ambiguous

Added by dkliban@redhat.com about 1 year ago. Updated 6 months ago.

Status:
CLOSED - CURRENTRELEASE
Priority:
Normal
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

The bindings generated from Pulp's OpenAPI schema don't form-encode requests for the 'artifacts_create' operation. This results in a 400 error being returned by the server.

Associated revisions

Revision b594bb83 View on GitHub
Added by dkliban@redhat.com about 1 year ago

Problem: OpenAPI schema for 'Artifact create' is ambiguous

Solution: Remove JSONParser from ArtifactViewset

The ArtifactViewset viewset was configured to use MultiPartParser, FormParser, and JSONParser. The JSONParser was added when the ArtifactViewset was extended to accept uploads when creating an Artifact. It was only needed to allow users to submit not form-encoded requests to the /pulp/api/v3/artifacts/ endpoint. However, 'drf_yasg' does not support mixing multipart/form-data and json fields. When such occurs, the body parameters for the operation are simply reported as 'data' dictionary. The bindings generated from such an OpenAPI schema don't form-encode requests for the 'artifacts_create' operation. This results in a 400 error being returned by the server.

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

History

#1 Updated by dkliban@redhat.com about 1 year ago

  • Subject changed from OpenAPI schema for Artifacts create operation is ambigous to OpenAPI schema for Artifacts create operation is ambiguous
  • Status changed from ASSIGNED to POST

#2 Updated by dkliban@redhat.com about 1 year ago

  • Status changed from POST to MODIFIED

#3 Updated by daviddavis about 1 year ago

  • Sprint/Milestone set to 3.0.0

#4 Updated by bmbouter about 1 year ago

  • Tags deleted (Pulp 3)

#5 Updated by bmbouter 6 months ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Please register to edit this issue

Also available in: Atom PDF