11
This commit is contained in:
13
app/schemas/agent_card_key.py
Normal file
13
app/schemas/agent_card_key.py
Normal file
@@ -0,0 +1,13 @@
|
||||
from pydantic import BaseModel, Field, field_validator
|
||||
|
||||
|
||||
class AgentCardKeyUpdate(BaseModel):
|
||||
agent_remark: str | None = Field(default=None, max_length=255)
|
||||
|
||||
@field_validator("agent_remark")
|
||||
@classmethod
|
||||
def normalize_agent_remark(cls, value: str | None) -> str | None:
|
||||
if value is None:
|
||||
return None
|
||||
stripped = value.strip()
|
||||
return stripped or None
|
||||
Reference in New Issue
Block a user