Hi,
I've run into the problem, when I'm not able to show which invalid parameter raised an InvalidSchemaValue.
As InvalidSchemaValue contains a list of schema_errors (List[JsonSchemaValidationError]) I expect to have relative_path / absoulte_path filled for its items. But in reality all items have empty path / relative_path attributes (and absolute_path property).
I've managed to fix this by manually add parameter name as JSON Schem error path as,
try:
return unmarshaller(value)
except InvalidSchemaValue as err:
# Modify invalid schema validation errors to include parameter name
if isinstance(param_or_media_type, Parameter):
param_name = param_or_media_type.name
for schema_error in err.schema_errors:
schema_error.path = schema_error.relative_path = deque(
[param_name]
)
raise err
instead of plain,
return unmarshaller(value)
But would like to have path filled by openapi_core instead.
More details in playpauseandstop/rororo#53
Hi,
I've run into the problem, when I'm not able to show which invalid parameter raised an
InvalidSchemaValue.As
InvalidSchemaValuecontains a list ofschema_errors(List[JsonSchemaValidationError]) I expect to haverelative_path/absoulte_pathfilled for its items. But in reality all items have emptypath/relative_pathattributes (andabsolute_pathproperty).I've managed to fix this by manually add parameter name as JSON Schem error path as,
instead of plain,
But would like to have path filled by
openapi_coreinstead.More details in playpauseandstop/rororo#53