Page MenuHomePhabricator

Consider exposing an ItemId schema component in the Wikibase REST OpenAPI spec
Open, Needs TriagePublic

Description

We repeat the Item ID pattern ^Q[1-9]\d{0,9}$ as a literal in a couple of our
spec modules (crud parameters.js, search schema-parts.js), and WikibaseLexeme's
fragment (T433337: 👓 Create the WikibaseLexeme OpenAPI specification fragment) has to restate it as well since there's nothing $ref-able
that carries it.

Let's consider adding a components/schemas/ItemId (and possibly PropertyId)
string schema with the pattern, so both our own modules and extension fragments
can reference it instead of copying the regex.