diff options
-rw-r--r-- | core/Controller/TextToImageApiController.php | 2 | ||||
-rw-r--r-- | core/openapi.json | 67 |
2 files changed, 66 insertions, 3 deletions
diff --git a/core/Controller/TextToImageApiController.php b/core/Controller/TextToImageApiController.php index aee3a462f5f..27833c0035d 100644 --- a/core/Controller/TextToImageApiController.php +++ b/core/Controller/TextToImageApiController.php @@ -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 diff --git a/core/openapi.json b/core/openapi.json index 6f606ceb4ca..2bf52d0895d 100644 --- a/core/openapi.json +++ b/core/openapi.json @@ -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" } } }, @@ -5281,6 +5286,16 @@ } }, { + "name": "numberOfImages", + "in": "query", + "description": "The number of images to generate", + "schema": { + "type": "integer", + "format": "int64", + "default": 8 + } + }, + { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", @@ -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", @@ -5708,6 +5761,16 @@ } }, { + "name": "index", + "in": "path", + "description": "The index of the image to retrieve", + "required": true, + "schema": { + "type": "integer", + "format": "int64" + } + }, + { "name": "OCS-APIRequest", "in": "header", "description": "Required to be true for the API request to pass", |