Spage has submitted this change and it was merged. Change subject: Validate server-side events and send them as JSON. ......................................................................
Validate server-side events and send them as JSON. Consider this a first pass at the problem. What I'd really like to do is create a Schema class that RemoteSchema would inherit. 'Schema' would wrap the JsonSchema.php we get from robla's extension and encapsulate the validation logic. Currently roles and responsibilities are all mixed up, with some validation logic remaining in the Content / ContentHandler classes. The other wart is the ambiguity between methods that validate by returning a boolean and methods that validate by raising exceptions on invalid input. I'd like things to be centralized, internally consistent, safe, and ideally consistent with the JavaScript API. If you have ideas, let me know. Change-Id: I36e00825d522531625e7e53d75391067d27f1bb6 --- M EventLogging.hooks.php M EventLogging.php 2 files changed, 23 insertions(+), 11 deletions(-) Approvals: Spage: Verified; Looks good to me, approved jenkins-bot: Checked -- To view, visit https://gerrit.wikimedia.org/r/42878 To unsubscribe, visit https://gerrit.wikimedia.org/r/settings Gerrit-MessageType: merged Gerrit-Change-Id: I36e00825d522531625e7e53d75391067d27f1bb6 Gerrit-PatchSet: 3 Gerrit-Project: mediawiki/extensions/EventLogging Gerrit-Branch: master Gerrit-Owner: Ori.livneh <[email protected]> Gerrit-Reviewer: Mattflaschen <[email protected]> Gerrit-Reviewer: Ori.livneh <[email protected]> Gerrit-Reviewer: Spage <[email protected]> Gerrit-Reviewer: jenkins-bot _______________________________________________ MediaWiki-commits mailing list [email protected] https://lists.wikimedia.org/mailman/listinfo/mediawiki-commits
