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

Updates based on issues in the WooCommerce repo #243

Merged
merged 9 commits into from
Jul 17, 2024

Conversation

coreymckrill
Copy link
Contributor

@coreymckrill coreymckrill commented May 21, 2024

There are several issues in the backlog of the REST API focus in the WooCommerce repo. This attempts to batch fixes for those issues into one PR.

To test

  • After checking out this PR branch, run the script to build the static docs site files: ./build.sh. This will create a build directory in the repo.
  • Find the index.html file in the build directory and open it in a browser. You should see something that looks just like the live REST API docs site.
  • Check for typos and other formatting issues related to the changes in this PR.

This also removes redundant properties from Orders

Fixes woocommerce/woocommerce#43444
@coreymckrill coreymckrill self-assigned this May 21, 2024
@coreymckrill coreymckrill requested review from a team and vedanshujain and removed request for a team July 9, 2024 22:29
@coreymckrill coreymckrill marked this pull request as ready for review July 9, 2024 22:30
@coreymckrill coreymckrill requested review from Konamiman and naman03malhotra and removed request for vedanshujain July 9, 2024 22:30
@coreymckrill
Copy link
Contributor Author

Switching the reviewers to Nestor and Naman since they are working on docs updates.

| `rate_code` | string | Tax rate code. <i class="label label-info">read-only</i> |
| `rate_id` | integer | Tax rate ID. <i class="label label-info">read-only</i> |
| `label` | string | Tax rate label. <i class="label label-info">read-only</i> |
| `compound` | boolean | Show if is a compound tax rate. <i class="label label-info">read-only</i> |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"show if it's a compound" is better maybe?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yeah, that grammar could definitely be improved. Updated in 849b306

@coreymckrill coreymckrill requested a review from Konamiman July 11, 2024 16:42
Copy link

@naman03malhotra naman03malhotra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me overall!

| `orderby` | string | Sort collection by object attribute. Options: `date`, `modified`, `id`, `include`, `title` and `slug`. Default is `date`. |
| `parent` | array | Limit result set to those of particular parent IDs. |
| `parent_exclude` | array | Limit result set to all items except those of a particular parent ID. |
| `dp` | integer | Number of decimal points to use in each resource. Default is `2`. |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Side note: should we perhaps use the full name decimal_points instead of the abbreviation here?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

should we perhaps use the full name decimal_points instead of the abbreviation here?

dp is the name of the parameter used in the REST API, so if we changed it in the docs, we'd need to update the endpoint as well. Replacing dp with decimal_points would be backwards-incompatible, but I guess we could add decimal_points as an alias of dp.

I agree decimal_points would have been a better name from the start, though. For now I think we should keep the docs and the endpoint as they are.

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree decimal_points would have been a better name from the start, though. For now I think we should keep the docs and the endpoint as they are.

👍

Copy link

@naman03malhotra naman03malhotra left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good, 🚢

| `orderby` | string | Sort collection by object attribute. Options: `date`, `modified`, `id`, `include`, `title` and `slug`. Default is `date`. |
| `parent` | array | Limit result set to those of particular parent IDs. |
| `parent_exclude` | array | Limit result set to all items except those of a particular parent ID. |
| `dp` | integer | Number of decimal points to use in each resource. Default is `2`. |

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree decimal_points would have been a better name from the start, though. For now I think we should keep the docs and the endpoint as they are.

👍

@coreymckrill coreymckrill merged commit 799a431 into trunk Jul 17, 2024
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