From e813375c7da5b72cbbd6d16bb69c89909e2ccac6 Mon Sep 17 00:00:00 2001 From: steve-chavez Date: Wed, 10 May 2023 20:47:09 -0300 Subject: [PATCH] openapi title override --- docs/references/api/openapi.rst | 17 +++++++++++++---- docs/releases/v11.0.0.rst | 1 + 2 files changed, 14 insertions(+), 4 deletions(-) diff --git a/docs/references/api/openapi.rst b/docs/references/api/openapi.rst index f2ba5d476..d8d3ce34b 100644 --- a/docs/references/api/openapi.rst +++ b/docs/references/api/openapi.rst @@ -35,20 +35,29 @@ Also if you wish to generate a ``summary`` field you can do it by having a multi spans multiple lines$$; +Similarly, you can override the API title by commenting the schema. + +.. code-block:: plpgsql + + COMMENT ON SCHEMA api IS + $$FooBar API + + A RESTful API that serves FooBar data.$$; + If you need to include the ``security`` and ``securityDefinitions`` options, set the :ref:`openapi-security-active` configuration to ``true``. You can use a tool like `Swagger UI `_ to create beautiful documentation from the description and to host an interactive web-based dashboard. The dashboard allows developers to make requests against a live PostgREST server, and provides guidance with request headers and example request bodies. .. important:: - The OpenAPI information can go out of date as the schema changes under a running server. To learn how to refresh the cache see :ref:`schema_reloading`. + The OpenAPI information can go out of date as the schema changes under a running server. See :ref:`schema_reloading`. .. _override_openapi: -Overriding OpenAPI response ---------------------------- +Overriding Full OpenAPI Response +-------------------------------- -You can override the default response with a function result. To do this, set the function on :ref:`db-root-spec`. +You can override the whole default response with a function result. To do this, set the function on :ref:`db-root-spec`. .. code:: bash diff --git a/docs/releases/v11.0.0.rst b/docs/releases/v11.0.0.rst index 7e67adb7e..8ef67c98d 100644 --- a/docs/releases/v11.0.0.rst +++ b/docs/releases/v11.0.0.rst @@ -12,6 +12,7 @@ Horizontal Filtering OpenAPI ~~~~~~~ +- Allow :ref:`overriding the OpenAPI title `. - Allow :ref:`override_openapi`. Admin