Skip to content

Fix Element Tracking element_content entity properties #1430

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: release/4.6.2
Choose a base branch
from

Conversation

jethron
Copy link
Contributor

@jethron jethron commented May 16, 2025

In preparation for publishing the Element Tracking schemas to Iglu Central, changes were made to the element_content schema to be more consistent with the other related schemas.

The type definition in the plugin implementation was updated to match, but the function that builds the context with that entity also includes the entities from the user's custom entity generators, so accepts arbitrary SelfDescribingJson to build a context of type (ElementContentEntity | SelfDescribingJson)[]. Since the implementation for that entity was not updated, it no longer satisfied ElementContentEntity but did still satisfy SelfDescribingJson, so passed the type check and compiled successfully, despite no longer matching the schema.

This builds the entity in a type-safer way, declaring it explicitly as ElementContentEntity, and fixes the implementation to match the schema.

@jethron jethron requested a review from matus-tomlein May 16, 2025 01:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant