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

@@ -89,7 +89,7 @@ async def v4_post_event_person_obj_new(
@router.patch('/v4/event/person/{event_person_id}/exist', response_model=Resp_Body_Base)
async def v4_patch_event_person_obj_exist(
event_person_obj: Event_Person_Base,
event_person_id: str = Query(..., min_length=11, max_length=22),
event_person_id: str = Path(min_length=11, max_length=22),
create_sub_obj: bool = False,
fail_any: bool = True, # Fail if any thing goes wrong for sub objects
@@ -340,7 +340,7 @@ async def v2_post_event_person_new(
@router.patch('/event/person/{event_person_id}/json', response_model=Resp_Body_Base)
async def patch_event_person_json(
event_person_obj: Event_Person_Base,
event_person_id: str = Query(..., min_length=1, max_length=22),
event_person_id: str = Path(min_length=11, max_length=22),
create_sub_obj: bool = False,
x_account_id: Optional[str] = Header(..., ),
return_obj: Optional[bool] = True,
@@ -380,7 +380,7 @@ async def patch_event_person_json(
# Working well as of 2021-06-04. Using as a template for other routes.
@router.get('/event/person/{event_person_id}', response_model=Resp_Body_Base)
async def get_event_person_obj(
event_person_id: str = Query(..., min_length=11, max_length=22),
event_person_id: str = Path(min_length=11, max_length=22),
enabled: str = 'enabled', # For now this covers any included objects or object lists
limit: int = 500, # For now this covers any included objects or object lists
inc_address: bool = False, # Under contact
@@ -445,7 +445,7 @@ async def get_event_person_obj(
@router.get('/event/{event_id}/person/search', response_model=Resp_Body_Base)
async def search_event_person_obj_li(
# account_id: str = Query(None, min_length=11, max_length=22),
event_id: str = Query(None, min_length=11, max_length=22),
event_id: str = Path(min_length=11, max_length=22),
event_person_id: str = Query('', max_length=50),
external_id: str = Query('', max_length=50),
given_name: str = Query('', max_length=25),
@@ -607,7 +607,7 @@ async def search_event_person_obj_li(
# Updated 2021-08-17
@router.get('/event/registration/{event_registration_id}/event/person/list', response_model=Resp_Body_Base)
async def get_event_registration_event_person_obj_li(
event_registration_id: str = Query(..., min_length=1, max_length=22),
event_registration_id: str = Path(min_length=11, max_length=22),
enabled: str = 'enabled',
limit: int = 1000,
inc_address: bool = False,
@@ -658,7 +658,7 @@ async def get_event_registration_event_person_obj_li(
# NOT FINISHED YET
@router.get('/person/{person_id}/event/person/list', response_model=Resp_Body_Base)
async def get_person_event_person_obj_li(
person_id: str = Query(..., min_length=1, max_length=22),
person_id: str = Path(min_length=11, max_length=22),
enabled: str = 'enabled',
limit: int = 1000,
inc_address: bool = False,