@@ -814,7 +814,7 @@ def test_sort_parameters(self, string_property_factory):
814
814
815
815
assert result_names == expected_names
816
816
817
- def test_sort_parameters_invalid_path_templating (self , string_property_factory ):
817
+ def test_sort_parameters_missing_param (self , string_property_factory ):
818
818
from openapi_python_client .parser .openapi import Endpoint
819
819
820
820
endpoint = self .make_endpoint ()
@@ -828,6 +828,20 @@ def test_sort_parameters_invalid_path_templating(self, string_property_factory):
828
828
assert "Incorrect path templating" in result .detail
829
829
assert endpoint .path in result .detail
830
830
831
+ def test_sort_parameters_extra_param (self , string_property_factory ):
832
+ from openapi_python_client .parser .openapi import Endpoint
833
+
834
+ endpoint = self .make_endpoint ()
835
+ endpoint .path = "/multiple-path-parameters"
836
+ param = string_property_factory (name = "param1" )
837
+ endpoint .path_parameters [param .name ] = param
838
+
839
+ result = Endpoint .sort_parameters (endpoint = endpoint )
840
+
841
+ assert isinstance (result , ParseError )
842
+ assert "Incorrect path templating" in result .detail
843
+ assert endpoint .path in result .detail
844
+
831
845
def test_from_data_bad_params (self , mocker ):
832
846
from openapi_python_client .parser .openapi import Endpoint
833
847
0 commit comments