From 054bd9b41b25c3bb493d3af24e0810b56ae3bee3 Mon Sep 17 00:00:00 2001 From: Dariusz Suchojad Date: Tue, 24 Oct 2023 17:27:16 +0200 Subject: [PATCH] GH #755 - Added RESTAdapter.get_path_params. --- code/zato-server/src/zato/server/service/__init__.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/code/zato-server/src/zato/server/service/__init__.py b/code/zato-server/src/zato/server/service/__init__.py index cb747ac022..c989c84669 100644 --- a/code/zato-server/src/zato/server/service/__init__.py +++ b/code/zato-server/src/zato/server/service/__init__.py @@ -1533,7 +1533,7 @@ class RESTAdapter(Service): map_response = None get_conn_name = None get_auth = None - get_path = None + get_path_params = None get_method = None get_request = None get_headers = None @@ -1619,6 +1619,11 @@ def handle(self): _params:'strdict' = self.get_query_string(params) params.update(_params) + # Obtain any possible path parameters + if self.get_path_params: + _params:'strdict' = self.get_path_params(params) + params.update(_params) + # The REST method may be dynamically generated if self.get_method: method:'str' = self.get_method()