From d69d79d30241d4416897dd85741d2ba1e4c08024 Mon Sep 17 00:00:00 2001 From: Evan Cordell Date: Thu, 7 Apr 2016 09:26:28 -0400 Subject: [PATCH] swagger: document 201 responses for POST requests --- endpoints/api/discovery.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/endpoints/api/discovery.py b/endpoints/api/discovery.py index c024fde6f..03972fe62 100644 --- a/endpoints/api/discovery.py +++ b/endpoints/api/discovery.py @@ -202,6 +202,10 @@ def swagger_route_data(include_internal=False, compact=False): responses['204'] = { 'description': 'Deleted' } + elif method_name == 'POST': + responses['201'] = { + 'description': 'Successful creation' + } else: responses['200'] = { 'description': 'Successful invocation'