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
Contributor

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 ?

imath added some commits Jul 24, 2019

Needs consitent Args for EDITABLE/CREATABLE/DELETABLE methods
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 imath requested a review from renatonascalves Jul 24, 2019

@imath

This comment has been minimized.

Copy link
Contributor Author

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

1 check passed

continuous-integration/travis-ci/pr The Travis CI build passed
Details

@imath imath deleted the imath:try/consistent-method-arguments branch Aug 9, 2019

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
2 participants
You can’t perform that action at this time.