Revert "add: configs as json GUC for db-root-spec"
This reverts commit f34ca15e84.
This commit is contained in:
Vendored
+11
-15
@@ -1866,22 +1866,18 @@ $$ language sql;
|
||||
|
||||
create or replace function root() returns "application/openapi+json" as $_$
|
||||
declare
|
||||
pgrst_config json := nullif(current_setting('request.root.configs', true), '')::json;
|
||||
openapi json = $$
|
||||
{
|
||||
"swagger": "2.0",
|
||||
"info":{
|
||||
"title":"PostgREST API",
|
||||
"description":"This is a dynamic API generated by PostgREST"
|
||||
}
|
||||
}
|
||||
$$;
|
||||
begin
|
||||
return (
|
||||
select json_build_object(
|
||||
'swagger', '2.0',
|
||||
'info', json_build_object(
|
||||
'title', 'PostgREST API',
|
||||
'description', 'This is a dynamic API generated by PostgREST'
|
||||
),
|
||||
'pgrst_server_host', pgrst_config->>'server_host',
|
||||
'pgrst_server_port', pgrst_config->>'server_port',
|
||||
'pgrst_openapi_server_proxy_uri', pgrst_config->>'openapi_server_proxy_uri',
|
||||
'pgrst_db_schemas', pgrst_config->'db_schemas',
|
||||
'pgrst_version', pgrst_config->>'version'
|
||||
)::json);
|
||||
end;
|
||||
return openapi;
|
||||
end
|
||||
$_$ language plpgsql;
|
||||
|
||||
create or replace function welcome() returns "text/plain" as $$
|
||||
|
||||
Reference in New Issue
Block a user