drf-yasg
drf-yasg copied to clipboard
Extend support for tags
Currently, tags creation is based on the first word of URL/action. It's possible to overwrite tags with decorators but this leads to tedious repetitions.
It would be nice to add more ways to tag views – for example, schema_tags
field in view classes:
class SomeView(APIView):
queryset = SomeModel.objects.all()
serializer_class = SomeModelSerializer
schema_tags = ["model", "list"]
I'm write and add this to this release (1.20)
Just a heads up we've moved back to the original repo https://github.com/axnsan12/drf-yasg. I'll soon get round to writing this and submitting it there.
Thanks, looking forward to it.
Sorry to ask, but is there any update on this?
Sorry to ask, but is there any update on this?
Gonna do this today, sorry for the delay
@TmLev , please have a look at #83. By adding an override that picks up the class attribute we can add the extra tags. Views with more than tag are repeated in the ui. Is this what you had in mind? If we merge I'll open an issue to add the into the upstream repo.
Yep, looks good to me! (Although, I'm not sure whether Cristi will approve this.)