minor: service schema nomenclature

This commit is contained in:
Chris Milne 2026-05-28 14:27:14 +01:00
parent 33e78d4a9b
commit 00dcf7ce35
2 changed files with 8 additions and 8 deletions

View file

@ -12,29 +12,29 @@ from src.schemas import CustomBaseModel
class ServiceIDMixin(CustomBaseModel):
service_id: int
class ServiceResponse(CustomBaseModel):
class ServiceSchema(CustomBaseModel):
model_config = ConfigDict(from_attributes=True, extra="ignore")
id: int
name: str
class ServiceWithKeyResponse(ServiceResponse):
class ServiceWithKeySchema(ServiceSchema):
api_key: str
class ServiceGetServiceResponse(CustomBaseModel):
services: list[ServiceResponse]
services: list[ServiceSchema]
class ServicePostServiceRequest(CustomBaseModel):
name: str
class ServicePostServiceResponse(CustomBaseModel):
service: ServiceWithKeyResponse
service: ServiceWithKeySchema
class ServicePatchKeyRequest(ServiceIDMixin):
pass
class ServicePatchKeyResponse(CustomBaseModel):
service: ServiceWithKeyResponse
service: ServiceWithKeySchema
class ServiceDeleteServiceRequest(ServiceIDMixin):
pass