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_person_obj(
@router.patch('/cont_edu/cert/person/{obj_id}', response_model=Resp_Body_Base)
async def patch_cont_edu_cert_person_obj(
obj: Cont_Edu_Cert_Person_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_person_obj(
@router.patch('/cont_edu/cert/person/{cont_edu_cert_person_id}/json', response_model=Resp_Body_Base)
async def patch_cont_edu_cert_person_json(
cont_edu_cert_person_obj: Cont_Edu_Cert_Person_Base,
cont_edu_cert_person_id: str = Query(..., min_length=1, max_length=22),
cont_edu_cert_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,
@@ -284,7 +284,7 @@ async def search_cont_edu_cert_person_obj_li(
# Updated 2021-08-05
@router.get('/cont_edu/cert/person/{cont_edu_cert_person_id}', response_model=Resp_Body_Base)
async def get_cont_edu_cert_person_obj(
cont_edu_cert_person_id: str = Query(..., min_length=1, max_length=22),
cont_edu_cert_person_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: bool = False,
@@ -317,7 +317,7 @@ async def get_cont_edu_cert_person_obj(
# Updated 2021-07-28
@router.get('/account/{account_id}/cont_edu/cert/person/list', response_model=Resp_Body_Base)
async def get_account_obj_cont_edu_cert_person_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: bool = False,
@@ -367,7 +367,7 @@ async def get_account_obj_cont_edu_cert_person_list(
# Updated 2021-07-28
@router.get('/person/{person_id}/cont_edu/cert/person/list', response_model=Resp_Body_Base)
async def get_person_obj_cont_edu_cert_person_list(
person_id: str = Query(..., min_length=11, max_length=22),
person_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
x_account_id: str = Header(...),
@@ -415,7 +415,7 @@ async def get_person_obj_cont_edu_cert_person_list(
# Updated 2021-07-28
@router.get('/cont_edu/cert/{cont_edu_cert_id}/cont_edu/cert/person/list', response_model=Resp_Body_Base)
async def get_cont_edu_cert_obj_cont_edu_cert_person_list(
cont_edu_cert_id: str = Query(..., min_length=1, max_length=22),
cont_edu_cert_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: bool = False,
@@ -463,7 +463,7 @@ async def get_cont_edu_cert_obj_cont_edu_cert_person_list(
@router.delete('/cont_edu/cert/person/{obj_id}', response_model=Resp_Body_Base)
async def delete_cont_edu_cert_person_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,
):