-
Notifications
You must be signed in to change notification settings - Fork 1
Open
Labels
enhancementNew feature or requestNew feature or request
Milestone
Description
There should be an ability to set interface that the generated DTO class will implement.
For example, each DTO class can use the ToArray trait and contain toArray() method. So you may want to make sure that your DTO class implements some interface named e.g. Arrayable (though, Laravel framework has Arrayable interface).
The user should be able to define "interfaces" like this:
{
"class": "item",
"namespace_postfix": "",
"interfaces": "\Path\To\Arrayable",
"rules": {
"id": "int",
"count": "nullable|int",
"name": "string",
"description": "nullable|string",
"is_active": "bool"
}
}
where \Path\To\Arrayable is the namespace of the interface.
Separate interfaces with comma, when there is a need to implement multiple interfaces:
"interfaces": "\Path\To\FirstInterface, \Path\To\SecondInterface",
Metadata
Metadata
Assignees
Labels
enhancementNew feature or requestNew feature or request