1
0
Fork 0
mirror of synced 2024-07-02 21:20:58 +12:00

Add REST to platforms and SDKs

This commit is contained in:
Jake Barnby 2022-10-26 16:19:30 +13:00
parent 9fbf8d6aee
commit c5bda4d2ff
No known key found for this signature in database
GPG key ID: C437A8CC85B96E9C
2 changed files with 47 additions and 5 deletions

View file

@ -146,7 +146,7 @@ return [
'dev' => false,
'hidden' => true,
'family' => APP_PLATFORM_CLIENT,
'prism' => 'graphql',
'prism' => 'http',
'source' => \realpath(__DIR__ . '/../sdks/client-graphql'),
'gitUrl' => '',
'gitRepoName' => '',
@ -154,6 +154,25 @@ return [
'gitBranch' => '',
'isSDK' => false,
],
[
'key' => 'rest',
'name' => 'REST',
'version' => '',
'url' => '',
'package' => '',
'enabled' => true,
'beta' => false,
'dev' => false,
'hidden' => true,
'family' => APP_PLATFORM_CLIENT,
'prism' => 'http',
'source' => \realpath(__DIR__ . '/../sdks/client-rest'),
'gitUrl' => '',
'gitRepoName' => '',
'gitUserName' => '',
'gitBranch' => '',
'isSDK' => false,
],
],
],
@ -176,8 +195,8 @@ return [
'family' => APP_PLATFORM_CONSOLE,
'prism' => 'console',
'source' => \realpath(__DIR__ . '/../sdks/console-web'),
'gitUrl' => null,
'gitBranch' => null,
'gitUrl' => '',
'gitBranch' => '',
'gitRepoName' => 'sdk-for-console',
'gitUserName' => 'appwrite',
],
@ -422,7 +441,7 @@ return [
'dev' => false,
'hidden' => true,
'family' => APP_PLATFORM_SERVER,
'prism' => 'graphql',
'prism' => 'http',
'source' => \realpath(__DIR__ . '/../sdks/server-graphql'),
'gitUrl' => '',
'gitRepoName' => '',
@ -430,6 +449,25 @@ return [
'gitBranch' => '',
'isSDK' => false,
],
[
'key' => 'rest',
'name' => 'REST',
'version' => '',
'url' => '',
'package' => '',
'enabled' => true,
'beta' => false,
'dev' => false,
'hidden' => true,
'family' => APP_PLATFORM_SERVER,
'prism' => 'http',
'source' => \realpath(__DIR__ . '/../sdks/server-rest'),
'gitUrl' => '',
'gitRepoName' => '',
'gitUserName' => '',
'gitBranch' => '',
'isSDK' => false,
],
],
],
];

View file

@ -1,6 +1,8 @@
<?php
use Appwrite\SDK\Language\GraphQL;
use Appwrite\SDK\Language\HTTP;
use Appwrite\SDK\Language\REST;
use Utopia\Config\Config;
use Utopia\CLI\Console;
use Appwrite\Spec\Swagger2;
@ -165,9 +167,11 @@ THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
case 'graphql':
$config = new GraphQL();
break;
case 'rest':
$config = new REST();
break;
default:
throw new Exception('Language "' . $language['key'] . '" not supported');
break;
}
Console::info("Generating {$language['name']} SDK...");