24 lines
835 B
PHP
24 lines
835 B
PHP
<?php
|
|
|
|
namespace Lean\Api\Controller;
|
|
|
|
use Lean\Api\{Controller, Entity, Form, Lib};
|
|
use Notes\Route\Attribute\Method\Route;
|
|
use Notes\Route\Attribute\Object\Route as RouteObj;
|
|
use Notes\Security\Attribute\Security;
|
|
use Notes\Security\Attribute\Taxus;
|
|
use Psr\Http\Message\{ResponseInterface, ServerRequestInterface};
|
|
|
|
#[Security(locked: false)]
|
|
#[RouteObj(base: "/lean/debug")]
|
|
class Debug {
|
|
|
|
use \Lean\Api\Lib\ControllerTrait;
|
|
|
|
#[Route("/", name: "lean.api:debug-doc", method: "GET", description: "Documentation section")]
|
|
public function documentation(ServerRequestInterface $request, array $arguments) : ResponseInterface
|
|
{
|
|
return $this->renderMarkdown(getenv("LEAN_API_PROJECT_PATH") . "/meta/docs/lean-api.md", [ Entity\Error::class, ], [ Form\Debug\ErrorContext::class ]);
|
|
}
|
|
}
|