2023-11-18 21:29:35 +01:00
|
|
|
from ninja import Schema
|
|
|
|
from pydantic import Field as APIField
|
|
|
|
|
|
|
|
|
|
|
|
class BoundsSchema(Schema):
|
2023-11-19 00:12:10 +01:00
|
|
|
"""
|
|
|
|
Describing a bounding box
|
|
|
|
"""
|
|
|
|
bounds: tuple[tuple[float, float], tuple[float, float]] = APIField(
|
|
|
|
description="(x, y) to (x, y)",
|
|
|
|
example=((-10, -20), (20, 30)),
|
|
|
|
)
|