You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
There does not seem to be an easy way to document query parameters for a detail
view.
Would it be feasible to support something like a input_serializer_class
argument, from where CoreAPI Link Fields (with query for the "Query
Parameters" used in docs/link.html) could be derived from?
This could then even set validated_data on the request (or pass a new
argument for/with it)?
Given that you're using @detail_route you'll need to inspect self.view.action to determine when to add the extra fields.
I'm not sure about your other points. I'm inclined to think that whatever machinery would be needed to drop the two lines — and go straight to request.validated_data — would not be worth it. I quite like that you explicitly create the serialiser and call is_valid()...
Is generating query parameter documentation in the documentation anywhere? I feel like the 'Documenting your API' page is pretty sparse on details or examples. If an example of what it takes for query parameter documentation to be generated was provided, that would be fantastic.
There does not seem to be an easy way to document query parameters for a detail
view.
Would it be feasible to support something like a
input_serializer_class
argument, from where CoreAPI Link Fields (with
query
for the "QueryParameters" used in
docs/link.html
) could be derived from?This could then even set
validated_data
on therequest
(or pass a newargument for/with it)?
This would simplify the pattern with:
to
The text was updated successfully, but these errors were encountered: