Fix OpenAPI schema for async responses #3544
Conversation
Hello @werwty! Thanks for updating the PR. Cheers ! There are no PEP8 issues in this Pull Request. 🍻 Comment last updated on July 07, 2018 at 19:03 Hours UTC |
Codecov Report
@@ Coverage Diff @@
## master #3544 +/- ##
=========================================
+ Coverage 57.34% 57.44% +0.1%
=========================================
Files 59 59
Lines 2459 2465 +6
=========================================
+ Hits 1410 1416 +6
Misses 1049 1049
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM. Do plugins and plugin_template need this update too?
I can copy them over to plugin_template since I've already got a PR in progress there |
@@ -229,6 +237,9 @@ def destroy(self, request, repository_pk, number): | |||
) | |||
return OperationPostponedResponse(async_result, request) | |||
|
|||
@swagger_auto_schema(operation_description="Trigger an asynchronous task to create " |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It would be good if the other descriptions would have the same level of detail w/r/t what they are updating or deleting (a Repository Version).
Otherwise, LGTM
@@ -59,6 +59,8 @@ class RepositoryViewSet(NamedModelViewSet, | |||
pagination_class = NamePagination | |||
filter_class = RepositoryFilter | |||
|
|||
@swagger_auto_schema(operation_description="Trigger an asynchronous update task", | |||
responses={202: AsnycOperationResponseSerializer}) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same applies here
I will open a PR to pulp_file, and pulp_ansible with these changes. |
Plugin PRs: |
closes #3668
https://pulp.plan.io/issues/3668