From a8248a53da284468cf009a16eeadde888d82f87b Mon Sep 17 00:00:00 2001 From: Gerhard Weis Date: Thu, 20 Jun 2019 05:09:33 +1000 Subject: [PATCH] parameters are unique as long as name `and` location are unique. --- tests/integration/test_validators.py | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/tests/integration/test_validators.py b/tests/integration/test_validators.py index 82a7cae..97733d9 100644 --- a/tests/integration/test_validators.py +++ b/tests/integration/test_validators.py @@ -328,27 +328,6 @@ class TestPathItemParamsValidator(object): assert result.body is None assert result.parameters == {} - @pytest.mark.xfail - def test_request_override_invalid_param(self, spec_dict): - # override parameter path parameter on operation - # This here should result in an invalid spec object, because there are - # now two parameters with the same name, but different location. - # (The openapi3 spec is also not very explicit about this case) - spec_dict["paths"]["/resource"]["get"]["parameters"] = [ - { - # full valid parameter object required - "name": "resId", - "in": "path", - "required": False, - "schema": { - "type": "integer", - }, - } - ] - from openapi_spec_validator.exceptions import OpenAPIValidationError - with pytest.raises(OpenAPIValidationError): - create_spec(spec_dict) - class TestResponseValidator(object):