Skip to content
Snippets Groups Projects
Commit 49eae2e2 authored by Erwan Rouchet's avatar Erwan Rouchet Committed by Bastien Abadie
Browse files

Add ListRelatedElements type filter to OpenAPI

parent c00e3dfd
No related branches found
No related tags found
1 merge request!556Add ListRelatedElements type filter to OpenAPI
......@@ -195,8 +195,21 @@ class RelatedElementsList(ListAPIView):
List all documents linked to a specified document
"""
serializer_class = ElementSlimSerializer
# Tell the OpenAPI schema generator to believe this view is a list
action = 'List'
openapi_overrides = {
'operationId': 'ListRelatedElements',
'description': 'List all parents and children of a single element',
'security': [],
'tags': ['elements'],
'parameters': [
{
'name': 'type',
'in': 'query',
'description': 'Filter by element type',
'required': False,
'schema': {'type': 'string'},
},
]
}
def get_queryset(self):
filtering = {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment