- WIP on reworking lean-api's visual
This commit is contained in:
1 parent
d2202066ba
commit
cb27ab7974
12 files changed
+92
-1
No files matched your search
@@ -2,6 +2,7 @@
|
||||
|
||||
namespace Lean\Api;
|
||||
|
||||
use Lean\Api\Attribute\EntityField;
|
||||
use Lean\Factory\HttpFactory;
|
||||
use Notes\ObjectReflection;
|
||||
use Notes\Route\Attribute\Method\Route;
|
||||
@@ -80,6 +81,7 @@ class EntityDescriptor
|
||||
$table = $reflector->reflectClass()->getAttribute(Table::class);
|
||||
|
||||
foreach($reflector->reflectProperties() as $property) {
|
||||
$entityField = $property->getAttribute(EntityField::class);
|
||||
$field = $property->getAttribute(Field::class);
|
||||
|
||||
if ($field) {
|
||||
@@ -87,7 +89,7 @@ class EntityDescriptor
|
||||
$propertyHtml .= sprintf(
|
||||
$this->entityField,
|
||||
$property->name,
|
||||
$field->object->description,
|
||||
$entityField->object->description ?? "",
|
||||
$field->object->name ?: $property->name,
|
||||
$field->tag,
|
||||
$field->object->type ?? implode(' | ', array_map(fn($e) => $e->type, $types)),
|
||||
|
||||
Reference in new issue
Block a user