Skip to content

Commit a8248a5

Browse files
author
Gerhard Weis
committed
parameters are unique as long as name and location are unique.
1 parent a1dfaf6 commit a8248a5

File tree

1 file changed

+0
-21
lines changed

1 file changed

+0
-21
lines changed

tests/integration/test_validators.py

Lines changed: 0 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -328,27 +328,6 @@ def test_request_override_param(self, spec_dict):
328328
assert result.body is None
329329
assert result.parameters == {}
330330

331-
@pytest.mark.xfail
332-
def test_request_override_invalid_param(self, spec_dict):
333-
# override parameter path parameter on operation
334-
# This here should result in an invalid spec object, because there are
335-
# now two parameters with the same name, but different location.
336-
# (The openapi3 spec is also not very explicit about this case)
337-
spec_dict["paths"]["/resource"]["get"]["parameters"] = [
338-
{
339-
# full valid parameter object required
340-
"name": "resId",
341-
"in": "path",
342-
"required": False,
343-
"schema": {
344-
"type": "integer",
345-
},
346-
}
347-
]
348-
from openapi_spec_validator.exceptions import OpenAPIValidationError
349-
with pytest.raises(OpenAPIValidationError):
350-
create_spec(spec_dict)
351-
352331

353332
class TestResponseValidator(object):
354333

0 commit comments

Comments
 (0)