Add compound UID to spec generator
This commit is contained in:
parent
f28412ccd9
commit
d61f4e4d2d
|
@ -451,6 +451,10 @@ class OpenAPI3 extends Format
|
|||
$node['format'] = 'int32';
|
||||
}
|
||||
break;
|
||||
case 'Appwrite\Utopia\Database\Validator\CompoundUID':
|
||||
$node['schema']['type'] = $validator->getType();
|
||||
$node['schema']['x-example'] = '[ID1:ID2]';
|
||||
break;
|
||||
default:
|
||||
$node['schema']['type'] = 'string';
|
||||
break;
|
||||
|
|
|
@ -446,6 +446,10 @@ class Swagger2 extends Format
|
|||
$node['format'] = 'int32';
|
||||
}
|
||||
break;
|
||||
case 'Appwrite\Utopia\Database\Validator\CompoundUID':
|
||||
$node['type'] = $validator->getType();
|
||||
$node['x-example'] = '[ID1:ID2]';
|
||||
break;
|
||||
default:
|
||||
$node['type'] = 'string';
|
||||
break;
|
||||
|
|
Loading…
Reference in a new issue