diff --git a/openapi_core/validation/request/exceptions.py b/openapi_core/validation/request/exceptions.py index 7485ae53..2702656a 100644 --- a/openapi_core/validation/request/exceptions.py +++ b/openapi_core/validation/request/exceptions.py @@ -1,3 +1,4 @@ +import warnings from dataclasses import dataclass from typing import Iterable @@ -9,7 +10,16 @@ @dataclass class ParametersError(Exception): parameters: Parameters - context: Iterable[Exception] + errors: Iterable[Exception] + + @property + def context(self) -> Iterable[Exception]: + warnings.warn( + "context property of ParametersError is deprecated. " + "Use erros instead.", + DeprecationWarning, + ) + return self.errors class OpenAPIRequestBodyError(OpenAPIError): diff --git a/openapi_core/validation/request/validators.py b/openapi_core/validation/request/validators.py index ec703d5a..1f431fa6 100644 --- a/openapi_core/validation/request/validators.py +++ b/openapi_core/validation/request/validators.py @@ -119,7 +119,7 @@ def _get_parameters( location[param_name] = value if errors: - raise ParametersError(context=errors, parameters=parameters) + raise ParametersError(errors=errors, parameters=parameters) return parameters pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy