File tree Expand file tree Collapse file tree 2 files changed +12
-2
lines changed
openapi_core/validation/request Expand file tree Collapse file tree 2 files changed +12
-2
lines changed Original file line number Diff line number Diff line change 1+ import warnings
12from dataclasses import dataclass
23from typing import Iterable
34
910@dataclass
1011class ParametersError (Exception ):
1112 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
1323
1424
1525class OpenAPIRequestBodyError (OpenAPIError ):
Original file line number Diff line number Diff line change @@ -119,7 +119,7 @@ def _get_parameters(
119119 location [param_name ] = value
120120
121121 if errors :
122- raise ParametersError (context = errors , parameters = parameters )
122+ raise ParametersError (errors = errors , parameters = parameters )
123123
124124 return parameters
125125
You can’t perform that action at this time.
0 commit comments