minor: service schema nomenclature
This commit is contained in:
parent
33e78d4a9b
commit
00dcf7ce35
2 changed files with 8 additions and 8 deletions
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue