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:
returnunmarshaller(value)
exceptInvalidSchemaValueaserr:
# Modify invalid schema validation errors to include parameter nameifisinstance(param_or_media_type, Parameter):
param_name=param_or_media_type.nameforschema_errorinerr.schema_errors:
schema_error.path=schema_error.relative_path=deque(
[param_name]
)
raiseerr
instead of plain,
returnunmarshaller(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