Add documentation for all path parameters

This commit is contained in:
Joseph Schorr 2014-08-19 19:05:28 -04:00
parent 02d3b70013
commit 53fb7f4136
19 changed files with 107 additions and 19 deletions

View file

@ -100,7 +100,7 @@ def swagger_route_data(include_internal=False, compact=False):
if not compact:
new_operation.update({
'type': 'void',
'summary': method.__doc__ if method.__doc__ else '',
'summary': method.__doc__.strip() if method.__doc__ else '',
'parameters': parameters,
})
@ -125,7 +125,7 @@ def swagger_route_data(include_internal=False, compact=False):
swagger_path = PARAM_REGEX.sub(r'{\2}', rule.rule)
new_resource = {
'path': swagger_path,
'description': view_class.__doc__ if view_class.__doc__ else "",
'description': view_class.__doc__.strip() if view_class.__doc__ else "",
'operations': operations,
'name': fully_qualified_name(view_class),
}