Skip to content

Instantly share code, notes, and snippets.

@alexryabtsev
Last active August 15, 2016 07:31
Show Gist options
  • Select an option

  • Save alexryabtsev/323b4f297eb878e53683b7243830cacc to your computer and use it in GitHub Desktop.

Select an option

Save alexryabtsev/323b4f297eb878e53683b7243830cacc to your computer and use it in GitHub Desktop.
Swagger YAML doc-string
class AppLogListAPIView(CommonFilteringListView):
...
def get(self, request, *args, **kwargs):
"""
---
serializer: sa_logs.serializers.AppLogListSerializer
parameters_strategy: merge
omit_parameters:
- path
parameters:
- name: datetime_start
description: filter screenshots from date
required: false
type: datetime
- name: datetime_end
description: filter screenshots to date
required: false
type: datetime
...
responseMessages:
- code: 400
message: Wrong input data
- code: 401
message: Not authenticated / Invalid signature (token)
...
"""
return super(AppLogListAPIView, self).get(request, *args, **kwargs)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment