Skip to content
Snippets Groups Projects
Commit 56ae958c authored by Bastien Abadie's avatar Bastien Abadie
Browse files

Merge branch 'related-type-openapi' into 'master'

Add ListRelatedElements type filter to OpenAPI

See merge request !556
parents c00e3dfd 49eae2e2
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