Files
qdrant/openapi/openapi.lib.yml
Kartik Gupta 3830762e5c schemars example for CollectionsResponse, ScrollResult, SnapshotDescription, AliasDescription (#4714)
* example for CollectionsResponse

* points_example for ScrollResult

* example for SnapshotDescription

* fix

* example for AliasDescription

* fix: Style nit: add newline

* fix time and id

* fix order_value

* upd openapi

---------

Co-authored-by: generall <andrey@vasnetsov.com>
2024-07-24 08:12:11 +05:30

88 lines
1.8 KiB
YAML

#@ def response(model):
default:
description: error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
4XX:
description: error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
"200":
description: successful operation
content:
application/json:
schema:
type: object
properties:
time:
type: number
format: float
description: Time spent to process this request
example: 0.002
status:
type: string
example: ok
result: #@ model
#@ end
#@ def response_with_accepted(model):
default:
description: error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
4XX:
description: error
content:
application/json:
schema:
$ref: "#/components/schemas/ErrorResponse"
"200":
description: successful operation
content:
application/json:
schema:
type: object
properties:
time:
type: number
format: float
description: Time spent to process this request
example: 0.002
status:
type: string
example: ok
result: #@ model
"202":
description: operation is accepted
content:
application/json:
schema:
type: object
properties:
time:
type: number
format: float
description: Time spent to process this request
status:
type: string
#@ end
#@ def reference(model_name):
$ref: #@ "#/components/schemas/" + model_name
#@ end
#@ def type(type_name):
type: #@ type_name
#@ end
#@ def array(type_data):
type: array
items: #@ type_data
#@ end