Skip to content

Commit

Permalink
Bump version to v0.4.6&update docs
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan-wanna-M committed Oct 12, 2024
1 parent a6db38c commit 0ed7a67
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 1 deletion.
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ requires = ["setuptools>=61.0"]
build-backend = "setuptools.build_meta"
[project]
name = "formatron"
version = "0.4.5"
version = "0.4.6"
authors = [
{name = "Xintong Sun", email = "[email protected]"},
]
Expand Down
3 changes: 3 additions & 0 deletions src/formatron/formats/json.py
Original file line number Diff line number Diff line change
Expand Up @@ -440,6 +440,9 @@ def __init__(self, nonterminal: str, capture_name: typing.Optional[str], schema:
- typing.Any
- Subclasses of collections.abc.Mapping[str,T] and typing.Mapping[str,T] where T is a supported type,
- Subclasses of collections.abc.Sequence[T] and typing.Sequence[T] where T is a supported type.
- optionally with `minItems`, `maxItems`, `prefixItems` constraints
- *Warning*: too large difference between minItems and maxItems can lead to very slow performance!
- *Warning*: By json schema definition, prefixItems by default allows additional items and missing items in the prefixItems, which may not be the desired behavior and can lead to very slow performance if prefixItems is long!
- tuple[T1,T2,...] where T1,T2,... are supported types. The order, type and number of elements will be preserved.
- typing.Literal[x1,x2,...] where x1, x2, ... are instances of int, string, bool or NoneType, or another typing.Literal[y1,y2,...]
- typing.Union[T1,T2,...] where T1,T2,... are supported types.
Expand Down
1 change: 1 addition & 0 deletions src/formatron/schemas/json_schema.py
Original file line number Diff line number Diff line change
Expand Up @@ -54,6 +54,7 @@ def create_schema(schema: dict[str, typing.Any], registry=Registry()) -> schemas
- `minLength, maxLength, pattern` keywords for string type
- `minimum, maximum, exclusiveMinimum, exclusiveMaximum` keywords for number type and integer type
- `items` keyword
- optionally with `minItems`, `maxItems`, `prefixItems` constraints
- `properties` keyword
- Due to implementation limitations, we always assume `additionalProperties` is false.
- `enum` and `const` keyword
Expand Down

0 comments on commit 0ed7a67

Please sign in to comment.