@@ -98,7 +98,7 @@ |
||
| 98 | 98 | $format = strtolower($match[1]); |
| 99 | 99 | if (isset(self::$classTypes[$format])) { |
| 100 | 100 | $type = self::$classTypes[$format]; |
| 101 | - $class = "SwaggerGen\\Swagger\\Type\\{$type}Type"; |
|
| 101 | + $class = "SwaggerGen\\Swagger\\Type\\{$type}type"; |
|
| 102 | 102 | $this->Type = new $class($this, $definition); |
| 103 | 103 | } else { |
| 104 | 104 | throw new \SwaggerGen\Exception("Type format not recognized: '{$format}'"); |
@@ -45,7 +45,7 @@ discard block |
||
| 45 | 45 | |
| 46 | 46 | $match = array(); |
| 47 | 47 | if (preg_match(self::REGEX_START . self::REGEX_FORMAT . self::REGEX_DEFAULT_START . $this->regex . self::REGEX_DEFAULT_END . self::REGEX_END, $definition, $match) !== 1) { |
| 48 | - throw new \SwaggerGen\Exception("Unparseable {$this->format} definition: '{$definition}'"); |
|
| 48 | + throw new \SwaggerGen\Exception("unparseable {$this->format} definition: '{$definition}'"); |
|
| 49 | 49 | } |
| 50 | 50 | |
| 51 | 51 | if (strtolower($match[1] !== $this->format)) { |
@@ -61,7 +61,7 @@ discard block |
||
| 61 | 61 | $value = parent::validateDefault($value); |
| 62 | 62 | |
| 63 | 63 | if (preg_match('/' . $this->pattern . '/', $value) !== 1) { |
| 64 | - throw new \SwaggerGen\Exception("Invalid {$this->format} default value"); |
|
| 64 | + throw new \SwaggerGen\Exception("invalid {$this->format} default value"); |
|
| 65 | 65 | } |
| 66 | 66 | |
| 67 | 67 | return $value; |
@@ -161,7 +161,7 @@ discard block |
||
| 161 | 161 | { |
| 162 | 162 | if (empty($value)) { |
| 163 | 163 | $type = $this->format ?: ($this->enum ? 'enum' : 'string'); |
| 164 | - throw new \SwaggerGen\Exception("Empty {$type} default"); |
|
| 164 | + throw new \SwaggerGen\Exception("empty {$type} default"); |
|
| 165 | 165 | } |
| 166 | 166 | |
| 167 | 167 | if (!empty($this->enum) && !in_array($value, $this->enum)) { |
@@ -170,12 +170,12 @@ discard block |
||
| 170 | 170 | |
| 171 | 171 | if ($this->maxLength !== null && mb_strlen($value) > $this->maxLength) { |
| 172 | 172 | $type = $this->format ?: ($this->enum ? 'enum' : 'string'); |
| 173 | - throw new \SwaggerGen\Exception("Default {$type} length beyond maximum: '{$value}'"); |
|
| 173 | + throw new \SwaggerGen\Exception("default {$type} length beyond maximum: '{$value}'"); |
|
| 174 | 174 | } |
| 175 | 175 | |
| 176 | 176 | if ($this->minLength !== null && mb_strlen($value) < $this->minLength) { |
| 177 | 177 | $type = $this->format ?: ($this->enum ? 'enum' : 'string'); |
| 178 | - throw new \SwaggerGen\Exception("Default {$type} length beyond minimum: '{$value}'"); |
|
| 178 | + throw new \SwaggerGen\Exception("default {$type} length beyond minimum: '{$value}'"); |
|
| 179 | 179 | } |
| 180 | 180 | |
| 181 | 181 | return $value; |
@@ -723,7 +723,7 @@ discard block |
||
| 723 | 723 | 'responses' => array( |
| 724 | 724 | 200 => array( |
| 725 | 725 | 'description' => 'OK', |
| 726 | - 'schema' => Array( |
|
| 726 | + 'schema' => array( |
|
| 727 | 727 | 'type' => 'integer', |
| 728 | 728 | 'format' => 'int32', |
| 729 | 729 | ), |
@@ -747,7 +747,7 @@ discard block |
||
| 747 | 747 | 'responses' => array( |
| 748 | 748 | 200 => array( |
| 749 | 749 | 'description' => 'Stuff is returned', |
| 750 | - 'schema' => Array( |
|
| 750 | + 'schema' => array( |
|
| 751 | 751 | 'type' => 'integer', |
| 752 | 752 | 'format' => 'int32', |
| 753 | 753 | ), |
@@ -120,7 +120,7 @@ |
||
| 120 | 120 | // Internal type if type known and not overwritten by definition |
| 121 | 121 | if (isset(self::$classTypes[$format])) { |
| 122 | 122 | $type = self::$classTypes[$format]; |
| 123 | - $class = "SwaggerGen\\Swagger\\Type\\{$type}Type"; |
|
| 123 | + $class = "SwaggerGen\\Swagger\\Type\\{$type}type"; |
|
| 124 | 124 | return new $class($parent, $definition); |
| 125 | 125 | } else { |
| 126 | 126 | return new ReferenceObjectType($parent, $definition); |