From 006a0dec64e4627291b4d519d61316abd0827204 Mon Sep 17 00:00:00 2001 From: inspurericzhang Date: Mon, 12 Sep 2022 04:37:57 +0000 Subject: [PATCH] recover status.yaml & touch empty v1/parameters.yaml & add custom config api doc Change-Id: Iafd99b33899dc3540e78465021f711eae0abe08b --- .../source/{parameters.yaml => status.yaml} | 0 api-ref/source/v1/api-versions.inc | 4 +-- api-ref/source/v1/custom_config.inc | 31 +++++++++++++++++++ api-ref/source/v1/index.rst | 4 +++ api-ref/source/v1/parameters.yaml | 1 + .../custom-config-show-response.json | 3 -- .../custom-config-show-response.json | 3 ++ 7 files changed, 41 insertions(+), 5 deletions(-) rename api-ref/source/{parameters.yaml => status.yaml} (100%) create mode 100644 api-ref/source/v1/custom_config.inc create mode 100644 api-ref/source/v1/parameters.yaml delete mode 100644 api-ref/source/v1/samples/basic_date/custom-config-show-response.json create mode 100644 api-ref/source/v1/samples/custom-config/custom-config-show-response.json diff --git a/api-ref/source/parameters.yaml b/api-ref/source/status.yaml similarity index 100% rename from api-ref/source/parameters.yaml rename to api-ref/source/status.yaml diff --git a/api-ref/source/v1/api-versions.inc b/api-ref/source/v1/api-versions.inc index a4a9545..97dbfe9 100644 --- a/api-ref/source/v1/api-versions.inc +++ b/api-ref/source/v1/api-versions.inc @@ -13,11 +13,11 @@ Lists information for all Venus API versions. Response codes -------------- -.. rest_status_code:: success ../parameters.yaml +.. rest_status_code:: success ../status.yaml - 0 -.. rest_status_code:: error ../parameters.yaml +.. rest_status_code:: error ../status.yaml - -1 diff --git a/api-ref/source/v1/custom_config.inc b/api-ref/source/v1/custom_config.inc new file mode 100644 index 0000000..dafb82c --- /dev/null +++ b/api-ref/source/v1/custom_config.inc @@ -0,0 +1,31 @@ +.. -*- rst -*- + +Custom Config +============= + +Get Custom Config +~~~~~~~~~~~~~~~~~~~~~ + +.. rest_method:: GET /custom_config + +Get the value of all custom config. + +Response codes +-------------- + +.. rest_status_code:: success ../status.yaml + + - 0 + +.. rest_status_code:: error ../status.yaml + + - -1 + +Response +-------- + +**Example: JSON request** + + +.. literalinclude:: ./samples/custom-config/custom-config-show-response.json + :language: javascript diff --git a/api-ref/source/v1/index.rst b/api-ref/source/v1/index.rst index b0e18d3..774245e 100644 --- a/api-ref/source/v1/index.rst +++ b/api-ref/source/v1/index.rst @@ -9,3 +9,7 @@ OpenStack Log API V1 (CURRENT) .. versions document. .. include:: api-versions.inc +.. custom config document. +.. include:: custom_config.inc + + diff --git a/api-ref/source/v1/parameters.yaml b/api-ref/source/v1/parameters.yaml new file mode 100644 index 0000000..b7a5b43 --- /dev/null +++ b/api-ref/source/v1/parameters.yaml @@ -0,0 +1 @@ +ADD INPUT PARAMETERS HERE diff --git a/api-ref/source/v1/samples/basic_date/custom-config-show-response.json b/api-ref/source/v1/samples/basic_date/custom-config-show-response.json deleted file mode 100644 index bfd1536..0000000 --- a/api-ref/source/v1/samples/basic_date/custom-config-show-response.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "value": "30" -} diff --git a/api-ref/source/v1/samples/custom-config/custom-config-show-response.json b/api-ref/source/v1/samples/custom-config/custom-config-show-response.json new file mode 100644 index 0000000..60c557a --- /dev/null +++ b/api-ref/source/v1/samples/custom-config/custom-config-show-response.json @@ -0,0 +1,3 @@ +{ + "log_save_days": "30" +}