mirror of
https://github.com/tiennm99/coolify.git
synced 2026-10-12 14:14:52 +00:00
feat(api): add service database management endpoints
Add service database CRUD, logs, and lifecycle actions, and document service application operations with OpenAPI tests.
This commit is contained in:
1 parent
64667574f6
commit
908b5cc09d
13 files changed
+870
-3
No files matched your search
@@ -0,0 +1,27 @@
|
||||
<?php
|
||||
|
||||
use App\Models\Application;
|
||||
use OpenApi\Attributes\Property;
|
||||
use OpenApi\Attributes\Schema;
|
||||
|
||||
it('documents application settings under the settings property', function () {
|
||||
$schema = (new ReflectionClass(Application::class))
|
||||
->getAttributes(Schema::class)[0]
|
||||
->newInstance();
|
||||
|
||||
$openApi = json_decode(
|
||||
file_get_contents(__DIR__.'/../../openapi.json'),
|
||||
true,
|
||||
flags: JSON_THROW_ON_ERROR,
|
||||
);
|
||||
|
||||
$settingsProperty = collect($schema->properties)
|
||||
->first(fn (mixed $property): bool => $property instanceof Property
|
||||
&& $property->property === 'settings');
|
||||
|
||||
expect($settingsProperty)
|
||||
->not->toBeNull()
|
||||
->and($openApi['components']['schemas']['Application']['properties'])
|
||||
->toHaveKey('settings')
|
||||
->not->toHaveKey('');
|
||||
});
|
||||
Reference in new issue
Block a user