Skip to content

About

FastAPI 에서 Custom Permission을 사용하고, Swagger 문서에서 필요한 권한을 보여줌.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Latest commit

 

History

4 Commits

Folders and files

Repository files navigation

🚀 FastAPI Permission Usage (FastAPI 권한 사용 방법)

@router.get("/", response_model=List[SummarySchema])
async def read_all_summaries(
        user_data = Depends(Permission([
            RoleType.OWNER,
            RoleType.EDITOR,
            RoleType.VIEWER
        ])
    )) -> List[SummarySchema]:
    return await crud.get_all()

Result (결과물)

img

Test-Driven Development with FastAPI and Docker

Continuous Integration and Delivery

https://testdriven.io/courses/tdd-fastapi/

About

FastAPI 에서 Custom Permission을 사용하고, Swagger 문서에서 필요한 권한을 보여줌.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages