api-request-schema-name (BTFAST003)¶
Added in 0.10.0 · Preview · Off by default (warning)
Family: fastapi · Standard: CES-17 · Languages: python
This rule is unstable and in preview. It runs only with preview = true, and only when it is selected.
Directive¶
A Pydantic model under api/**/schemas/requests/ is named {Name}Request. A warning by default.
Why¶
The suffix says at the call site which side of the boundary a model is on, and keeps a request model from being returned by mistake.
Do¶
Don't¶
Suppression¶
A comment on the class line silences the finding.