changeset 8566:e4191aa7b402 default tip

doc: issue2551415 correct doc for change input->input_payload in 2.5 the rest interface changed a variable name from input to input_payload. An earlier commit changed the rest docs. This commit adds an item for it to the upgrading 2.4.0->2.5.0 section. Also cross reference added to the rest docs with the updated examples.
author John Rouillard <rouilj@ieee.org>
date Thu, 09 Apr 2026 00:19:06 -0400
parents 792eb77554fb
children
files doc/rest.txt doc/upgrading.txt
diffstat 2 files changed, 23 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/doc/rest.txt	Thu Apr 09 00:16:52 2026 -0400
+++ b/doc/rest.txt	Thu Apr 09 00:19:06 2026 -0400
@@ -1884,6 +1884,8 @@
 new rest end points. At some point it will also describe the rest.py
 structure and implementation.
 
+.. _adding_new_rest_endpoints:
+
 Adding new rest endpoints
 -------------------------
 
--- a/doc/upgrading.txt	Thu Apr 09 00:16:52 2026 -0400
+++ b/doc/upgrading.txt	Thu Apr 09 00:19:06 2026 -0400
@@ -584,6 +584,27 @@
    in the url. Also its not positional @sort=1 can appear anywhere in
    the url.
 
+Modify Custom Rest Endpoints (required)
+---------------------------------------
+
+As part of code maintenance and cleanup, the ``input`` variable used
+when defining new REST endpoints was renamed to ``input_payload``. The
+``input`` variable was shadowing the ``input`` built-in function and
+was renamed.
+
+So if you defined a custom REST endpoint in interfaces.py and it looks
+like::
+
+  def summary2(self, input):
+
+you should change it to read::
+
+  def summary2(self, input_payload):
+
+and change any references to input inside the function to
+``input_payload``. The section :ref:`adding_new_rest_endpoints` has
+been updated if you need additional examples.
+
 Deprecation Notices (required)
 ------------------------------
 

Roundup Issue Tracker: http://roundup-tracker.org/