cloud-api/src/service/schemas.py

32 lines
675 B
Python
Raw Normal View History

"""
2026-05-26 10:16:59 +01:00
Pydantic models for the service module
Models:
- List: Description
- Models: Description
2026-05-26 10:16:59 +01:00
"""
from pydantic import ConfigDict
2026-05-26 10:16:59 +01:00
from src.schemas import CustomBaseModel
class ServiceResponse(CustomBaseModel):
model_config = ConfigDict(from_attributes=True, extra="ignore")
2026-05-26 10:16:59 +01:00
id: int
name: str
class ServiceWithKeyResponse(ServiceResponse):
api_key: str
class ServiceGetServiceResponse(CustomBaseModel):
services: list[ServiceResponse]
class ServicePostServiceRequest(CustomBaseModel):
name: str
class ServicePostServiceResponse(CustomBaseModel):
service: ServiceWithKeyResponse
class ServicePatchKeyResponse(CustomBaseModel):
service: ServiceWithKeyResponse