Skip to content

Commit 4f5f7cf

Browse files
committed
bugfix
1 parent 7e0c241 commit 4f5f7cf

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

api.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2265,7 +2265,6 @@ protected function swagger($settings) {
22652265
$table_fields[$table['name']][$row[0]]->required = strtolower($row[2])=='no' && $row[1]===null;
22662266
$table_fields[$table['name']][$row[0]]->{'x-nullable'} = strtolower($row[2])=='yes';
22672267
$table_fields[$table['name']][$row[0]]->{'x-dbtype'} = $row[3];
2268-
$table_fields[$table['name']][$row[0]]->maxLength = $row[4];
22692268
if ($this->db->isNumericType($table_fields[$table['name']][$row[0]])) {
22702269
if (strpos(strtolower($table_fields[$table['name']][$row[0]]->{'x-dbtype'}),'int')!==false) {
22712270
$table_fields[$table['name']][$row[0]]->type = 'integer';
@@ -2274,7 +2273,6 @@ protected function swagger($settings) {
22742273
$table_fields[$table['name']][$row[0]]->type = 'number';
22752274
if ($row[1]!==null) $table_fields[$table['name']][$row[0]]->default = (float)$row[1];
22762275
}
2277-
22782276
} else {
22792277
if ($this->db->isBinaryType($table_fields[$table['name']][$row[0]])) {
22802278
$table_fields[$table['name']][$row[0]]->format = 'byte';
@@ -2285,6 +2283,7 @@ protected function swagger($settings) {
22852283
}
22862284
$table_fields[$table['name']][$row[0]]->type = 'string';
22872285
if ($row[1]!==null) $table_fields[$table['name']][$row[0]]->default = $row[1];
2286+
if ($row[4]!==null) $table_fields[$table['name']][$row[0]]->maxLength = (int)$row[4];
22882287
}
22892288
}
22902289

0 commit comments

Comments
 (0)