no-restated-closed-domain-description
Do not restate a field's names or its string Literal or local string Enum domain in its Pydantic description.
Why
Pydantic already publishes field names and literal and enum domains in JSON Schema; duplicate prose adds no meaning and must-be lists can contradict the generated contract after a value changes.
Fix
Remove a description that only repeats names, or only the repeated value list. Preserve guidance about when to use each value, UX labels, examples, deprecation, or rationale not encoded by the field type.
Examples
from typing import Literalfrom pydantic import BaseModel, Field
class Request(BaseModel): mode: Literal["realtime", "batch"] = Field( description="Must be 'realtime' or 'batch'." )from typing import Literalfrom pydantic import BaseModel, Field
class Request(BaseModel): mode: Literal["realtime", "batch"] = Field( description="Use batch mode for work expected to exceed the request timeout." )Formerly: no-redundant-literal-description