From 8bbf394d4a92c6ee6e2e7b8fb5a14b6b46a616d1 Mon Sep 17 00:00:00 2001 From: Eldad Fux Date: Sat, 14 Nov 2020 13:52:07 +0200 Subject: [PATCH] Fixed missing required attributes --- src/Appwrite/Specification/Format/Swagger2.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/Appwrite/Specification/Format/Swagger2.php b/src/Appwrite/Specification/Format/Swagger2.php index 44af6f772..6bd21055e 100644 --- a/src/Appwrite/Specification/Format/Swagger2.php +++ b/src/Appwrite/Specification/Format/Swagger2.php @@ -289,14 +289,14 @@ class Swagger2 extends Format $url = \str_replace(':'.$name, '{'.$name.'}', $url); } - if(!empty($body['schema']['properties'])) { - $temp['parameters'][] = $body; - } - if(!empty($bodyRequired)) { $body['schema']['required'] = $bodyRequired; } + if(!empty($body['schema']['properties'])) { + $temp['parameters'][] = $body; + } + $temp['consumes'] = $consumes; $output['paths'][$url][\strtolower($route->getMethod())] = $temp;