Powerful and easy to use cms to build websites, blogs or ecommerce stores.
HTML backendblogblog-engineblog-platformbloggingcmscontent-managementcontent-management-systemecommerceecommerce-platformno-codepage-builderphpphp-cmsphp7php8self-hostedshopping-cartweb-applicationwebsite-builder
Rest default response
givanz45c41065f50e
diff --git a/rest/controller/base.php b/rest/controller/base.phpindex beace36..f803276 100644--- a/rest/controller/base.php+++ b/rest/controller/base.php@@ -194,7 +194,47 @@ class Base {$response = Response::getInstance();http_response_code($statusCode);- $response->output(is_array($message) ? $message : ['message' => $message, 'code' => $statusCode]);+ $output = [+ 'openapi' => '3.1.0',+ 'info' => [+ 'title' => 'Vvveb',+ 'description' => 'Vvveb',+ 'version' => '1',+ 'contact' => [+ ],+ ],+ 'servers' => [['url' => '/rest']],+ 'tags' => [['name' => 'v1', 'description' => '']],+ 'security' => [['bearerAuth' => [], 'basicAuth' => []]],+ 'components' => [+ 'securitySchemes' => [+ 'bearerAuth' => [+ 'type' => 'http',+ 'scheme' => 'bearer',+ 'in' => 'header',+ 'description' => 'Use api auth token as credential',+ ],+ 'basicAuth' => [+ 'type' => 'http',+ 'scheme' => 'basic',+ 'in' => 'header',+ 'username' => '',+ 'password' => '',+ 'description' => 'Use admin user and password as credentials',+ ],+ ],+ 'schemas' => [],+ ],+ 'code' => $statusCode,+ ];++ if (is_array($message)) {+ $output = $output + $message;+ } else {+ $output['message'] = $message;+ }++ $response->output($output);die();}