MapOutputName, MapInputName, and MapName attributes. This guide clarifies when to use which name.
In the Data Object
Key Principle
Key Principle
In data class definitions, always use the original property name for:
- Validation rules
- Allowed request includes/excludes/excepts/only
- Custom rules methods
When Creating a Data Object
You can use either the mapped or original name:When Adding Includes/Excludes
Always use the original name:In Request Query Parameters
You can use either the mapped or original name:When Validating
Always use the original name:Summary Table
| Context | Use Original | Use Mapped | Use Either |
|---|---|---|---|
| Data class definitions (rules, allowed, etc.) | ✓ | ||
| Creating data objects | ✓ | ||
| Includes/excludes/except/only | ✓ | ||
| Request query parameters | ✓ | ||
| Validation | ✓ |
When in doubt, use the original property name. It always works in internal contexts.