Skip to content

Commit

Permalink
Revert introducing title in schema
Browse files Browse the repository at this point in the history
  • Loading branch information
ramonjd committed Dec 22, 2023
1 parent 546ea1f commit 4ffbee2
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -288,7 +288,7 @@ public function prepare_item_for_response( $post, $request ) {
* Retrieves the revision's schema, conforming to JSON Schema.
*
* @since 6.3.0
* @since 6.5.0 Merging parent and parent controller schemata.
* @since 6.5.0 Merged parent and parent controller schemata.
*
* @return array Item schema data.
*/
Expand All @@ -305,7 +305,7 @@ public function get_item_schema() {
unset( $schema['properties']['slug'] );
unset( $schema['properties']['meta'] );
unset( $schema['properties']['content'] );
unset( $schema['properties']['excerpt'] );
unset( $schema['properties']['title'] );

$this->schema = $schema;

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -368,10 +368,9 @@ public function test_get_item_schema() {
$data = $response->get_data();
$properties = $data['schema']['properties'];

$this->assertCount( 10, $properties, 'Schema properties array has exactly 10 elements.' );
$this->assertCount( 9, $properties, 'Schema properties array has exactly 9 elements.' );
$this->assertArrayHasKey( 'id', $properties, 'Schema properties array has "id" key.' );
$this->assertArrayHasKey( 'styles', $properties, 'Schema properties array has "styles" key.' );
$this->assertArrayHasKey( 'title', $properties, 'Schema properties array has "title" key.' );
$this->assertArrayHasKey( 'settings', $properties, 'Schema properties array has "settings" key.' );
$this->assertArrayHasKey( 'parent', $properties, 'Schema properties array has "parent" key.' );
$this->assertArrayHasKey( 'author', $properties, 'Schema properties array has "author" key.' );
Expand Down

0 comments on commit 4ffbee2

Please sign in to comment.