mirror of
https://github.com/appwrite/appwrite.git
synced 2026-05-26 13:51:13 +00:00
fix: openapi v3 use string
This commit is contained in:
@@ -9403,12 +9403,9 @@
|
||||
"format": "int32"
|
||||
},
|
||||
"responseBody": {
|
||||
"type": "object",
|
||||
"type": "string",
|
||||
"description": "HTTP response body. This will return empty unless execution is created as synchronous.",
|
||||
"x-example": "",
|
||||
"items": {
|
||||
"$ref": "#\/components\/schemas\/payload"
|
||||
}
|
||||
"x-example": ""
|
||||
},
|
||||
"responseHeaders": {
|
||||
"type": "array",
|
||||
|
||||
@@ -35587,12 +35587,9 @@
|
||||
"format": "int32"
|
||||
},
|
||||
"responseBody": {
|
||||
"type": "object",
|
||||
"type": "string",
|
||||
"description": "HTTP response body. This will return empty unless execution is created as synchronous.",
|
||||
"x-example": "",
|
||||
"items": {
|
||||
"$ref": "#\/components\/schemas\/payload"
|
||||
}
|
||||
"x-example": ""
|
||||
},
|
||||
"responseHeaders": {
|
||||
"type": "array",
|
||||
|
||||
@@ -25964,12 +25964,9 @@
|
||||
"format": "int32"
|
||||
},
|
||||
"responseBody": {
|
||||
"type": "object",
|
||||
"type": "string",
|
||||
"description": "HTTP response body. This will return empty unless execution is created as synchronous.",
|
||||
"x-example": "",
|
||||
"items": {
|
||||
"$ref": "#\/components\/schemas\/payload"
|
||||
}
|
||||
"x-example": ""
|
||||
},
|
||||
"responseHeaders": {
|
||||
"type": "array",
|
||||
|
||||
@@ -9403,12 +9403,9 @@
|
||||
"format": "int32"
|
||||
},
|
||||
"responseBody": {
|
||||
"type": "object",
|
||||
"type": "string",
|
||||
"description": "HTTP response body. This will return empty unless execution is created as synchronous.",
|
||||
"x-example": "",
|
||||
"items": {
|
||||
"$ref": "#\/components\/schemas\/payload"
|
||||
}
|
||||
"x-example": ""
|
||||
},
|
||||
"responseHeaders": {
|
||||
"type": "array",
|
||||
|
||||
@@ -35587,12 +35587,9 @@
|
||||
"format": "int32"
|
||||
},
|
||||
"responseBody": {
|
||||
"type": "object",
|
||||
"type": "string",
|
||||
"description": "HTTP response body. This will return empty unless execution is created as synchronous.",
|
||||
"x-example": "",
|
||||
"items": {
|
||||
"$ref": "#\/components\/schemas\/payload"
|
||||
}
|
||||
"x-example": ""
|
||||
},
|
||||
"responseHeaders": {
|
||||
"type": "array",
|
||||
|
||||
@@ -25964,12 +25964,9 @@
|
||||
"format": "int32"
|
||||
},
|
||||
"responseBody": {
|
||||
"type": "object",
|
||||
"type": "string",
|
||||
"description": "HTTP response body. This will return empty unless execution is created as synchronous.",
|
||||
"x-example": "",
|
||||
"items": {
|
||||
"$ref": "#\/components\/schemas\/payload"
|
||||
}
|
||||
"x-example": ""
|
||||
},
|
||||
"responseHeaders": {
|
||||
"type": "array",
|
||||
|
||||
@@ -9589,13 +9589,9 @@
|
||||
"format": "int32"
|
||||
},
|
||||
"responseBody": {
|
||||
"type": "object",
|
||||
"type": "payload",
|
||||
"description": "HTTP response body. This will return empty unless execution is created as synchronous.",
|
||||
"x-example": "",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#\/definitions\/payload"
|
||||
}
|
||||
"x-example": ""
|
||||
},
|
||||
"responseHeaders": {
|
||||
"type": "array",
|
||||
|
||||
@@ -36104,13 +36104,9 @@
|
||||
"format": "int32"
|
||||
},
|
||||
"responseBody": {
|
||||
"type": "object",
|
||||
"type": "payload",
|
||||
"description": "HTTP response body. This will return empty unless execution is created as synchronous.",
|
||||
"x-example": "",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#\/definitions\/payload"
|
||||
}
|
||||
"x-example": ""
|
||||
},
|
||||
"responseHeaders": {
|
||||
"type": "array",
|
||||
|
||||
@@ -26458,13 +26458,9 @@
|
||||
"format": "int32"
|
||||
},
|
||||
"responseBody": {
|
||||
"type": "object",
|
||||
"type": "payload",
|
||||
"description": "HTTP response body. This will return empty unless execution is created as synchronous.",
|
||||
"x-example": "",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#\/definitions\/payload"
|
||||
}
|
||||
"x-example": ""
|
||||
},
|
||||
"responseHeaders": {
|
||||
"type": "array",
|
||||
|
||||
@@ -9589,13 +9589,9 @@
|
||||
"format": "int32"
|
||||
},
|
||||
"responseBody": {
|
||||
"type": "object",
|
||||
"type": "payload",
|
||||
"description": "HTTP response body. This will return empty unless execution is created as synchronous.",
|
||||
"x-example": "",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#\/definitions\/payload"
|
||||
}
|
||||
"x-example": ""
|
||||
},
|
||||
"responseHeaders": {
|
||||
"type": "array",
|
||||
|
||||
@@ -36104,13 +36104,9 @@
|
||||
"format": "int32"
|
||||
},
|
||||
"responseBody": {
|
||||
"type": "object",
|
||||
"type": "payload",
|
||||
"description": "HTTP response body. This will return empty unless execution is created as synchronous.",
|
||||
"x-example": "",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#\/definitions\/payload"
|
||||
}
|
||||
"x-example": ""
|
||||
},
|
||||
"responseHeaders": {
|
||||
"type": "array",
|
||||
|
||||
@@ -26458,13 +26458,9 @@
|
||||
"format": "int32"
|
||||
},
|
||||
"responseBody": {
|
||||
"type": "object",
|
||||
"type": "payload",
|
||||
"description": "HTTP response body. This will return empty unless execution is created as synchronous.",
|
||||
"x-example": "",
|
||||
"items": {
|
||||
"type": "object",
|
||||
"$ref": "#\/definitions\/payload"
|
||||
}
|
||||
"x-example": ""
|
||||
},
|
||||
"responseHeaders": {
|
||||
"type": "array",
|
||||
|
||||
@@ -549,6 +549,7 @@ class OpenAPI3 extends Format
|
||||
switch ($rule['type']) {
|
||||
case 'string':
|
||||
case 'datetime':
|
||||
case 'payload':
|
||||
$type = 'string';
|
||||
break;
|
||||
|
||||
|
||||
@@ -585,6 +585,10 @@ class Swagger2 extends Format
|
||||
$type = 'boolean';
|
||||
break;
|
||||
|
||||
case 'payload':
|
||||
$type = 'payload';
|
||||
break;
|
||||
|
||||
default:
|
||||
$type = 'object';
|
||||
$rule['type'] = ($rule['type']) ?: 'none';
|
||||
|
||||
@@ -14,6 +14,7 @@ abstract class Model
|
||||
public const TYPE_DATETIME = 'datetime';
|
||||
public const TYPE_DATETIME_EXAMPLE = '2020-10-15T06:38:00.000+00:00';
|
||||
public const TYPE_RELATIONSHIP = 'relationship';
|
||||
public const TYPE_PAYLOAD = 'payload';
|
||||
|
||||
/**
|
||||
* @var bool
|
||||
|
||||
@@ -81,7 +81,7 @@ class Execution extends Model
|
||||
'example' => 200,
|
||||
])
|
||||
->addRule('responseBody', [
|
||||
'type' => Response::MODEL_PAYLOAD,
|
||||
'type' => self::TYPE_PAYLOAD,
|
||||
'description' => 'HTTP response body. This will return empty unless execution is created as synchronous.',
|
||||
'default' => '',
|
||||
])
|
||||
|
||||
@@ -1,29 +0,0 @@
|
||||
<?php
|
||||
|
||||
namespace Appwrite\Utopia\Response\Model;
|
||||
|
||||
use Appwrite\Utopia\Response;
|
||||
use Appwrite\Utopia\Response\Model;
|
||||
|
||||
class Payload extends Model
|
||||
{
|
||||
/**
|
||||
* Get Name
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getName(): string
|
||||
{
|
||||
return 'Payload';
|
||||
}
|
||||
|
||||
/**
|
||||
* Get Type
|
||||
*
|
||||
* @return string
|
||||
*/
|
||||
public function getType(): string
|
||||
{
|
||||
return Response::MODEL_PAYLOAD;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user