merge: testing → main (reconcile 2-week divergence)
This commit is contained in:
15
decnet/web/db/models/common.py
Normal file
15
decnet/web/db/models/common.py
Normal file
@@ -0,0 +1,15 @@
|
||||
"""Generic response shapes used across multiple router domains."""
|
||||
from __future__ import annotations
|
||||
|
||||
from pydantic import BaseModel
|
||||
|
||||
|
||||
class MessageResponse(BaseModel):
|
||||
"""Standard envelope for mutations whose only payload is a status message.
|
||||
|
||||
Pinning the wire shape at the decorator (``response_model=MessageResponse``)
|
||||
prevents a handler that accidentally returns a richer dict — e.g. a user
|
||||
row with ``password_hash`` — from leaking extra fields to the client.
|
||||
"""
|
||||
|
||||
message: str
|
||||
Reference in New Issue
Block a user