1
0
Fork 0
mirror of synced 2024-06-27 18:50:47 +12:00

Add compound UID to spec generator

This commit is contained in:
Jake Barnby 2024-02-20 20:15:08 +13:00
parent f28412ccd9
commit d61f4e4d2d
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C
2 changed files with 8 additions and 0 deletions

View file

@ -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;

View file

@ -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;