diff --git a/api/src/Swagger/SwaggerDecorator.php b/api/src/Swagger/SwaggerDecorator.php index acb8988e..e0883841 100644 --- a/api/src/Swagger/SwaggerDecorator.php +++ b/api/src/Swagger/SwaggerDecorator.php @@ -114,7 +114,7 @@ public function normalize($object, $format = null, array $context = []) //$additionalEntityDocs = $this->getAdditionalEntityDocs($entity); $entityDocs = $this->getAdditionalEntityDocs($entity); // Only run if we have aditional docs - if(array_key_exists('properties',$entityDocs)){ + if (array_key_exists('properties', $entityDocs)) { $additionalDocs = array_merge($additionalDocs, $entityDocs['properties']); } @@ -418,7 +418,6 @@ private function getAdditionalEntityDocs($entity) $atributes = []; $groups = []; - foreach ($tags as $tag) { $name = $tag->getName(); $description = $tag->getDescription(); @@ -445,47 +444,47 @@ private function getAdditionalEntityDocs($entity) // Constrainds (Validation) case "Assert\Date": - $atributes['type'] = "string"; + $atributes['type'] = 'string'; $atributes['format'] = 'date'; $atributes['example'] = \date('Y-m-d'); break; case "Assert\DateTime": - $atributes['type'] = "string"; + $atributes['type'] = 'string'; $atributes['format'] = 'date-time'; $atributes['example'] = \date('Y-m-d H:i:s'); break; case "Assert\Time": - $atributes['type'] = "string"; + $atributes['type'] = 'string'; $atributes['format'] = 'time'; $atributes['example'] = \date('H:i:s'); break; case "Assert\Timezone": - $atributes['type'] = "string"; + $atributes['type'] = 'string'; $atributes['format'] = 'timezone'; $atributes['example'] = 'America/New_York'; break; case "Assert\Uuid": - $atributes['type'] = "string"; + $atributes['type'] = 'string'; $atributes['format'] = 'uuid'; break; case "Assert\Email": - $atributes['type'] = "string"; + $atributes['type'] = 'string'; $atributes['format'] = 'email'; break; case "Assert\Url": - $atributes['type'] = "string"; + $atributes['type'] = 'string'; $atributes['format'] = 'url'; break; case "Assert\Regex": - $atributes['type'] = "string"; + $atributes['type'] = 'string'; $atributes['format'] = 'regex'; break; case "Assert\Ip": - $atributes['type'] = "string"; + $atributes['type'] = 'string'; $atributes['format'] = 'ip'; break; case "Assert\Json": - $atributes['type'] = "string"; + $atributes['type'] = 'string'; $atributes['format'] = 'json'; break; case "Assert\Choice":