Lucas_Werkmeister_WMDE updated the task description. (Show Details) |
CHANGES TO TASK DESCRIPTION
Currently, we only check constraints on the statement main snak. We should also check them on qualifiers and on references.
Does this apply to all constraint types or just some of them? There are “value only”, “qualifier only” and “reference only” constraint types, which only make sense with this feature. Constraints like “range”, “value type”, or “one of” make sense on qualifiers and references. On the other hand, “item required claim” and “type” don’t really make sense there, I think. But it might not hurt to just allow them anyways, and if people add those constraints, so be it.
---
Implementation idea: `checkConstraint` could take a `ConstraintContext` argument instead of the current `Statement` and `EntityDocument` arguments; the context would expose the entity, the statement, the snak to be checked, and what kind of context it is (is the snak the main snak, a qualifier, or a reference?).
This might require a breaking change to the API output format.
---
- [ ] Get new API format ready: {T174544}
Does this apply to all constraint types or just some of them? There are “value only”, “qualifier only” and “reference only” constraint types, which only make sense with this feature. Constraints like “range”, “value type”, or “one of” make sense on qualifiers and references. On the other hand, “item required claim” and “type” don’t really make sense there, I think. But it might not hurt to just allow them anyways, and if people add those constraints, so be it.
---
Implementation idea: `checkConstraint` could take a `ConstraintContext` argument instead of the current `Statement` and `EntityDocument` arguments; the context would expose the entity, the statement, the snak to be checked, and what kind of context it is (is the snak the main snak, a qualifier, or a reference?).
This might require a breaking change to the API output format.
---
- [ ] Get new API format ready: {T174544}
...
TASK DETAIL
EMAIL PREFERENCES
To: Lucas_Werkmeister_WMDE
Cc: abian, Ivan_A_Krestinin, gerritbot, PokestarFan, Lydia_Pintscher, Lucas_Werkmeister_WMDE, Aklapper, Lordiis, GoranSMilovanovic, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, Lewizho99, Maathavan, Agabi10, Izno, Wikidata-bugs, aude, Mbch331
Cc: abian, Ivan_A_Krestinin, gerritbot, PokestarFan, Lydia_Pintscher, Lucas_Werkmeister_WMDE, Aklapper, Lordiis, GoranSMilovanovic, Adik2382, Th3d3v1ls, Ramalepe, Liugev6, QZanden, Lewizho99, Maathavan, Agabi10, Izno, Wikidata-bugs, aude, Mbch331
_______________________________________________ Wikidata-bugs mailing list Wikidata-bugs@lists.wikimedia.org https://lists.wikimedia.org/mailman/listinfo/wikidata-bugs