wmde / WikibaseReconcileEdit

GNU General Public License v2.0
3 stars 3 forks source link

Move some input validation to new EditRequestParser service #26

Closed lucaswerkmeister closed 3 years ago

lucaswerkmeister commented 3 years ago

This introduces the EditRequestParser service and makes it responsible for parsing the request data and validating it, up to the point of parsing the “entity” input and checking the property datatype in the “reconcile” input. Further validation should stay in EditEndpoint, I believe – it’s not EditRequestParser’s responsibility to know that e.g. EditEndpoint doesn’t support qualifiers and references yet.

Bug: T282564

lucaswerkmeister commented 3 years ago

Note: this pull request also includes the commits from #23; that PR should be merged first.

lucaswerkmeister commented 3 years ago

Note: this pull request also includes the commits from #23; that PR should be merged first.

Done and rebased.

lucaswerkmeister commented 3 years ago

Rebased onto main after #17 (which required the addition of $otherItems to EditRequest).

I also swapped the components of EditRequest: “reconcile” now comes before “entity”.