maxlath / wikibase-cli

read and edit a Wikibase instance from the command line
MIT License
223 stars 24 forks source link

stray argument in static js object example #174

Closed gitonthescene closed 1 year ago

gitonthescene commented 1 year ago

I wasn't sure if this should count as a bug or not, but I think this example in the doc is malformed. There seems to be an extra argument under the P369 claim. I was confused as to what the value was supposed to be.

I was trying to use it to model my use case but got confused. The --generate-template tool worked like a charm though and leads me to believe this example is malformed.

Regardsm

maxlath commented 1 year ago

I don't think it's malformed (it works as expected when executed): property claims arrays can accept either a single value or an array of values. Those values can either be simple values (ex: just an entity id such as Q13406268) or rich values (an object with qualifiers and/or references)

gitonthescene commented 1 year ago

So is the value for the property P369 in this example Q13406268 or Q1992907?

maxlath commented 1 year ago

Both, but the Q1992907 claim also has qualifiers and references

gitonthescene commented 1 year ago

Oh, I see. It’s two claims with the same property. I hadn’t grokked that it was a list unlike the P123 property above it. Sorry for the noise.

maxlath commented 1 year ago

no worries :)