Skip to content
Open
Changes from 1 commit
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
Prev Previous commit
Next Next commit
Merge dev into documentation update
  • Loading branch information
MaxonT committed Dec 3, 2026
commit b290c906d0f8fda51f54ae69e9ec9bece08a1fb8
60 changes: 53 additions & 7 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -261,13 +261,53 @@ Each release links to full notes on the
importer already refused the same misplacement
([#607](https://github.com/awslabs/stickler/issues/607)).

### Documentation

- Dynamic Model Creation no longer reads as if 0.85 were the `str` default:
`vendor: str` gets it from its name, and a `str` field that no name rule
matches gets 0.7. The page also says when `explain()` reports `explicit`
for a field you did not configure
([#489](https://github.com/awslabs/stickler/issues/489)).
- **The `semantic` extra no longer installs scipy.** `SemanticComparator`
computes its cosine similarity in numpy, a core dependency, so the extra is
boto3 alone and drops about 97 MB from container and Lambda images. Scores
are unchanged: the numpy code repeats `scipy.spatial.distance.cosine`'s
arithmetic, including NaN for a zero vector and clipping to [0, 2]. An
install without scipy now gets real semantic scores instead of falling back
to exact string equality. Add scipy yourself if you import it directly
([#605](https://github.com/awslabs/stickler/issues/605)).

- **`to_json_schema()` and `to_stickler_config()` raise `ValueError` for a
union with a model arm or a model in a nested list, which 1.0.x only warned
about.** This is a breaking change: 1.0.x exported both typed as a string
with a `UserWarning`, and the re-imported model could not load or score the
field as the original did. It covers a field such as `Union[Card, Bank]` or
`Union[Plain, str]`, the same union as a list element, such as
`List[Union[Card, Bank]]`, and a `StructuredModel` inside a nested list, such
as `List[List[Card]]`. The error names the model and the field. That
includes the `Union[Card, Bank]` that `from_json_schema()` builds from a
multi-arm `anyOf`. Declare a union as a single model type, wrap the inner
list in its own `StructuredModel` (a list of rows, each holding a list of
models), or leave the field out of the exported model.
`JsonSchemaFieldConverter.field_to_property()` and
`field_to_stickler_config()` raise for the same types
([#349](https://github.com/awslabs/stickler/issues/349)).

- **`from_json_schema()` raises `ValueError` for the model keys that 1.0.2
only warned about.** This is a breaking change: a schema that loaded on
1.0.x with that warning now raises. `x-aws-stickler-model-name`,
`x-aws-stickler-match-threshold` and `x-aws-stickler-infer-unspecified` are
not read at two positions on an object-typed property, and 1.0.x dropped
them there:
- beside a `$ref` on a property typed `"object"` or a list form that
includes it (`["object", "null"]`), such as `{"type": "object", "$ref":
"#/$defs/Row", "x-aws-stickler-match-threshold": 0.93}`, which built `Row`
at `0.7`. Put the keys on the target;
- on a property reached only through the root `$ref` or an `allOf` arm, such
as a root `{"$ref": "#/$defs/Wrap/properties/inner"}`, which built
`DynamicModel` or `AllOfModel` at `0.7`. Put them on the root, beside its
`$ref`, or reference the object without `allOf`.

The error names the key, its position and where it is read, as at the
positions that already raised. It is raised before the import builds, so a
schema that also fails for another reason, such as a root `$ref` to a
property typed `["object", "null"]`, now gives this error. The nodes that
1.0.2 left unchecked, such as a `$ref` target under an `x-*` key, still
import with the keys dropped
([#609](https://github.com/awslabs/stickler/issues/609)).

### Removed

Expand Down Expand Up @@ -419,6 +459,12 @@ Each release links to full notes on the

### Documentation

- Dynamic Model Creation no longer reads as if 0.85 were the `str` default:
`vendor: str` gets it from its name, and a `str` field that no name rule
matches gets 0.7. The page also says when `explain()` reports `explicit`
for a field you did not configure
([#489](https://github.com/awslabs/stickler/issues/489)).

- The bounding box mAP page says boxes have no page: the same coordinates on
another page score IoU `1.0`, and `_page` is ignored. For a multi-page
document, compare each page as its own document
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.