-
Notifications
You must be signed in to change notification settings - Fork 34
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
Change docs of create & update methods of bugzilla_component #162
Conversation
could we think about auto doc but not provide by manual? |
@erichuanggit I will try to figure that out |
@erichuanggit I think we can't automate the doc generation by using tools provided in common/renderers.py. The macros provide two options for dealing with serialisers:
they either take all the fields or take all the writable fields. As you can see in the BugzillaComponentSerializer, all fields are not marked read_only and parent_pk field is missing. To set the fields needed to replace the macro we should simply customise it. Such examples can be seen in GlobalComponentViewSet, ReleaseComponentViewSet and so on. |
The thing is parent bugzillacomponent name can be duplicated. So we use parent_pk in update API. |
The only way to do it automatically would be to use the |
so it seems both are needed. Each of these have its advantage and disadvantage. Because I don't know the exact information of how many bugzilla_components there are and whether they will be many duplicate names, I don't know the answer for this one. |
@lubomir so maybe we can use this fix temporarily and create another task for the renderer? |
I'm all for merging this patch. Cleaning up later is a possibility, but not a hard requirement. |
the docs for the original create and update method doesn't provide the correct request formats. it also doesn't coincide with the corresponding test cases.