Fixes OpenAPI schema for Content create operations #2807
Closed
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
The code[0] for special handling of FileFields when generating the OpenAPI schema was
introduced to work around a bug in drf-yasg[1]. This code was then ported when pulpcore
switched to using drf_spectacular for generating OpenAPI. This code is not needed. It
actually causes the OpenAPI schema for Content creation APIs to be different from all
other create operations.
[0] 24b5071#diff-0535b5e0e76e73cdc44991f38a187114c123eb5ba125bda3015ca222a2b18088
[1] axnsan12/drf-yasg#386
closes: #2806