From a693b72946c0f14c47beaca3f90b035cbc698775 Mon Sep 17 00:00:00 2001 From: Christy Jacob Date: Tue, 9 Feb 2021 00:08:00 +0530 Subject: [PATCH] feat: added short descriptions for all services --- app/config/services.php | 13 +++++++++++++ app/controllers/web/home.php | 2 +- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/app/config/services.php b/app/config/services.php index 90a452cfc..af55d0d6e 100644 --- a/app/config/services.php +++ b/app/config/services.php @@ -4,6 +4,7 @@ return [ '/' => [ 'key' => 'homepage', 'name' => 'Homepage', + 'subtitle' => '', 'controller' => 'web/home.php', 'sdk' => false, 'docs' => false, @@ -20,6 +21,7 @@ return [ 'v1/account' => [ 'key' => 'account', 'name' => 'Account', + 'subtitle' => 'The Account service allows you to authenticate and manage a user account.', 'description' => '/docs/services/account.md', 'controller' => 'api/account.php', 'sdk' => true, @@ -29,6 +31,7 @@ return [ 'v1/avatars' => [ 'key' => 'avatars', 'name' => 'Avatars', + 'subtitle'=> 'The Avatars service aims to help you complete everyday tasks related to your app image, icons, and avatars.', 'description' => '/docs/services/avatars.md', 'controller' => 'api/avatars.php', 'sdk' => true, @@ -38,6 +41,7 @@ return [ 'v1/database' => [ 'key' => 'database', 'name' => 'Database', + 'subtitle' => 'The Database service allows you to create structured collections of documents, query and filter lists of documents', 'description' => '/docs/services/database.md', 'controller' => 'api/database.php', 'sdk' => true, @@ -47,6 +51,7 @@ return [ 'v1/locale' => [ 'key' => 'locale', 'name' => 'Locale', + 'subtitle' => 'The Locale service allows you to customize your app based on your users\' location.', 'description' => '/docs/services/locale.md', 'controller' => 'api/locale.php', 'sdk' => true, @@ -56,6 +61,7 @@ return [ 'v1/health' => [ 'key' => 'health', 'name' => 'Health', + 'subtitle' => 'The Health service allows you to both validate and monitor your Appwrite server\'s health.', 'description' => '/docs/services/health.md', 'controller' => 'api/health.php', 'sdk' => true, @@ -65,6 +71,7 @@ return [ 'v1/projects' => [ 'key' => 'projects', 'name' => 'Projects', + 'subtitle' => 'The Project service allows you to manage all the projects in your Appwrite server.', 'controller' => 'api/projects.php', 'sdk' => true, 'docs' => true, @@ -73,6 +80,7 @@ return [ 'v1/storage' => [ 'key' => 'storage', 'name' => 'Storage', + 'subtitle' => 'The Storage service allows you to manage your project files.', 'description' => '/docs/services/storage.md', 'controller' => 'api/storage.php', 'sdk' => true, @@ -82,6 +90,7 @@ return [ 'v1/teams' => [ 'key' => 'teams', 'name' => 'Teams', + 'subtitle' => 'The Teams service allows you to group users of your project and to enable them to share read and write access to your project resources', 'description' => '/docs/services/teams.md', 'controller' => 'api/teams.php', 'sdk' => true, @@ -91,6 +100,7 @@ return [ 'v1/users' => [ 'key' => 'users', 'name' => 'Users', + 'subtitle' => 'The Users service allows you to manage your project users.', 'description' => '/docs/services/users.md', 'controller' => 'api/users.php', 'sdk' => true, @@ -100,6 +110,7 @@ return [ 'v1/functions' => [ 'key' => 'functions', 'name' => 'Functions', + 'subtitle' => 'The Functions Service allows you view, create and manage your Cloud Functions.', 'description' => '/docs/services/functions.md', 'controller' => 'api/functions.php', 'sdk' => true, @@ -109,6 +120,7 @@ return [ 'v1/mock' => [ 'key' => 'mock', 'name' => 'Mock', + 'subtitle' => '', 'description' => '', 'controller' => 'mock.php', 'sdk' => false, @@ -118,6 +130,7 @@ return [ 'v1/graphql' => [ 'key' => 'graphql', 'name' => 'GraphQL', + 'subtitle' => 'Appwrite\'s GraphQL Endpoint', 'description' => 'GraphQL Endpoint', 'controller' => 'api/graphql.php', 'sdk' => false, diff --git a/app/controllers/web/home.php b/app/controllers/web/home.php index c4cb6de31..c671e5680 100644 --- a/app/controllers/web/home.php +++ b/app/controllers/web/home.php @@ -328,7 +328,7 @@ App::get('/specs/:format') $services[] = [ 'name' => $service['key'] ?? '', - 'description' => (!empty($service['description'])) ? file_get_contents(realpath(__DIR__.'/../../..'.$service['description'])) : '', + 'description' => (!empty($service['subtitle'])) ? file_get_contents(realpath(__DIR__.'/../../..'.$service['subtitle'])) : '', ]; }