Skip to content

Implement jsonb_validation_errors_detailed to return detailed errors - #101

Open
milan-miscevic-92 wants to merge 1 commit into
supabase:masterfrom
milan-miscevic-92:master
Open

Implement jsonb_validation_errors_detailed to return detailed errors#101
milan-miscevic-92 wants to merge 1 commit into
supabase:masterfrom
milan-miscevic-92:master

Conversation

@milan-miscevic-92

Copy link
Copy Markdown

What kind of change does this PR introduce?

Feature.

What is the current behavior?

No issues found so far.

What is the new behavior?

A new function jsonb_validation_errors_detailed has been implemented that includes multiple new fields in the response, such as fieldPath, failedConstraint, patternError, and message.

The fieldPath that is included in the error response is in dotted format.

Additional context

Example of validation response with validation errors:
image

@Stranger6667

Copy link
Copy Markdown
Contributor

Why adding some new field naming when JSON Schema drafts already define one? I am strongly against adding non-spec naming schemes here - overall, the approach looks somewhat arbitrary - pattern_error_message, dotted paths, etc. Is it done for some specific framework?

This kind of stuff should be done downstream as it is needed for some specific use case which doesn't justify public API bloating which will affect all users.

@imor

imor commented Jun 10, 2026

Copy link
Copy Markdown
Contributor

@milan-miscevic-92 why move to a fork of the jsonschema crate? Also unless you a very good answers to @Stranger6667's questions this PR will likely not be accepted. If you could share what you are trying to achieve we can probably guide you in the correct direction.

@milan-miscevic-92
milan-miscevic-92 force-pushed the master branch 2 times, most recently from 93ef34a to 3a4e7be Compare June 11, 2026 07:37
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants