Open phansys opened 7 years ago
Great idea. And in future rules for payload options-resolver can encapsulate in DTO classes. E.g.
$entity = Invoice::create(['customer_id' => 1]);
$result = $api->save($entity);
$result->getCustomerId(); $result->getDueDate(); .... $result->toArray();
Use symfony/options-resolver in order to handle request requirements and parameters.
Example with invoice creation payload: