mirror of
https://github.com/ae-utbm/sith.git
synced 2025-10-30 00:23:54 +00:00
15 lines
334 B
Python
15 lines
334 B
Python
from ninja import ModelSchema
|
|
from pydantic import Field
|
|
|
|
from api.models import ApiClient
|
|
from core.schemas import SimpleUserSchema
|
|
|
|
|
|
class ApiClientSchema(ModelSchema):
|
|
class Meta:
|
|
model = ApiClient
|
|
fields = ["id", "name"]
|
|
|
|
owner: SimpleUserSchema
|
|
permissions: list[str] = Field(alias="all_permissions")
|