mirror of
https://github.com/nextcloud/server.git
synced 2026-04-20 22:00:39 -04:00
fix(Text2Image): Fix OpenAPI types
Signed-off-by: Marcel Klehr <mklehr@gmx.net>
This commit is contained in:
parent
37c4ccc751
commit
7b7f552a6e
2 changed files with 66 additions and 3 deletions
|
|
@ -82,7 +82,7 @@ class TextToImageApiController extends \OCP\AppFramework\OCSController {
|
|||
* @param string $identifier An arbitrary identifier for the task
|
||||
* @param int $numberOfImages The number of images to generate
|
||||
*
|
||||
* @return DataResponse<Http::STATUS_OK, array{task: CoreTextToImageTask}, array{}>|DataResponse<Http::STATUS_PRECONDITION_FAILED, array{message: string}, array{}>
|
||||
* @return DataResponse<Http::STATUS_OK, array{task: CoreTextToImageTask}, array{}>|DataResponse<Http::STATUS_PRECONDITION_FAILED|Http::STATUS_INTERNAL_SERVER_ERROR, array{message: string}, array{}>
|
||||
*
|
||||
* 200: Task scheduled successfully
|
||||
* 412: Scheduling task is not possible
|
||||
|
|
|
|||
|
|
@ -458,7 +458,8 @@
|
|||
"userId",
|
||||
"appId",
|
||||
"input",
|
||||
"identifier"
|
||||
"identifier",
|
||||
"numberOfImages"
|
||||
],
|
||||
"properties": {
|
||||
"id": {
|
||||
|
|
@ -483,6 +484,10 @@
|
|||
"identifier": {
|
||||
"type": "string",
|
||||
"nullable": true
|
||||
},
|
||||
"numberOfImages": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
}
|
||||
}
|
||||
},
|
||||
|
|
@ -5280,6 +5285,16 @@
|
|||
"default": ""
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "numberOfImages",
|
||||
"in": "query",
|
||||
"description": "The number of images to generate",
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64",
|
||||
"default": 8
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
|
|
@ -5367,6 +5382,44 @@
|
|||
}
|
||||
}
|
||||
}
|
||||
},
|
||||
"500": {
|
||||
"description": "",
|
||||
"content": {
|
||||
"application/json": {
|
||||
"schema": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"ocs"
|
||||
],
|
||||
"properties": {
|
||||
"ocs": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"meta",
|
||||
"data"
|
||||
],
|
||||
"properties": {
|
||||
"meta": {
|
||||
"$ref": "#/components/schemas/OCSMeta"
|
||||
},
|
||||
"data": {
|
||||
"type": "object",
|
||||
"required": [
|
||||
"message"
|
||||
],
|
||||
"properties": {
|
||||
"message": {
|
||||
"type": "string"
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -5680,7 +5733,7 @@
|
|||
}
|
||||
}
|
||||
},
|
||||
"/ocs/v2.php/text2image/task/{id}/image": {
|
||||
"/ocs/v2.php/text2image/task/{id}/image/{index}": {
|
||||
"get": {
|
||||
"operationId": "text_to_image_api-get-image",
|
||||
"summary": "This endpoint allows downloading the resulting image of a task",
|
||||
|
|
@ -5707,6 +5760,16 @@
|
|||
"format": "int64"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "index",
|
||||
"in": "path",
|
||||
"description": "The index of the image to retrieve",
|
||||
"required": true,
|
||||
"schema": {
|
||||
"type": "integer",
|
||||
"format": "int64"
|
||||
}
|
||||
},
|
||||
{
|
||||
"name": "OCS-APIRequest",
|
||||
"in": "header",
|
||||
|
|
|
|||
Loading…
Reference in a new issue