Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

T365757: Use body parameters instead of JSON body validator #128

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

goodonefrankie
Copy link

The use of body validator is deprecated in the REST API framework. See T365757

The use of body validator is deprecated in the REST API framework. See T365757
@JeroenDeDauw
Copy link
Member

T365757? What's that?

@goodonefrankie
Copy link
Author

Ah, sorry for the confusion! WMF engineer here. We're deprecating BodyValidator, and as part of that work we're proposing to remove JSONBodyValidator from extensions and replace it with getBodyParamSettings, as suggested in this PR.

@JeroenDeDauw
Copy link
Member

Thanks. Does this have compat implications? Does the new code work with MW 37?

@brightbyte
Copy link

Thanks. Does this have compat implications? Does the new code work with MW 37?

No, getBodyParamSettings is new in 1.43. We plan to deprecate the use of getBodyValidator in 1.43, and remove the BodyValidator and JsonBodyValidator classes 1.44.

If you want to keep your baster branch backwards compatible, you could do the following:

  • implement getBodyParamSettings as proposed
  • keep getBodyValidator(), but make it return parent::getBodyValidator() for MW1.43 and later (in 1.44, it won't be called).
  • Call getBodyParamSettings to get the settings to pass to JsonBodyValidator.

But on https://www.mediawiki.org/wiki/Extension:Wikibase_RDF it says you use branches for LTS releases. That means that your master branch doesn't have to be compatible with anything older than 1.43, right?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants