Skip to content

Commit

Permalink
update: update snake_case to camelCase
Browse files Browse the repository at this point in the history
Signed-off-by: Jay <[email protected]>
  • Loading branch information
35C4n0r committed Nov 2, 2023
1 parent 85fa20d commit 3f3afb0
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/Spec/Swagger2.php
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ public function getDefinitions()
"name" => $key,
"properties" => $schema['properties'] ?? [],
"description" => $schema['description'] ?? [],
"error_types" => $schema['x-appwrite']['types'] ?? [],
"error_types" => $schema['x-appwrite']['types'] ?? null,
"required" => $schema['required'] ?? [],
"additionalProperties" => $schema['additionalProperties'] ?? []
];
Expand All @@ -338,17 +338,17 @@ public function getDefinitions()
}
}
}
if (isset($sch['error_types'])) {
if (isset($sch['errorTypes'])) {
$types = [];
foreach ($sch['error_types'] as $type) {
foreach ($sch['errorTypes'] as $type) {

$types[] = [
'code' => $type['code'],
'type' => $type['type'],
'description' => $type['description']
];
}
$sch['error_types'] = $types;
$sch['errorTypes'] = $types;
}
$list[$key] = $sch;
}
Expand Down

0 comments on commit 3f3afb0

Please sign in to comment.