From 054fb8b9e85cce6548a723549aac6c5f321e92c5 Mon Sep 17 00:00:00 2001 From: Stuart Campbell Date: Thu, 18 Jan 2024 08:12:18 -0500 Subject: [PATCH 1/2] Fix spelling error in endpoint name --- src/nsls2api/api/v1/proposal_api.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/nsls2api/api/v1/proposal_api.py b/src/nsls2api/api/v1/proposal_api.py index b5a704be..d6a26cd3 100644 --- a/src/nsls2api/api/v1/proposal_api.py +++ b/src/nsls2api/api/v1/proposal_api.py @@ -54,7 +54,6 @@ async def get_proposals_for_cycle(cycle: str): {"error": f"No proposals were found for cycle {cycle}"}, status_code=404, ) - data = {"cycle": cycle, "proposals": proposal_list} return data @@ -97,7 +96,7 @@ async def get_proposals_users(proposal_id: int): return users -@router.get("/proposal/{proposal_id}/principle_invesigator", response_model=list[User]) +@router.get("/proposal/{proposal_id}/principal-investigator", response_model=list[User]) async def get_proposal_principle_invesigator(proposal_id: int): principle_invesigator = await proposal_service.pi_from_proposal(proposal_id) From a786fc06ced414b30ea380d5f5b4654e93973282 Mon Sep 17 00:00:00 2001 From: Stuart Campbell Date: Thu, 18 Jan 2024 08:41:16 -0500 Subject: [PATCH 2/2] Enable schema inclusion for deprecated endpoint --- src/nsls2api/api/v1/user_api.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/nsls2api/api/v1/user_api.py b/src/nsls2api/api/v1/user_api.py index cf144ecf..bf277e8a 100644 --- a/src/nsls2api/api/v1/user_api.py +++ b/src/nsls2api/api/v1/user_api.py @@ -75,7 +75,7 @@ async def get_myself(current_user: Annotated[Person, Depends(get_current_user)]) "/data_session/{username}", response_model=DataSessionAccess, tags=["data"], - include_in_schema=False, + include_in_schema=True, description="Deprecated endpoint included for Tiled compatibility.", deprecated=True, )