Example generation
When a property doesn’t have an explicit #[Example], the generator produces example values using Faker, in this order:
- Faker attribute mapper — substring patterns on the property name (
_at→date(),phone→phoneNumber(), …) - Custom functions — register your own (
id,date, or app-specific) - Direct Faker fallback — the property name itself as a Faker method (
first_name→firstName())
Configure faker_attribute_mapper and custom_functions in config/openapi-docs.php. Custom functions receive the property type as their first argument.
See also #[Example] for explicit values and the :fakerMethod shorthand.