Here is an example: Laravel Data object used to describe request body automatically documented in API documentation. All comments, default values, etc are documented too.
This works for responses created with Laravel Data as well.
Supported Laravel Data features
- Collection properties support
- Wrapping support
- Support of accurate schema determination when Data object is used for Input or Output
- Optional/Lazy support when used on properties types
- Data collections support
- Properties names mapping support