Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Added required scopes to the docstring #40

Merged
merged 3 commits into from
Jul 16, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions userdata_api/routes/category.py
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,8 @@ async def create_category(
"""
Создать категорию пользовательских данных. Получить категорию можно будет со скоупами, имена которых в category_inp.scopes
Ручка обновит документацию

Scopes: `["userdata.category.create"]`
\f
:param request: https://fastapi.tiangolo.com/advanced/using-request-directly/
:param category_inp: Принимаемая моделька
Expand Down Expand Up @@ -84,6 +86,8 @@ async def patch_category(
) -> CategoryGet:
"""
Обновить категорию

Scopes: `["userdata.category.update"]`
\f
:param request: https://fastapi.tiangolo.com/advanced/using-request-directly/
:param id: Айди обновляемой категории
Expand All @@ -103,6 +107,8 @@ async def delete_category(
) -> StatusResponseModel:
"""
Удалить категорию

Scopes: `["userdata.category.delete"]`
\f
:param request: https://fastapi.tiangolo.com/advanced/using-request-directly/
:param id: Айди удаляемой категории
Expand Down
6 changes: 6 additions & 0 deletions userdata_api/routes/param.py
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,8 @@ async def create_param(
) -> ParamGet:
"""
Создать поле внутри категории. Ответ на пользовательские данные будет такой {..., category: {...,param: '', ...}}

Scopes: `["userdata.param.create"]`
\f
:param request: https://fastapi.tiangolo.com/advanced/using-request-directly/
:param category_id: Айди котегории в которой создавать параметр
Expand Down Expand Up @@ -73,6 +75,8 @@ async def patch_param(
) -> ParamGet:
"""
Обновить параметр внутри категории

Scopes: `["userdata.param.update"]`
\f
:param request: https://fastapi.tiangolo.com/advanced/using-request-directly/
:param id: Айди обновляемого параметра
Expand All @@ -99,6 +103,8 @@ async def delete_param(
) -> StatusResponseModel:
"""
Удалить параметр внутри категории

Scopes: `["userdata.param.delete"]`
\f
:param request: https://fastapi.tiangolo.com/advanced/using-request-directly/
:param id: Айди удаляемого параметра
Expand Down
6 changes: 6 additions & 0 deletions userdata_api/routes/source.py
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,8 @@ async def create_source(
) -> SourceGet:
"""
Создать источник данных

Scopes: `["userdata.source.create"]`
\f
:param request: https://fastapi.tiangolo.com/advanced/using-request-directly/
:param source_inp: Моделька для создания
Expand Down Expand Up @@ -65,6 +67,8 @@ async def patch_source(
) -> SourceGet:
"""
Обновить источник данных

Scopes: `["userdata.source.update"]`
\f
:param request: https://fastapi.tiangolo.com/advanced/using-request-directly/
:param id: Айди обновляемого источника
Expand All @@ -83,6 +87,8 @@ async def delete_source(
) -> StatusResponseModel:
"""
Удалить источник данных

Scopes: `["userdata.source.delete"]`
\f
:param request: https://fastapi.tiangolo.com/advanced/using-request-directly/
:param id: Айди удаляемого источника
Expand Down
Loading