Merge pull request #887 from mjibson/no-unnamed-api-ops
Don't expose unnamed API operations
This commit is contained in:
commit
f17984b93d
1 changed files with 3 additions and 1 deletions
|
@ -125,9 +125,11 @@ def swagger_route_data(include_internal=False, compact=False):
|
||||||
continue
|
continue
|
||||||
|
|
||||||
operation_swagger = {
|
operation_swagger = {
|
||||||
'operationId': method_metadata(method, 'nickname') or 'unnamed',
|
'operationId': method_metadata(method, 'nickname'),
|
||||||
'parameters': [],
|
'parameters': [],
|
||||||
}
|
}
|
||||||
|
if operation_swagger['operationId'] is None:
|
||||||
|
continue
|
||||||
|
|
||||||
if not compact:
|
if not compact:
|
||||||
operation_swagger.update({
|
operation_swagger.update({
|
||||||
|
|
Reference in a new issue