Skip to content

Commit 3cc812f

Browse files
authored
Merge pull request #461 from p1c2u/revert/parameters-error-context-property-deprecated-revert
Revert of "ParametersError context property deprecated"
2 parents 4945be0 + 0e21db0 commit 3cc812f

File tree

2 files changed

+2
-12
lines changed

2 files changed

+2
-12
lines changed

openapi_core/validation/request/exceptions.py

+1-11
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
1-
import warnings
21
from dataclasses import dataclass
32
from typing import Iterable
43

@@ -10,16 +9,7 @@
109
@dataclass
1110
class ParametersError(Exception):
1211
parameters: Parameters
13-
errors: Iterable[Exception]
14-
15-
@property
16-
def context(self) -> Iterable[Exception]:
17-
warnings.warn(
18-
"context property of ParametersError is deprecated. "
19-
"Use erros instead.",
20-
DeprecationWarning,
21-
)
22-
return self.errors
12+
context: Iterable[Exception]
2313

2414

2515
class OpenAPIRequestBodyError(OpenAPIError):

openapi_core/validation/request/validators.py

+1-1
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def _get_parameters(
119119
location[param_name] = value
120120

121121
if errors:
122-
raise ParametersError(errors=errors, parameters=parameters)
122+
raise ParametersError(context=errors, parameters=parameters)
123123

124124
return parameters
125125

0 commit comments

Comments
 (0)