Details
-
Type:
New Feature
-
Status: Open
-
Priority:
Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: 6.0.0-b1
-
Component/s: None
-
Labels:None
Description
Use cases:
- Email template previews/validation
- AI context generation
- API documentation
- Unit testing
- Any feature needing realistic sample data
Location:
core/Util/ExampleData/ |-- examples/ | |-- client.json | |-- invoice.json | |-- service.json | |-- ... |-- ExampleDataLoader.php
Key Design Decisions:
- JSON files with a PHP loader class (one JSON file per model)
- Hybrid data approach: runtime capture + manual curation
- Plugin/module extensibility for custom example objects
Acceptance Criteria:
- ExampleDataLoader class can load and parse JSON example files
- Composite methods like getInvoiceContext() return full object graphs
- Schema output available for client-side validation
- Plugins/modules can register and merge their own example objects
| 1. | Create example environment with test data | |
Open | Unassigned | |
| 2. | Audit and capture model get() method structures | |
Open | Unassigned | |
| 3. | Sanitize captured data with realistic fake values | |
Open | Unassigned | |
| 4. | Create the JSON example files in core/Util/ExampleData/examples/ | |
Open | Unassigned | |
| 5. | Create the JSON example files in core/Util/ExampleData/examples/ | |
Open | Unassigned | |
| 6. | Define interface for plugin/module example object registration | |
Open | Unassigned | |
| 7. | Implement plugin example object discovery and merging | |
Open | Unassigned |