-
Notifications
You must be signed in to change notification settings - Fork 9
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
44 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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` |