diff --git a/asset/lean-api/js/api-console.js b/asset/lean-api/js/api-console.js new file mode 100644 index 0000000..ae54cd5 --- /dev/null +++ b/asset/lean-api/js/api-console.js @@ -0,0 +1,7 @@ +class ApiConsole { + constructor(options) { + + } + + +} \ No newline at end of file diff --git a/src/RouteDescriptor.php b/src/RouteDescriptor.php index 9db4e8d..db6ef9c 100644 --- a/src/RouteDescriptor.php +++ b/src/RouteDescriptor.php @@ -9,14 +9,6 @@ use Picea\Extension\UrlExtension; class RouteDescriptor { - public string $routeLine = << - %s - %s - %s - %s - -HTML; - public function __construct( public object $controller, protected UrlExtension $urlExtension, @@ -45,7 +37,7 @@ HTML; 'path' => $base.$path, 'cleaned' => $cleaned, 'description'=> $route->description, - 'methods' =>implode(', ', (array)$route->method), + 'methods' => $route->method, ]; } } diff --git a/view/lean-api/route_descriptor.phtml b/view/lean-api/route_descriptor.phtml index 86143ef..1537953 100644 --- a/view/lean-api/route_descriptor.phtml +++ b/view/lean-api/route_descriptor.phtml @@ -1,9 +1,31 @@ +{% function printMethods(array|string $methods) %} + {% foreach (array) $methods as $method %} + {{ $method }} + {% endforeach %} +{% endfunction %} +