Skip to content

Commit 4f0458b

Browse files
committed
chore: update openapi schema to examples from example
1 parent 0c00d37 commit 4f0458b

2 files changed

Lines changed: 9 additions & 9 deletions

File tree

‎docs/reference/openapi.yaml‎

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -377,7 +377,7 @@ info:
377377
name: Apache 2.0
378378
url: https://www.apache.org/licenses/LICENSE-2.0.html
379379
title: BlueAPI Control
380-
version: 1.1.1
380+
version: 1.1.2
381381
openapi: 3.1.0
382382
paths:
383383
/config/oidc:
@@ -596,14 +596,14 @@ paths:
596596
requestBody:
597597
content:
598598
application/json:
599-
example:
600-
instrument_session: cm12345-1
601-
name: count
602-
params:
603-
detectors:
604-
- x
605599
schema:
606600
$ref: '#/components/schemas/TaskRequest'
601+
examples:
602+
- instrument_session: cm12345-1
603+
name: count
604+
params:
605+
detectors:
606+
- x
607607
required: true
608608
responses:
609609
'201':

‎src/blueapi/service/main.py‎

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@
5858
from .runner import WorkerDispatcher
5959

6060
#: API version to publish in OpenAPI schema
61-
REST_API_VERSION = "1.1.1"
61+
REST_API_VERSION = "1.1.2"
6262

6363
LICENSE_INFO: dict[str, str] = {
6464
"name": "Apache 2.0",
@@ -298,7 +298,7 @@ def get_device_by_name(
298298
def submit_task(
299299
request: Request,
300300
response: Response,
301-
task_request: Annotated[TaskRequest, Body(..., example=example_task_request)],
301+
task_request: Annotated[TaskRequest, Body(..., examples=[example_task_request])],
302302
runner: Annotated[WorkerDispatcher, Depends(_runner)],
303303
) -> TaskResponse:
304304
"""Submit a task to the worker."""

0 commit comments

Comments
 (0)