Project

Profile

Help

Issue #4683

closed

OpenAPI schema for Artifacts create operation is ambiguous

Added by dkliban@redhat.com almost 5 years ago. Updated over 4 years ago.

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

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.

Added by dkliban@redhat.com almost 5 years ago

Revision b594bb83 | View on GitHub

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

Actions #1

Updated by dkliban@redhat.com almost 5 years 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
Actions #2

Updated by dkliban@redhat.com almost 5 years ago

  • Status changed from POST to MODIFIED
Actions #3

Updated by daviddavis almost 5 years ago

  • Sprint/Milestone set to 3.0.0
Actions #4

Updated by bmbouter almost 5 years ago

  • Tags deleted (Pulp 3)
Actions #5

Updated by bmbouter over 4 years ago

  • Status changed from MODIFIED to CLOSED - CURRENTRELEASE

Also available in: Atom PDF