Skip to content

Commit

Permalink
Merge pull request #13 from ConductionNL/analysis-WN6gbj
Browse files Browse the repository at this point in the history
Apply fixes from StyleCI
  • Loading branch information
rubenvdlinde authored Jan 14, 2020
2 parents 3c4a21f + 16f14d0 commit 720c979
Showing 1 changed file with 10 additions and 11 deletions.
21 changes: 10 additions & 11 deletions api/src/Swagger/SwaggerDecorator.php
Original file line number Diff line number Diff line change
Expand Up @@ -418,7 +418,6 @@ private function getAdditionalEntityDocs($entity)
$atributes = [];
$groups = [];


foreach ($tags as $tag) {
$name = $tag->getName();
$description = $tag->getDescription();
Expand All @@ -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":
Expand Down

0 comments on commit 720c979

Please sign in to comment.