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

Power the Comments endpoint args from the schema, like everything else #1422

Merged
merged 2 commits into from Jul 25, 2015

Conversation

Projects
None yet
2 participants
@joehoyle
Contributor

joehoyle commented Jul 24, 2015

The previous args had defaults of empty strings for wp_allow_comment,
however I see this as an incorrect use of the abstraction. Args should not
have defaults just to please an underlaying function that expects those
values.

This also needed to move into create_item as the same default can not be
used for the update_item endpoint args.

joehoyle added some commits Jul 24, 2015

Power the Comments endpoint args from the schema, like everything else
The previous args had defaults of empty strings for `wp_allow_comment`,
however I see this as an incorrect use of the abstraction. Args should
not have defaults just to please an underlaying function that expects
those values.

This also needed to move into `create_item` as the same default can not
be used for the `update_item` endpoint args.

@joehoyle joehoyle self-assigned this Jul 24, 2015

@joehoyle joehoyle added this to the 2.0 Beta 4 milestone Jul 24, 2015

@rachelbaker

This comment has been minimized.

Show comment
Hide comment
@rachelbaker

rachelbaker Jul 25, 2015

Member

Intended to fix #1418

Member

rachelbaker commented Jul 25, 2015

Intended to fix #1418

@rachelbaker

This comment has been minimized.

Show comment
Hide comment
@rachelbaker

rachelbaker Jul 25, 2015

Member

@joehoyle Thank you! 🎉
Merged #1422

Member

rachelbaker commented Jul 25, 2015

@joehoyle Thank you! 🎉
Merged #1422

rachelbaker added a commit that referenced this pull request Jul 25, 2015

Merge pull request #1422 from WP-API/args-from-schema-comments
Power the Comments endpoint args from the schema, like everything else

@rachelbaker rachelbaker merged commit e3943de into develop Jul 25, 2015

4 checks passed

Scrutinizer No new issues
Details
codecov/commit 100.00% (min required 80%)
Details
codecov/project 88.89% (min required 80%)
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details

@rachelbaker rachelbaker deleted the args-from-schema-comments branch Jul 25, 2015

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment