diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index 6991001f3..838ac8d5a 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -262,8 +262,8 @@ docker run --rm -v $(pwd):$(pwd):rw -w $(pwd) -v /var/run/docker.sock:/var/run/d * **description** -> Description of Appwrite SDK * **namespace** -> SDK Namespace * **version** -> SDK Version - * **endpoint** -> Default Endpoint (example: "https://cloud.appwrite.io/v1") - * **host** -> Default Host (example: "cloud.appwrite.io") + * **endpoint** -> Default Endpoint (example: "https://appwrite.io/v1") + * **host** -> Default Host (example: "appwrite.io") * **basePath** -> Default Path to API (example: "/v1") * **licenseName** -> Name of license for SDK * **licenseURL** -> URL to SDK license diff --git a/mock-server/app/http.php b/mock-server/app/http.php index c0397697e..d6e612f28 100644 --- a/mock-server/app/http.php +++ b/mock-server/app/http.php @@ -517,7 +517,7 @@ ->label('sdk.method', 'enum') ->label('sdk.description', 'Mock an enum parameter.') ->label('sdk.mock', true) - ->param('mockType', '', new WhiteList(['first', 'second', 'third', 'FOURTH']), 'Sample enum param') + ->param('mockType', '', new WhiteList(['first', 'second', 'third']), 'Sample enum param') ->action(function (string $mockType) { }); diff --git a/src/SDK/Language.php b/src/SDK/Language.php index ac4243ef9..496c8ac2b 100644 --- a/src/SDK/Language.php +++ b/src/SDK/Language.php @@ -108,7 +108,6 @@ protected function toCamelCase($str): string $str = \preg_replace('/[^a-zA-Z0-9]+/', ' ', $str); $str = \trim($str); - $str = strtolower($str); $str = \ucwords($str); $str = \str_replace(' ', '', $str); $str = \lcfirst($str); diff --git a/tests/Base.php b/tests/Base.php index f1f9ebb7d..a731cd673 100644 --- a/tests/Base.php +++ b/tests/Base.php @@ -54,8 +54,7 @@ abstract class Base extends TestCase ]; protected const ENUM_RESPONSES = [ - 'POST:/v1/mock/tests/general/enum:passed', // first enum - 'POST:/v1/mock/tests/general/enum:passed', // fourth enum + 'POST:/v1/mock/tests/general/enum:passed', ]; protected const UPLOAD_RESPONSE = [ diff --git a/tests/languages/android/Tests.kt b/tests/languages/android/Tests.kt index 335cf0f34..e98ce59d1 100644 --- a/tests/languages/android/Tests.kt +++ b/tests/languages/android/Tests.kt @@ -138,9 +138,6 @@ class ServiceTest { mock = general.enum(MockType.FIRST) writeToFile(mock.result) - mock = general.enum(MockType.FOURTH) - writeToFile(mock.result) - try { general.error400() } catch (e: AppwriteException) { diff --git a/tests/languages/apple/Tests.swift b/tests/languages/apple/Tests.swift index d911c9374..b7c09c7e4 100644 --- a/tests/languages/apple/Tests.swift +++ b/tests/languages/apple/Tests.swift @@ -118,9 +118,6 @@ class Tests: XCTestCase { mock = try await general.xenum(mockType: .first) print(mock.result) - mock = try await general.xenum(mockType: .fourth) - print(mock.result) - do { try await general.error400() } catch { diff --git a/tests/languages/dart/tests.dart b/tests/languages/dart/tests.dart index 8115b9583..5682307ae 100644 --- a/tests/languages/dart/tests.dart +++ b/tests/languages/dart/tests.dart @@ -78,9 +78,6 @@ void main() async { response = await general.xenum(mockType: MockType.first); print(response.result); - response = await general.xenum(mockType: MockType.fourth); - print(response.result); - try { await general.error400(); } on AppwriteException catch (e) { diff --git a/tests/languages/deno/tests.ts b/tests/languages/deno/tests.ts index f1a5f0be7..9afe1c747 100644 --- a/tests/languages/deno/tests.ts +++ b/tests/languages/deno/tests.ts @@ -114,10 +114,6 @@ async function start() { // @ts-ignore console.log(response.result); - response = await general.enum(appwrite.MockType.Fourth); - // @ts-ignore - console.log(response.result); - try { response = await general.error400(); } catch (error) { diff --git a/tests/languages/dotnet/Tests.cs b/tests/languages/dotnet/Tests.cs index 5f49a280c..41fa28886 100644 --- a/tests/languages/dotnet/Tests.cs +++ b/tests/languages/dotnet/Tests.cs @@ -84,9 +84,6 @@ public async Task Test1() mock = await general.Enum(MockType.First); TestContext.WriteLine(mock.Result); - mock = await general.Enum(MockType.Fourth); - TestContext.WriteLine(mock.Result); - try { await general.Error400(); diff --git a/tests/languages/flutter/tests.dart b/tests/languages/flutter/tests.dart index baf6574a4..2df554ccd 100644 --- a/tests/languages/flutter/tests.dart +++ b/tests/languages/flutter/tests.dart @@ -105,9 +105,6 @@ void main() async { response = await general.xenum(mockType: MockType.first); print(response.result); - response = await general.xenum(mockType: MockType.fourth); - print(response.result); - try { await general.error400(); } on AppwriteException catch (e) { diff --git a/tests/languages/kotlin/Tests.kt b/tests/languages/kotlin/Tests.kt index 46d02794f..13044b210 100644 --- a/tests/languages/kotlin/Tests.kt +++ b/tests/languages/kotlin/Tests.kt @@ -104,9 +104,6 @@ class ServiceTest { mock = general.enum(MockType.FIRST) writeToFile(mock.result) - mock = general.enum(MockType.FOURTH) - writeToFile(mock.result) - try { general.error400() } catch (e: AppwriteException) { diff --git a/tests/languages/node/test.js b/tests/languages/node/test.js index c79a10404..b71a75842 100644 --- a/tests/languages/node/test.js +++ b/tests/languages/node/test.js @@ -88,9 +88,6 @@ async function start() { response = await general.enum(MockType.First); console.log(response.result); - response = await general.enum(MockType.Fourth); - console.log(response.result); - try { response = await general.error400(); } catch(error) { diff --git a/tests/languages/php/test.php b/tests/languages/php/test.php index 85b7db34e..f182257b5 100644 --- a/tests/languages/php/test.php +++ b/tests/languages/php/test.php @@ -89,9 +89,6 @@ $response = $general->enum(MockType::FIRST()); echo "{$response['result']}\n"; -$response = $general->enum(MockType::FOURTH()); -echo "{$response['result']}\n"; - try { $response = $general->error400(); } catch (AppwriteException $e) { diff --git a/tests/languages/python/tests.py b/tests/languages/python/tests.py index deb4c1c18..789373789 100644 --- a/tests/languages/python/tests.py +++ b/tests/languages/python/tests.py @@ -78,9 +78,6 @@ response = general.enum(MockType.FIRST) print(response['result']) -response = general.enum(MockType.FOURTH) -print(response['result']) - try: response = general.error400() except AppwriteException as e: diff --git a/tests/languages/ruby/tests.rb b/tests/languages/ruby/tests.rb index 815a3c946..ffff2d137 100644 --- a/tests/languages/ruby/tests.rb +++ b/tests/languages/ruby/tests.rb @@ -86,9 +86,6 @@ response = general.enum(mock_type: MockType::FIRST) puts response.result -response = general.enum(mock_type: MockType::FOURTH) -puts response.result - begin general.error400() rescue Exception => error diff --git a/tests/languages/swift/Tests.swift b/tests/languages/swift/Tests.swift index 5950e06b3..3c89e6b89 100644 --- a/tests/languages/swift/Tests.swift +++ b/tests/languages/swift/Tests.swift @@ -108,9 +108,6 @@ class Tests: XCTestCase { mock = try await general.xenum(mockType: .first) print(mock.result) - mock = try await general.xenum(mockType: .fourth) - print(mock.result) - do { try await general.error400() } catch { diff --git a/tests/languages/web/index.html b/tests/languages/web/index.html index f02482796..bfd18f082 100644 --- a/tests/languages/web/index.html +++ b/tests/languages/web/index.html @@ -99,9 +99,6 @@ response = await general.enum(MockType.First); console.log(response.result); - response = await general.enum(MockType.Fourth); - console.log(response.result); - try { response = await general.empty(); } catch (error) { diff --git a/tests/languages/web/node.js b/tests/languages/web/node.js index d836eeb7c..508a05d39 100644 --- a/tests/languages/web/node.js +++ b/tests/languages/web/node.js @@ -58,9 +58,6 @@ async function start() { response = await general.enum(MockType.First); console.log(response.result); - response = await general.enum(MockType.Fourth); - console.log(response.result); - try { response = await general.empty(); } catch (error) { diff --git a/tests/languages/web/tests.js b/tests/languages/web/tests.js old mode 100755 new mode 100644 diff --git a/tests/resources/spec.json b/tests/resources/spec.json index 6f7fcfed6..fd444d014 100644 --- a/tests/resources/spec.json +++ b/tests/resources/spec.json @@ -1301,8 +1301,7 @@ "enum": [ "first", "second", - "third", - "FOURTH" + "third" ], "x-enum-name": null, "x-enum-keys": []