Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fixes OpenAPI schema for Content create operations #2807

Closed
wants to merge 1 commit into from

Conversation

dkliban
Copy link
Member

@dkliban dkliban commented Jun 6, 2022

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

@dkliban dkliban force-pushed the multipart-handling branch 2 times, most recently from 092694c to d02cada Compare June 6, 2022 21:45
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] pulp@24b5071#diff-0535b5e0e76e73cdc44991f38a187114c123eb5ba125bda3015ca222a2b18088
[1] axnsan12/drf-yasg#386

closes: pulp#2806
@dkliban
Copy link
Member Author

dkliban commented Jun 7, 2022

Even though there is an inconsistency between the APIs, the fix that makes it consistent makes the client not usable.

@dkliban dkliban closed this Jun 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

OpenAPI schema for Content create operation is wrong
1 participant