Skip to content
Merged
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
1 change: 0 additions & 1 deletion schema/unstable/extractor_config.schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,6 @@
"$schema": "https://json-schema.org/draft/2020-12/schema",
"type": "object",
"description": "Base extractor configuration object",
"unevaluatedProperties": false,
Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

critical

Removing "unevaluatedProperties": false allows for extending the configuration, but it critically weakens static validation. This change means that typos in standard property names (e.g., state-stor instead of state-store) will no longer be detected by JSON schema validators in IDEs or CI pipelines.

While Pydantic's runtime validation will eventually catch such errors, the lack of static validation increases the risk of deploying misconfigured extractors. For example, a misspelled state-store configuration would cause the extractor to fall back to a default LocalStateStore, potentially leading to data reprocessing or loss of state, which is a critical correctness issue.

To maintain robust validation, I recommend keeping "unevaluatedProperties": false and documenting how users can extend the schema using allOf. This approach ensures that base properties are always validated correctly while still providing a clear path for extensibility.

Example for an extending schema:

{
  "$schema": "https://json-schema.org/draft/2020-12/schema",
  "allOf": [
    { "$ref": "https://.../extractor_config.schema.json" }
  ],
  "properties": {
    "my-custom-property": { "type": "string" }
  }
}

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Isn't this what we are currently doing? Why is this change necessary really?

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

unevaluatedProperties: false prevents extending the schema via allOf with additional properties.

"properties": {
"state-store": {
"$ref": "state_store_config.schema.json"
Expand Down
Loading