Skip to content

Commit

Permalink
Docs.
Browse files Browse the repository at this point in the history
  • Loading branch information
johnbillion committed Jul 13, 2024
1 parent 2f0154d commit cac9439
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ The WordPress REST API response doesn't fully adhere to the JSON schema spec, so
- Start by copying an existing file such as `post.php` which is for `/wp/v2/posts`
- The command should perform one or more REST API requests to the endpoint and pass the responses to the `save_rest_array()` function which saves them as JSON during the tests
* Run `composer run test` to validate and test the schemas.
* Run `npm run build-wp-types` and check the output of `packages/wp-types/index.ts`.
* Check the output of `packages/wp-types/index.ts`.
* Add documentation for the schema in both `readme.md` and `packages/wp-types/readme.md`.

## Creating a PHP object schema
Expand All @@ -69,7 +69,7 @@ The schema for a PHP object is created using the docblocks from its class proper
- Start by copying an existing file such as `error.php`
- The file should pass an array of one or more objects of this type to the `save_object_array()` function which saves it as JSON during the tests
* Run `composer run test` to validate and test the schemas.
* Run `npm run build-wp-types` and check the output of `packages/wp-types/index.ts`.
* Check the output of `packages/wp-types/index.ts`.
* Add documentation for the schema in both `readme.md` and `packages/wp-types/readme.md`.

## Updating schemas for a new WordPress release
Expand Down
12 changes: 6 additions & 6 deletions packages/wp-types/readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -52,12 +52,12 @@ Route | Schema
/wp/v2/categories/{id} | `WP_REST_API_Category`
/wp/v2/comments | `WP_REST_API_Comments`
/wp/v2/comments/{id} | `WP_REST_API_Comment`
/wp/v2/wp/v2/font-collections | `WP_REST_API_Font_Collections`
/wp/v2/wp/v2/font-collections/{slug} | `WP_REST_API_Font_Collection`
/wp/v2/wp/v2/font-families | Todo
/wp/v2/wp/v2/font-families/{id}/ | Todo
/wp/v2/wp/v2/font-families/{id}/font-faces | Todo
/wp/v2/wp/v2/font-families/{id}/font-faces/{id} | Todo
/wp/v2/font-collections | `WP_REST_API_Font_Collections`
/wp/v2/font-collections/{slug} | `WP_REST_API_Font_Collection`
/wp/v2/font-families | `WP_REST_API_Font_Families`
/wp/v2/font-families/{id}/ | `WP_REST_API_Font_Family`
/wp/v2/font-families/{parent}/font-faces | `WP_REST_API_Font_Faces`
/wp/v2/font-families/{parent}/font-faces/{id} | `WP_REST_API_Font_Face`
/wp/v2/global-styles/{id} | Todo
/wp/v2/global-styles/{parent}/revisions | Todo
/wp/v2/global-styles/{parent}/revisions/{id} | Todo
Expand Down
12 changes: 6 additions & 6 deletions readme.md
Original file line number Diff line number Diff line change
Expand Up @@ -56,12 +56,12 @@ Route | Schema
/wp/v2/categories/{id} | `WP_REST_API_Category`
/wp/v2/comments | `WP_REST_API_Comments`
/wp/v2/comments/{id} | `WP_REST_API_Comment`
/wp/v2/wp/v2/font-collections | `WP_REST_API_Font_Collections`
/wp/v2/wp/v2/font-collections/{slug} | `WP_REST_API_Font_Collection`
/wp/v2/wp/v2/font-families | Todo
/wp/v2/wp/v2/font-families/{id}/ | Todo
/wp/v2/wp/v2/font-families/{id}/font-faces | Todo
/wp/v2/wp/v2/font-families/{id}/font-faces/{id} | Todo
/wp/v2/font-collections | `WP_REST_API_Font_Collections`
/wp/v2/font-collections/{slug} | `WP_REST_API_Font_Collection`
/wp/v2/font-families | `WP_REST_API_Font_Families`
/wp/v2/font-families/{id}/ | `WP_REST_API_Font_Family`
/wp/v2/font-families/{parent}/font-faces | `WP_REST_API_Font_Faces`
/wp/v2/font-families/{parent}/font-faces/{id} | `WP_REST_API_Font_Face`
/wp/v2/global-styles/{id} | Todo
/wp/v2/global-styles/{parent}/revisions | Todo
/wp/v2/global-styles/{parent}/revisions/{id} | Todo
Expand Down

0 comments on commit cac9439

Please sign in to comment.