Page MenuHomePhabricator

Decide on location of StatementValidator implementation(s)
Open, Needs TriagePublic


Patch 859100 removed the SnakValidator from the SnakValidatorStatementValidator and renamed it to StatementDeserializerStatementValidator.

The SnakValidatorStatementValidator lived in the DataAccess directory due to its reliance on the SnakValidator which uses PropertyDataTypeLookup and requires data access to validate that properties exist. Now that the StatementDeserializerStatementValidator no longer uses the SnakValidator, is the DataAccess directory still the best place for it?

Initial thoughts:

  • The functionality of StatementDeserializerStatementValidator hasn't changed; it still requires data access (now via the new StatementDeserializer instead of the SnakValidator)
  • The StatementDeserializer isn't in DataAccess; so why should this validator be located there?
  • We were unsure about where this validator should be location when we implemented it
  • Where else could it go? Replace the StatementValidator interface in Validation?

Event Timeline

Change 862302 had a related patch set uploaded (by Ollie Shotton; author: Ollie Shotton):

[mediawiki/extensions/Wikibase@master] REST: Refactor StatementValidator

Change 862302 merged by jenkins-bot:

[mediawiki/extensions/Wikibase@master] REST: Refactor StatementValidator location