openapi-core icon indicating copy to clipboard operation
openapi-core copied to clipboard

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

Open tuukkamustonen opened this issue 1 year ago • 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

tuukkamustonen avatar Aug 20 '24 08:08 tuukkamustonen