Lucas_Werkmeister_WMDE added a comment.
Thought: if we say that any subclass of InvalidArgumentException is okay to be thrown by value formatters, then value formatters can use the Wikimedia\Assert library if they want.TASK DETAILhttps://phabricator.wikimedia.org/T209368EMAIL
Addshore added a comment.
So after reading this investigation and trying to look at the root inconsistencies I see a few things.
The formatting either:
happens correctly, and we get something formatted
the ValueFormatter that is used returns a FormattingException or InvalidArgumentExceptions
an
Lucas_Werkmeister_WMDE added a comment.
No, but I think the data value is supposed to be useful on its own as well, that’s why it has its own type information.TASK DETAILhttps://phabricator.wikimedia.org/T209368EMAIL PREFERENCEShttps://phabricator.wikimedia.org/settings/panel/emailpreferences/To:
Michael added a comment.
In T209368#4781099, @Lucas_Werkmeister_WMDE wrote:
[...] there are more data types than data value types. [...]
When do we need the "data value type"? Are there data types that could reasonably have multiple data value types?TASK
Lucas_Werkmeister_WMDE added a comment.
It’s not completely redundant, because there are more data types than data value types. For example, the data types “string”, “external identifier”, “URL”, “Commons media”, and a few more all share the data value type “string”, and the data types “item”,
Michael added a comment.
Yes, I think the next step should be deciding/defining the expected behavior in these situations. Does this API have documentation from which we could infer the expected behavior? Without knowing the use-cases and tools, having two type definitions in the request seems
Lucas_Werkmeister_WMDE added a comment.
This is currently in Peer Review, but I’m not sure what’s to review here. Do we need to decide what to do next, given the results listed in the task description?TASK DETAILhttps://phabricator.wikimedia.org/T209368EMAIL
Tarrow added a comment.
"Perfect" links are only returned for forms when the datatype is explicit specified as such and the id is valid e.g.
value: L10-F3 and type: wikibase-form {"result":"
A perfect link is also displayed when wikibase-form is passed as the datatype with a deleted sense id e.g.
Tarrow added a comment.
The pattern of success but with generic links for all but property and item also occurs with datatype parameter set to the following:
monolingualtext
quantity
string
time
external-id
TASK DETAILhttps://phabricator.wikimedia.org/T209368EMAIL
Tarrow added a comment.
I've tested various combinations of the possible entries in the "datavalue" parameter. i.e. varying the specified type and the id string datavalue=={"type":"$TYPE", "value": {"id":"$VALUE"}} while keeping the "datatype" parameter fixed as wikibase-item
with the following
Lucas_Werkmeister_WMDE added a comment.
Some examples of current behavior:
form/sense ID value, lexeme datatype: InvalidArgumentException
form/sense ID value, sense/form datatype: PHP fatal error
lexeme ID value, sense/form datatype: PHP fatal error
lexeme/sense/form ID value, item datatype:
11 matches
Mail list logo