Skip to content
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

Enforce unique id properties #79

Closed
nikku opened this issue Mar 27, 2024 · 3 comments
Closed

Enforce unique id properties #79

nikku opened this issue Mar 27, 2024 · 3 comments
Labels
enhancement New feature or request needs more information Requires additional information to be actionable.

Comments

@nikku
Copy link
Member

nikku commented Mar 27, 2024

Is your feature request related to a problem? Please describe.

The property#id fields and group#id fields are meant to uniquely identify certain elements in an element template.

The property#id field specifically identifies an element template property in order to be able to depend on it in other fields conditions. We've seen evidence that users misuse it and as a result our tooling blows up (#78).

Describe the solution you'd like

  • We validate the uniqueness of the property#id and group#id and reject templates that do not comply

Describe alternatives you've considered

Make our tooling completely fail-safe in the presence of non-unique property#id.

Additional context

Found here, reported to consumer here.

@nikku nikku added the enhancement New feature or request label Mar 27, 2024
@nikku
Copy link
Member Author

nikku commented Mar 27, 2024

This should be supported via JSONSchema#draft-7 - json-schema-org/json-schema-vocabularies#22.

@nikku
Copy link
Member Author

nikku commented Mar 28, 2024

We'd carefully need to evaluate if this is even feasible. One thing we could assert at run-time is that at any given time only one element with a given ID must be present. At this stage duplicate IDs are used, and serve a value for some consumers (Connectors).

@nikku nikku added the needs more information Requires additional information to be actionable. label Mar 28, 2024
@nikku
Copy link
Member Author

nikku commented Apr 15, 2024

We'll not be able to introduce this (anymore), as it will break loads of user land extensions.

@nikku nikku closed this as not planned Won't fix, can't repro, duplicate, stale Apr 15, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request needs more information Requires additional information to be actionable.
Projects
None yet
Development

No branches or pull requests

1 participant