minor: ruff formatter
All changes are either: - Correcting tabs - Adding/removing line breaks - Adding trailing commas
This commit is contained in:
parent
b2e5dd2ebb
commit
c689ac1e10
91 changed files with 1710 additions and 689 deletions
|
|
@ -6,36 +6,46 @@ Models follow the nomenclature of:
|
|||
- Mixins: "<Attribute>Mixin"
|
||||
- Models: "<Module><Method><Resource><Opt:Resource><Direction>" ie "ServiceGetServiceResponse"
|
||||
"""
|
||||
|
||||
from pydantic import ConfigDict, Field
|
||||
|
||||
from src.schemas import CustomBaseModel
|
||||
|
||||
|
||||
class ServiceIDMixin(CustomBaseModel):
|
||||
service_id: int = Field(gt=0)
|
||||
|
||||
|
||||
class ServiceSchema(CustomBaseModel):
|
||||
model_config = ConfigDict(from_attributes=True, extra="ignore")
|
||||
|
||||
id: int
|
||||
name: str
|
||||
|
||||
|
||||
class ServiceWithKeySchema(ServiceSchema):
|
||||
api_key: str
|
||||
|
||||
|
||||
class ServiceGetServiceResponse(CustomBaseModel):
|
||||
services: list[ServiceSchema]
|
||||
|
||||
|
||||
class ServicePostServiceRequest(CustomBaseModel):
|
||||
name: str
|
||||
|
||||
|
||||
class ServicePostServiceResponse(CustomBaseModel):
|
||||
service: ServiceWithKeySchema
|
||||
|
||||
|
||||
class ServicePatchKeyRequest(ServiceIDMixin):
|
||||
pass
|
||||
|
||||
|
||||
class ServicePatchKeyResponse(CustomBaseModel):
|
||||
service: ServiceWithKeySchema
|
||||
|
||||
|
||||
class ServiceDeleteServiceRequest(ServiceIDMixin):
|
||||
pass
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue