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

Try/consistent method arguments #196

Merged

Conversation

imath
Copy link
Member

@imath imath commented Jul 24, 2019

Writing the documentation for the BP_REST_Components_Endpoint I've noticed that the arguments of the generated documentation by the Restsplain plugin about the EDITABLE method are not consistent with what is actually expected.

It should be name and action instead of a subset of the item schema. See:
https://imath-buddydocs.pf1.wpserveur.net/bp-rest-api-reference/endpoints/buddypress/v1/components/#PUT

NB: to ease WPCS testing I've also edited the composer.json file in the first commit, you can skip this commit if you think it's a bad idea ;)

NB 2 : The unit tests should error on Trunk, that's because of this:
https://buddypress.trac.wordpress.org/ticket/8115

@renatonascalves could you do a review of all the other endpoints to make sure arguments used in EDITABLE/CREATABLE/DELETABLE methods are consistent ?

Starting with the components endpoint: Arguments generated documentation by the Restsplain plugin about the EDITABLE method of the `BP_REST_Components_Endpoint` are not consistent with what is actually expected. It should be `name` and `action` instead of a subset of the item schema.
@imath imath added the bug label Jul 24, 2019
@imath imath added this to the before-bp-merge milestone Jul 24, 2019
@imath
Copy link
Member Author

imath commented Jul 25, 2019

Just committed the patch on https://buddypress.trac.wordpress.org/ticket/8115 and re-ran the unit tests. There are now passing successfully.

@renatonascalves renatonascalves merged commit d219072 into buddypress:master Jul 28, 2019
@imath imath deleted the try/consistent-method-arguments branch August 9, 2019 17:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants