From 4c0f01542f277fcac270dc5d647d8fb3be27835c Mon Sep 17 00:00:00 2001 From: Quoc-Anh Nguyen <9426721+imcvampire@users.noreply.github.com> Date: Mon, 29 Sep 2025 10:38:12 +0300 Subject: [PATCH 1/3] feat(mappings): urlPathPattern is added --- wiremock/resources/mappings/models.py | 1 + 1 file changed, 1 insertion(+) diff --git a/wiremock/resources/mappings/models.py b/wiremock/resources/mappings/models.py index 35a8a59..1de62fa 100644 --- a/wiremock/resources/mappings/models.py +++ b/wiremock/resources/mappings/models.py @@ -127,6 +127,7 @@ class MappingRequest(BaseAbstractEntity): method = JsonProperty("method") url = JsonProperty("url") url_path = JsonProperty("urlPath") + url_path_template= JsonProperty("urlPathTemplate") url_path_pattern = JsonProperty("urlPathPattern") url_pattern = JsonProperty("urlPattern") basic_auth_credentials = JsonProperty( From 269c50aa089acc5704a2c96ee1b9a540fc37b6aa Mon Sep 17 00:00:00 2001 From: Quoc-Anh Nguyen <9426721+imcvampire@users.noreply.github.com> Date: Mon, 29 Sep 2025 10:44:20 +0300 Subject: [PATCH 2/3] test: updated --- .../test_resources/test_mapping/test_mapping_serialization.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/tests/test_resources/test_mapping/test_mapping_serialization.py b/tests/test_resources/test_mapping/test_mapping_serialization.py index d3809ad..3f349d6 100644 --- a/tests/test_resources/test_mapping/test_mapping_serialization.py +++ b/tests/test_resources/test_mapping/test_mapping_serialization.py @@ -102,6 +102,7 @@ def test_mapping_request_serialization(): url_path="test2", url_path_pattern="test3", url_pattern="test4", + url_path_template="test5", basic_auth_credentials=BasicAuthCredentials( username="username", password="password" ), @@ -117,6 +118,7 @@ def test_mapping_request_serialization(): assert serialized["urlPath"] == "test2" assert serialized["urlPathPattern"] == "test3" assert serialized["urlPattern"] == "test4" + assert serialized["urlPathTemplate"] == "test5" assert serialized["basicAuthCredentials"] == { "username": "username", "password": "password", @@ -139,6 +141,7 @@ def test_mapping_request_deserialization(): "urlPath": "test2", "urlPathPattern": "test3", "urlPattern": "test4", + "urlPathTemplate": "test5", "basicAuthCredentials": { "username": "username", "password": "password", @@ -156,6 +159,7 @@ def test_mapping_request_deserialization(): assert "test2" == e.url_path assert "test3" == e.url_path_pattern assert "test4" == e.url_pattern + assert "test5" == e.url_path_template assert isinstance(e.basic_auth_credentials, BasicAuthCredentials) assert "username" == e.basic_auth_credentials.username assert "password" == e.basic_auth_credentials.password From 6c837800a78731302091eb1bcf3a987e0d68fa6f Mon Sep 17 00:00:00 2001 From: Quoc-Anh Nguyen <9426721+imcvampire@users.noreply.github.com> Date: Mon, 29 Sep 2025 10:45:28 +0300 Subject: [PATCH 3/3] refact: order --- wiremock/resources/mappings/models.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/wiremock/resources/mappings/models.py b/wiremock/resources/mappings/models.py index 1de62fa..154a85d 100644 --- a/wiremock/resources/mappings/models.py +++ b/wiremock/resources/mappings/models.py @@ -127,9 +127,9 @@ class MappingRequest(BaseAbstractEntity): method = JsonProperty("method") url = JsonProperty("url") url_path = JsonProperty("urlPath") - url_path_template= JsonProperty("urlPathTemplate") url_path_pattern = JsonProperty("urlPathPattern") url_pattern = JsonProperty("urlPattern") + url_path_template= JsonProperty("urlPathTemplate") basic_auth_credentials = JsonProperty( "basicAuthCredentials", klass=BasicAuthCredentials )