mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
Merge pull request #2547 from appwrite/fix-specs-the-third
fix: specifications definitions
This commit is contained in:
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
File diff suppressed because one or more lines are too long
@@ -353,6 +353,7 @@ $logs = $this->getParam('logs', null);
|
||||
<span data-ls-if="{{index.status}} == 'processing'" class="text-size-small text-info">processing </span>
|
||||
<span data-ls-if="{{index.status}} == 'failed'" class="text-size-small text-danger">failed </span>
|
||||
<span data-ls-if="{{index.status}} == 'deleting'" class="text-size-small text-danger">deleting </span>
|
||||
<span data-ls-if="{{index.status}} == 'stuck'" class="text-size-small text-danger">stuck </span>
|
||||
</td>
|
||||
|
||||
<td data-title="Index Key: ">
|
||||
|
||||
@@ -29,7 +29,7 @@ class OpenAPI3 extends Format
|
||||
*/
|
||||
public function parse(): array
|
||||
{
|
||||
/*
|
||||
/**
|
||||
* Specifications (v3.0.0):
|
||||
* https://github.com/OAI/OpenAPI-Specification/blob/master/versions/3.0.0.md
|
||||
*/
|
||||
@@ -393,20 +393,18 @@ class OpenAPI3 extends Format
|
||||
|
||||
$output['paths'][$url][\strtolower($route->getMethod())] = $temp;
|
||||
}
|
||||
|
||||
foreach ($this->models as $model) {
|
||||
foreach ($model->getRules() as $rule) {
|
||||
if (!in_array($rule['type'], ['string', 'integer', 'boolean', 'json', 'float'])) {
|
||||
if(\is_array($rule['type'])) {
|
||||
foreach ($rule['type'] as $value) {
|
||||
$usedModels[] = $value;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$usedModels[] = $rule['type'];
|
||||
}
|
||||
if (
|
||||
in_array($model->getType(), $usedModels)
|
||||
&& !in_array($rule['type'], ['string', 'integer', 'boolean', 'json', 'float'])
|
||||
) {
|
||||
$usedModels[] = $rule['type'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($this->models as $model) {
|
||||
if (!in_array($model->getType(), $usedModels) && $model->getType() !== 'error') {
|
||||
continue;
|
||||
|
||||
@@ -392,15 +392,11 @@ class Swagger2 extends Format
|
||||
|
||||
foreach ($this->models as $model) {
|
||||
foreach ($model->getRules() as $rule) {
|
||||
if (!in_array($rule['type'], ['string', 'integer', 'boolean', 'json', 'float'])) {
|
||||
if(\is_array($rule['type'])) {
|
||||
foreach ($rule['type'] as $value) {
|
||||
$usedModels[] = $value;
|
||||
}
|
||||
}
|
||||
else {
|
||||
$usedModels[] = $rule['type'];
|
||||
}
|
||||
if (
|
||||
in_array($model->getType(), $usedModels)
|
||||
&& !in_array($rule['type'], ['string', 'integer', 'boolean', 'json', 'float'])
|
||||
) {
|
||||
$usedModels[] = $rule['type'];
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user