From 1f71845ede7e19ccac4a07fed37239104ea42cc9 Mon Sep 17 00:00:00 2001 From: ghanshyam Date: Mon, 24 Apr 2017 06:29:35 +0000 Subject: [PATCH] Clear description for max_version field Currently max_version field shows text as "Deprecated in version %s" which seems confusing to show deprecated fields vs removed fields. For example: if any element is removed in x version, then we tag that element in parameter.yaml with max_version: x-1. api-ref shows that element as "Deprecated in version x-1" which seems confusing on below interpretation: - is that element deprecated in x-1 version? - is that element only deprecated in x-1 version not removed? But actually that element is removed in x and only available till x-1 version. - https://developer.openstack.org/api-ref/compute/?expanded=evacuate-server-evacuate-action-detail This commit try to describe max_version filed in more clear way. Change-Id: I388c6e27c3d15e3bee645b7b56f8142e2f16d3d6 --- doc/source/usage.rst | 2 +- os_api_ref/__init__.py | 2 +- os_api_ref/tests/test_microversions.py | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/doc/source/usage.rst b/doc/source/usage.rst index 1e42a6d..6014671 100644 --- a/doc/source/usage.rst +++ b/doc/source/usage.rst @@ -178,7 +178,7 @@ min_version max_version the last version that includes this parameter. Will render - a *Deprecated in $version* stanza in the html output. + a *Available until $version* stanza in the html output. rest_status_code diff --git a/os_api_ref/__init__.py b/os_api_ref/__init__.py index ea83d34..45f3a45 100644 --- a/os_api_ref/__init__.py +++ b/os_api_ref/__init__.py @@ -441,7 +441,7 @@ class RestParametersDirective(Table): str(min_version).replace('.', '_')) classes.append(min_ver_css_name) if max_version: - desc += ("\n\n**Deprecated in version %s**\n" % + desc += ("\n\n**Available until version %s**\n" % max_version) max_ver_css_name = ("rp_max_ver_" + str(max_version).replace('.', '_')) diff --git a/os_api_ref/tests/test_microversions.py b/os_api_ref/tests/test_microversions.py index 1f8e92b..a18fb24 100644 --- a/os_api_ref/tests/test_microversions.py +++ b/os_api_ref/tests/test_microversions.py @@ -87,7 +87,7 @@ class TestMicroversions(base.TestCase): body string

The name of things

-

Deprecated in version 2.20

+

Available until version 2.20