Skip to content

Commit

Permalink
add doc about JSON schema
Browse files Browse the repository at this point in the history
  • Loading branch information
mmoskal committed Nov 29, 2024
1 parent 8634606 commit cfdb472
Showing 1 changed file with 44 additions and 0 deletions.
44 changes: 44 additions & 0 deletions parser/src/json/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
# JSON schema -> llguidance converter

This sub-module converts JSON schema to llguidance grammar.

## Supported JSON schema features

Following JSON schema features are supported.

Core features:

- `anyOf`
- `oneOf` - not supported right now, use `anyOf` instead
- `allOf` - intersection of certain schemas is not supported right now
- `$ref` - within the document only
- `const`
- `enum`
- `type` - both single type and array of types

Array features:

- `items`
- `prefixItems`
- `minItems`
- `maxItems`

Object features:

- `properties` - order of properties is fixed to the order in schema
- `additionalProperties`
- `required`

String features:

- `minLength`
- `maxLength`
- `pattern`
- `format`, with the following formats: `date-time`, `time`, `date`, `duration`, `email`, `hostname`, `ipv4`, `ipv6`, `uuid`,

Number features (for both integer and number):

- `minimum`
- `maximum`
- `exclusiveMinimum`
- `exclusiveMaximum`

0 comments on commit cfdb472

Please sign in to comment.