Skip to content

Commit ea61344

Browse files
committed
maxLength should be positive, see #216 and #217
1 parent 1c899ce commit ea61344

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

api.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2432,7 +2432,7 @@ protected function swagger($settings) {
24322432
}
24332433
echo ',"x-dbtype": '.json_encode($action['fields'][$field]->{'x-dbtype'});
24342434
echo ',"x-nullable": '.json_encode($action['fields'][$field]->{'x-nullable'});
2435-
if (isset($action['fields'][$field]->maxLength)) {
2435+
if (isset($action['fields'][$field]->maxLength) && $action['fields'][$field]->maxLength>0) {
24362436
echo ',"maxLength": '.json_encode($action['fields'][$field]->maxLength);
24372437
}
24382438
if (isset($action['fields'][$field]->default)) {

0 commit comments

Comments
 (0)