Skip to content

Commit 3d7dd3f

Browse files
authored
Revert "Fix Enum Casings For Swift & Dart"
1 parent a810403 commit 3d7dd3f

File tree

20 files changed

+5
-51
lines changed

20 files changed

+5
-51
lines changed

CONTRIBUTING.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -262,8 +262,8 @@ docker run --rm -v $(pwd):$(pwd):rw -w $(pwd) -v /var/run/docker.sock:/var/run/d
262262
* **description** -> Description of Appwrite SDK
263263
* **namespace** -> SDK Namespace
264264
* **version** -> SDK Version
265-
* **endpoint** -> Default Endpoint (example: "https://cloud.appwrite.io/v1")
266-
* **host** -> Default Host (example: "cloud.appwrite.io")
265+
* **endpoint** -> Default Endpoint (example: "https://appwrite.io/v1")
266+
* **host** -> Default Host (example: "appwrite.io")
267267
* **basePath** -> Default Path to API (example: "/v1")
268268
* **licenseName** -> Name of license for SDK
269269
* **licenseURL** -> URL to SDK license

mock-server/app/http.php

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -517,7 +517,7 @@
517517
->label('sdk.method', 'enum')
518518
->label('sdk.description', 'Mock an enum parameter.')
519519
->label('sdk.mock', true)
520-
->param('mockType', '', new WhiteList(['first', 'second', 'third', 'FOURTH']), 'Sample enum param')
520+
->param('mockType', '', new WhiteList(['first', 'second', 'third']), 'Sample enum param')
521521
->action(function (string $mockType) {
522522
});
523523

src/SDK/Language.php

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -108,7 +108,6 @@ protected function toCamelCase($str): string
108108

109109
$str = \preg_replace('/[^a-zA-Z0-9]+/', ' ', $str);
110110
$str = \trim($str);
111-
$str = strtolower($str);
112111
$str = \ucwords($str);
113112
$str = \str_replace(' ', '', $str);
114113
$str = \lcfirst($str);

tests/Base.php

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -54,8 +54,7 @@ abstract class Base extends TestCase
5454
];
5555

5656
protected const ENUM_RESPONSES = [
57-
'POST:/v1/mock/tests/general/enum:passed', // first enum
58-
'POST:/v1/mock/tests/general/enum:passed', // fourth enum
57+
'POST:/v1/mock/tests/general/enum:passed',
5958
];
6059

6160
protected const UPLOAD_RESPONSE = [

tests/languages/android/Tests.kt

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -138,9 +138,6 @@ class ServiceTest {
138138
mock = general.enum(MockType.FIRST)
139139
writeToFile(mock.result)
140140

141-
mock = general.enum(MockType.FOURTH)
142-
writeToFile(mock.result)
143-
144141
try {
145142
general.error400()
146143
} catch (e: AppwriteException) {

tests/languages/apple/Tests.swift

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -118,9 +118,6 @@ class Tests: XCTestCase {
118118
mock = try await general.xenum(mockType: .first)
119119
print(mock.result)
120120

121-
mock = try await general.xenum(mockType: .fourth)
122-
print(mock.result)
123-
124121
do {
125122
try await general.error400()
126123
} catch {

tests/languages/dart/tests.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -78,9 +78,6 @@ void main() async {
7878
response = await general.xenum(mockType: MockType.first);
7979
print(response.result);
8080

81-
response = await general.xenum(mockType: MockType.fourth);
82-
print(response.result);
83-
8481
try {
8582
await general.error400();
8683
} on AppwriteException catch (e) {

tests/languages/deno/tests.ts

Lines changed: 0 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -114,10 +114,6 @@ async function start() {
114114
// @ts-ignore
115115
console.log(response.result);
116116

117-
response = await general.enum(appwrite.MockType.Fourth);
118-
// @ts-ignore
119-
console.log(response.result);
120-
121117
try {
122118
response = await general.error400();
123119
} catch (error) {

tests/languages/dotnet/Tests.cs

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -84,9 +84,6 @@ public async Task Test1()
8484
mock = await general.Enum(MockType.First);
8585
TestContext.WriteLine(mock.Result);
8686

87-
mock = await general.Enum(MockType.Fourth);
88-
TestContext.WriteLine(mock.Result);
89-
9087
try
9188
{
9289
await general.Error400();

tests/languages/flutter/tests.dart

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -105,9 +105,6 @@ void main() async {
105105
response = await general.xenum(mockType: MockType.first);
106106
print(response.result);
107107

108-
response = await general.xenum(mockType: MockType.fourth);
109-
print(response.result);
110-
111108
try {
112109
await general.error400();
113110
} on AppwriteException catch (e) {

0 commit comments

Comments
 (0)