Lots of changes to get to FastAPI 95.1

This commit is contained in:
Scott Idem
2024-04-26 15:15:37 -04:00
parent f4eda34035
commit faecd974b9
38 changed files with 78 additions and 79 deletions

View File

@@ -177,7 +177,7 @@ async def get_order_obj_li(
# Updated 2021-08-07
@router.get('/order/{order_id}', response_model=Resp_Body_Base)
async def get_order_obj(
order_id: str = Query(..., min_length=11, max_length=22),
order_id: str = Path(min_length=11, max_length=22),
limit: int = 500,
enabled: str = 'enabled',
inc_order_line_list: bool = False,
@@ -214,7 +214,7 @@ async def get_order_obj(
# Updated 2021-12-13
@router.get('/{obj_type}/{obj_id}/order/list', response_model=Resp_Body_Base)
async def get_obj_id_order_list(
obj_type: str = Query(..., min_length=4, max_length=25), # Expects account or person
obj_type: str = Path(min_length=4, max_length=25), # Expects account or person
obj_id: str = Path(min_length=11, max_length=22),
from_datetime: datetime.datetime = None,
to_datetime: datetime.datetime = None,
@@ -396,7 +396,7 @@ async def get_obj_id_order_list(
# Updated 2021-11-19
@router.get('/person/{person_id}/order/cart', response_model=Resp_Body_Base)
async def get_person_id_order_cart(
person_id: str = Query(..., min_length=11, max_length=22),
person_id: str = Path(min_length=11, max_length=22),
enabled: str = 'enabled',
inc_order_line_list: bool = False,
inc_order_cfg: bool = False,
@@ -435,7 +435,7 @@ async def delete_order_obj(
# NOTE: The router needs to have the prefix (/order) removed.
@router.delete('/order/{order_id}/line/<order_line_id>/remove', response_model=Resp_Body_Base)
async def delete_order_line_obj_NOT_SURE(
order_id: str = Query(..., min_length=1, max_length=22),
order_id: str = Path(min_length=11, max_length=22),
obj: Order_Base = None,
x_account_id: Optional[str] = Header(..., ),
return_obj: Optional[bool] = True,