Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ This extension exposes the following four SQL functions:
- jsonb_matches_schema (note the **jsonb** in front)
- jsonschema_is_valid
- jsonschema_validation_errors
- jsonb_validation_errors_detailed

With the following signatures

Expand Down Expand Up @@ -53,6 +54,13 @@ and
jsonschema_validation_errors(schema json, instance json) returns text[]
```

and

```sql
-- Returns an array of errors if a *schema* is invalid
jsonb_validation_errors_detailed(schema jsonschema, instance jsonb) returns jsonb
```

### Compiled schema type

For repeated validation against the same schema, cast it to `jsonschema` once. The validator is compiled and cached per callsite, avoiding recompilation on every row.
Expand Down
Loading