We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9bc148b commit eefc1d4Copy full SHA for eefc1d4
src/Definitions/DefinitionGenerator.php
@@ -292,9 +292,11 @@ private function cleanDatabaseType(string $dbType)
292
* @return array array of with 'type' and 'format' as keys
293
*/
294
private function convertDBTypeToSwaggerType(string $dbType): array
295
- {
296
- // We use preg_replace to remove parenthesis, eg: "int(20)" become just "int"
297
- $lowerType = $this->cleanDatabaseType($dbType);
+ {
+ $lowerType = $dbType == 'tinyint(1)'
+ ? 'boolean' // tinyint(1) is a boolean
298
+ : $this->cleanDatabaseType($dbType); // We use preg_replace to remove parenthesis, eg: "int(20)" become just "int"
299
+
300
switch ($lowerType) {
301
case 'bigserial':
302
case 'bigint':
0 commit comments