@@ -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}'"); |
@@ -165,7 +165,7 @@ |
||
165 | 165 | $format = strtolower($match[1]); |
166 | 166 | if (isset(self::$classTypes[$format])) { |
167 | 167 | $type = self::$classTypes[$format]; |
168 | - $typeClass = "SwaggerGen\\Swagger\\Type\\{$type}Type"; |
|
168 | + $typeClass = "SwaggerGen\\Swagger\\Type\\{$type}type"; |
|
169 | 169 | return new $typeClass($this, $items); |
170 | 170 | } |
171 | 171 |
@@ -72,7 +72,7 @@ |
||
72 | 72 | // Internal type if type known and not overwritten by definition |
73 | 73 | if (isset(self::$classTypes[$format])) { |
74 | 74 | $type = self::$classTypes[$format]; |
75 | - $class = "SwaggerGen\\Swagger\\Type\\{$type}Type"; |
|
75 | + $class = "SwaggerGen\\Swagger\\Type\\{$type}type"; |
|
76 | 76 | $this->type = new $class($this, $definition); |
77 | 77 | } else { |
78 | 78 | $this->type = new Type\ReferenceObjectType($this, $definition); |
@@ -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; |
@@ -80,7 +80,7 @@ |
||
80 | 80 | $format = strtolower($match[1]); |
81 | 81 | if (isset(self::$classTypes[$format])) { |
82 | 82 | $type = self::$classTypes[$format]; |
83 | - $class = "SwaggerGen\\Swagger\\Type\\{$type}Type"; |
|
83 | + $class = "SwaggerGen\\Swagger\\Type\\{$type}type"; |
|
84 | 84 | $this->Type = new $class($this, $definition); |
85 | 85 | } else { |
86 | 86 | $this->Type = new \SwaggerGen\Swagger\Type\ReferenceObjectType($this, $definition); |
@@ -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 | ), |