'object', 'properties' => ['post_id' => ['type' => 'integer', 'minimum' => 1]], 'required' => ['post_id'], 'additionalProperties' => false, ]; } public function outputSchema(): ?array { return PostPresenter::fullSchema(); } public function annotations(): array { return ['readonly' => true, 'destructive' => false, 'idempotent' => true]; } public function isDirect(): bool { return true; } public function permission(array $input): bool|WP_Error { $post = PostGuard::editable($input['post_id'] ?? null, $this->schema); return $post instanceof WP_Error ? $post : true; } public function execute(array $input): mixed { $post = PostGuard::editable($input['post_id'] ?? null, $this->schema); if ($post instanceof WP_Error) { return $post; } return $this->presenter->full($post); } }