File tree 2 files changed +12
-2
lines changed
openapi_core/validation/request
2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change
1
+ import warnings
1
2
from dataclasses import dataclass
2
3
from typing import Iterable
3
4
9
10
@dataclass
10
11
class ParametersError (Exception ):
11
12
parameters : Parameters
12
- context : Iterable [Exception ]
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
13
23
14
24
15
25
class OpenAPIRequestBodyError (OpenAPIError ):
Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ def _get_parameters(
119
119
location [param_name ] = value
120
120
121
121
if errors :
122
- raise ParametersError (context = errors , parameters = parameters )
122
+ raise ParametersError (errors = errors , parameters = parameters )
123
123
124
124
return parameters
125
125
You can’t perform that action at this time.
0 commit comments