Saving current progress with change from using Query() to Path()

This commit is contained in:
Scott Idem
2024-04-26 14:51:11 -04:00
parent b37f14d25c
commit f4eda34035
67 changed files with 236 additions and 236 deletions

View File

@@ -1,5 +1,5 @@
import datetime
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Query, Response, status
from fastapi import APIRouter, Body, Depends, Header, HTTPException, Path, Query, Response, status
from pydantic import BaseModel, EmailStr, Field
from typing import Dict, List, Optional, Set, Union
@@ -45,7 +45,7 @@ async def post_cont_edu_cert_obj(
@router.patch('/cont_edu/cert/{obj_id}', response_model=Resp_Body_Base)
async def patch_cont_edu_cert_obj(
obj: Cont_Edu_Cert_Base,
obj_id: str = Query(..., min_length=1, max_length=22),
obj_id: str = Path(min_length=11, max_length=22),
x_account_id: Optional[str] = Header(..., ),
return_obj: Optional[bool] = True,
by_alias: Optional[bool] = True,
@@ -74,7 +74,7 @@ async def patch_cont_edu_cert_obj(
@router.patch('/cont_edu/cert/{cont_edu_cert_id}/json', response_model=Resp_Body_Base)
async def patch_cont_edu_cert_json(
cont_edu_cert_obj: Cont_Edu_Cert_Base,
cont_edu_cert_id: str = Query(..., min_length=1, max_length=22),
cont_edu_cert_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,
@@ -175,7 +175,7 @@ async def get_cont_edu_cert_obj_li(
@router.get('/cont_edu/cert/{obj_id}', response_model=Resp_Body_Base)
async def get_cont_edu_cert_obj(
obj_id: str = Query(..., min_length=1, max_length=22),
obj_id: str = Path(min_length=11, max_length=22),
x_account_id: str = Header(...),
by_alias: Optional[bool] = True,
exclude_unset: Optional[bool] = True,
@@ -198,7 +198,7 @@ async def get_cont_edu_cert_obj(
# Updated 2021-07-28
@router.get('/account/{account_id}/cont_edu/cert/list', response_model=Resp_Body_Base)
async def get_account_obj_cont_edu_cert_list(
account_id: str = Query(..., min_length=1, max_length=22),
account_id: str = Path(min_length=11, max_length=22),
limit: int = 500, # For now this covers any included objects or object lists
enabled: str = 'enabled', # For now this covers any included objects or object lists
inc_cont_edu_cert_person_list: bool = False,
@@ -246,7 +246,7 @@ async def get_account_obj_cont_edu_cert_list(
@router.delete('/cont_edu/cert/{obj_id}', response_model=Resp_Body_Base)
async def delete_cont_edu_cert_obj(
obj_id: str = Query(..., min_length=1, max_length=22),
obj_id: str = Path(min_length=11, max_length=22),
x_account_id: str = Header(...),
response: Response = Response,
):