python-openapi/openapi-core

[Feature]: Provide error details (validation text, path)

tuukkamustonen opened this issue · 0 comments

Suggested Behavior

The ValidationError (why is it a dataclass btw?) and it's child classes don't provide any details of:

  • What actually failed (ie. what was the error message, like Failed validating 'oneOf' in schema or Failed validating 'minLength=3)
  • The path which failed (e.g. foo.bar.array[1].some.nested.field)

These details used to be available in previous versions, but now the error text is very plain, just Request body validation error and such.

Why is this needed?

To log the details, for easier debugging/understanding.

Or, maybe even return them to the caller, so they can understand why the API is not accepting their request.

References

No response

Would you like to implement a feature?

None