- Timestamp:
- 12/16/2018 01:37:56 AM (7 years ago)
- Location:
- trunk
- Files:
-
- 3 edited
-
. (modified) (1 prop)
-
tests/phpunit/tests/rest-api/rest-schema-setup.php (modified) (9 diffs)
-
tests/qunit/fixtures/wp-api-generated.js (modified) (28 diffs)
Legend:
- Unmodified
- Added
- Removed
-
trunk
- Property svn:mergeinfo changed
/branches/5.0 merged: 43851
- Property svn:mergeinfo changed
-
trunk/tests/phpunit/tests/rest-api/rest-schema-setup.php
r44150 r44217 477 477 'Schema.routes./wp/v2/pages._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/pages', 478 478 'Schema.routes./wp/v2/media._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/media', 479 'Schema.routes./wp/v2/blocks._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/blocks', 479 480 'Schema.routes./wp/v2/types._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/types', 480 481 'Schema.routes./wp/v2/statuses._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/statuses', … … 485 486 'Schema.routes./wp/v2/users/me._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/users/me', 486 487 'Schema.routes./wp/v2/comments._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/comments', 488 'Schema.routes./wp/v2/search._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/search', 487 489 'Schema.routes./wp/v2/settings._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/settings', 490 'Schema.routes./wp/v2/themes._links.self' => 'http://example.org/index.php?rest_route=/wp/v2/themes', 488 491 'oembed.routes./oembed/1.0._links.self' => 'http://example.org/index.php?rest_route=/oembed/1.0', 489 492 'oembed.routes./oembed/1.0/embed._links.self' => 'http://example.org/index.php?rest_route=/oembed/1.0/embed', … … 502 505 'PostsCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=4', 503 506 'PostsCollection.0._links.version-history.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/4/revisions', 504 'PostsCollection.0._links.predecessor-version.0.id' => 5,505 'PostsCollection.0._links.predecessor-version.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/4/revisions/ 5',507 'PostsCollection.0._links.predecessor-version.0.id' => 6, 508 'PostsCollection.0._links.predecessor-version.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/4/revisions/6', 506 509 'PostsCollection.0._links.wp:attachment.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=4', 507 510 'PostsCollection.0._links.wp:term.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=4', … … 511 514 'PostModel.link' => 'http://example.org/?p=4', 512 515 'postRevisions.0.author' => 2, 513 'postRevisions.0.id' => 5,516 'postRevisions.0.id' => 6, 514 517 'postRevisions.0.parent' => 4, 515 'postRevisions.0.slug' => '4- revision-v1',516 'postRevisions.0.guid.rendered' => 'http://example.org/?p= 5',518 'postRevisions.0.slug' => '4-autosave-v1', 519 'postRevisions.0.guid.rendered' => 'http://example.org/?p=6', 517 520 'postRevisions.0._links.parent.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/4', 521 'postRevisions.1.author' => 2, 522 'postRevisions.1.id' => 5, 523 'postRevisions.1.parent' => 4, 524 'postRevisions.1.slug' => '4-revision-v1', 525 'postRevisions.1.guid.rendered' => 'http://example.org/?p=5', 526 'postRevisions.1._links.parent.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/4', 518 527 'revision.author' => 2, 519 528 'revision.id' => 5, … … 521 530 'revision.slug' => '4-revision-v1', 522 531 'revision.guid.rendered' => 'http://example.org/?p=5', 523 'PagesCollection.0.id' => 6, 524 'PagesCollection.0.guid.rendered' => 'http://example.org/?page_id=6', 525 'PagesCollection.0.link' => 'http://example.org/?page_id=6', 526 'PagesCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/6', 532 'postAutosaves.0.author' => 2, 533 'postAutosaves.0.id' => 6, 534 'postAutosaves.0.parent' => 4, 535 'postAutosaves.0.slug' => '4-autosave-v1', 536 'postAutosaves.0.guid.rendered' => 'http://example.org/?p=6', 537 'postAutosaves.0._links.parent.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts/4', 538 'autosave.author' => 2, 539 'autosave.id' => 6, 540 'autosave.parent' => 4, 541 'autosave.slug' => '4-autosave-v1', 542 'autosave.guid.rendered' => 'http://example.org/?p=6', 543 'PagesCollection.0.id' => 7, 544 'PagesCollection.0.guid.rendered' => 'http://example.org/?page_id=7', 545 'PagesCollection.0.link' => 'http://example.org/?page_id=7', 546 'PagesCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/7', 527 547 'PagesCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages', 528 548 'PagesCollection.0._links.about.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/types/page', 529 'PagesCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post= 6',530 'PagesCollection.0._links.version-history.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/ 6/revisions',531 'PagesCollection.0._links.predecessor-version.0.id' => 7,532 'PagesCollection.0._links.predecessor-version.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/ 6/revisions/7',533 'PagesCollection.0._links.wp:attachment.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent= 6',534 'PageModel.id' => 6,535 'PageModel.guid.rendered' => 'http://example.org/?page_id= 6',536 'PageModel.link' => 'http://example.org/?page_id= 6',549 'PagesCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7', 550 'PagesCollection.0._links.version-history.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/7/revisions', 551 'PagesCollection.0._links.predecessor-version.0.id' => 9, 552 'PagesCollection.0._links.predecessor-version.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/7/revisions/9', 553 'PagesCollection.0._links.wp:attachment.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7', 554 'PageModel.id' => 7, 555 'PageModel.guid.rendered' => 'http://example.org/?page_id=7', 556 'PageModel.link' => 'http://example.org/?page_id=7', 537 557 'pageRevisions.0.author' => 2, 538 'pageRevisions.0.id' => 7, 539 'pageRevisions.0.parent' => 6, 540 'pageRevisions.0.slug' => '6-revision-v1', 541 'pageRevisions.0.guid.rendered' => 'http://example.org/?p=7', 542 'pageRevisions.0._links.parent.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/6', 558 'pageRevisions.0.id' => 9, 559 'pageRevisions.0.parent' => 7, 560 'pageRevisions.0.slug' => '7-autosave-v1', 561 'pageRevisions.0.guid.rendered' => 'http://example.org/?p=9', 562 'pageRevisions.0._links.parent.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/7', 563 'pageRevisions.1.author' => 2, 564 'pageRevisions.1.id' => 8, 565 'pageRevisions.1.parent' => 7, 566 'pageRevisions.1.slug' => '7-revision-v1', 567 'pageRevisions.1.guid.rendered' => 'http://example.org/?p=8', 568 'pageRevisions.1._links.parent.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/7', 543 569 'pageRevision.author' => 2, 544 'pageRevision.id' => 7, 545 'pageRevision.parent' => 6, 546 'pageRevision.slug' => '6-revision-v1', 547 'pageRevision.guid.rendered' => 'http://example.org/?p=7', 548 'MediaCollection.0.id' => 8, 549 'MediaCollection.0.guid.rendered' => 'http://example.org/?attachment_id=8', 550 'MediaCollection.0.link' => 'http://example.org/?attachment_id=8', 570 'pageRevision.id' => 8, 571 'pageRevision.parent' => 7, 572 'pageRevision.slug' => '7-revision-v1', 573 'pageRevision.guid.rendered' => 'http://example.org/?p=8', 574 'pageAutosaves.0.author' => 2, 575 'pageAutosaves.0.id' => 9, 576 'pageAutosaves.0.parent' => 7, 577 'pageAutosaves.0.slug' => '7-autosave-v1', 578 'pageAutosaves.0.guid.rendered' => 'http://example.org/?p=9', 579 'pageAutosaves.0._links.parent.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/pages/7', 580 'pageAutosave.author' => 2, 581 'pageAutosave.id' => 9, 582 'pageAutosave.parent' => 7, 583 'pageAutosave.slug' => '7-autosave-v1', 584 'pageAutosave.guid.rendered' => 'http://example.org/?p=9', 585 'MediaCollection.0.id' => 10, 586 'MediaCollection.0.guid.rendered' => 'http://example.org/?attachment_id=10', 587 'MediaCollection.0.link' => 'http://example.org/?attachment_id=10', 551 588 'MediaCollection.0.description.rendered' => '<p class="attachment"><!-- <a...><img.../></a> --></p>', 552 589 'MediaCollection.0.source_url' => 'http://example.org/wp-content/uploads//tmp/canola.jpg', 553 'MediaCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/media/ 8',590 'MediaCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/media/10', 554 591 'MediaCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/media', 555 592 'MediaCollection.0._links.about.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/types/attachment', 556 'MediaCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post= 8',557 'MediaModel.id' => 8,558 'MediaModel.guid.rendered' => 'http://example.org/?attachment_id= 8',559 'MediaModel.link' => 'http://example.org/?attachment_id= 8',593 'MediaCollection.0._links.replies.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10', 594 'MediaModel.id' => 10, 595 'MediaModel.guid.rendered' => 'http://example.org/?attachment_id=10', 596 'MediaModel.link' => 'http://example.org/?attachment_id=10', 560 597 'MediaModel.description.rendered' => '<p class="attachment"><!-- <a...><img.../></a> --></p>', 561 598 'MediaModel.source_url' => 'http://example.org/wp-content/uploads//tmp/canola.jpg', … … 566 603 'TypesCollection.attachment._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/types', 567 604 'TypesCollection.attachment._links.wp:items.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/media', 605 'TypesCollection.wp_block._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/types', 606 'TypesCollection.wp_block._links.wp:items.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/blocks', 568 607 'StatusesCollection.publish._links.archives.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/posts', 569 608 'StatusesCollection.future._links.archives.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fposts&status=future', … … 577 616 'TaxonomiesCollection.post_tag._links.wp:items.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/tags', 578 617 'CategoriesCollection.0.link' => 'http://example.org/?cat=1', 618 'CategoriesCollection.0.meta.test_single' => '', 619 'CategoriesCollection.0.meta.test_multi' => [], 620 'CategoriesCollection.0.meta.test_cat_single' => '', 621 'CategoriesCollection.0.meta.test_cat_multi' => [], 579 622 'CategoriesCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/categories/1', 580 623 'CategoriesCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/categories', … … 582 625 'CategoriesCollection.0._links.wp:post_type.0.href' => 'http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fposts&categories=1', 583 626 'CategoryModel.link' => 'http://example.org/?cat=1', 627 'CategoryModel.meta.test_single' => '', 628 'CategoryModel.meta.test_multi' => [], 629 'CategoryModel.meta.test_cat_single' => '', 630 'CategoryModel.meta.test_cat_multi' => [], 584 631 'TagsCollection.0.id' => 2, 585 632 'TagsCollection.0.link' => 'http://example.org/?tag=restapi-client-fixture-tag', 633 'TagsCollection.0.meta.test_single' => '', 634 'TagsCollection.0.meta.test_multi' => [], 635 'TagsCollection.0.meta.test_tag_meta' => '', 586 636 'TagsCollection.0._links.self.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/tags/2', 587 637 'TagsCollection.0._links.collection.0.href' => 'http://example.org/index.php?rest_route=/wp/v2/tags', … … 590 640 'TagModel.id' => 2, 591 641 'TagModel.link' => 'http://example.org/?tag=restapi-client-fixture-tag', 642 'TagModel.meta.test_single' => '', 643 'TagModel.meta.test_multi' => [], 644 'TagModel.meta.test_tag_meta' => '', 592 645 'UsersCollection.0.link' => 'http://example.org/?author=1', 593 646 'UsersCollection.0.avatar_urls.24' => 'http://0.gravatar.com/avatar/96614ec98aa0c0d2ee75796dced6df54?s=24&d=mm&r=g', -
trunk/tests/qunit/fixtures/wp-api-generated.js
r44166 r44217 4981 4981 "predecessor-version": [ 4982 4982 { 4983 "id": 5,4984 "href": "http://example.org/index.php?rest_route=/wp/v2/posts/4/revisions/ 5"4983 "id": 6, 4984 "href": "http://example.org/index.php?rest_route=/wp/v2/posts/4/revisions/6" 4985 4985 } 4986 4986 ], … … 5058 5058 "date": "2017-02-14T00:00:00", 5059 5059 "date_gmt": "2017-02-14T00:00:00", 5060 "id": 6, 5061 "modified": "2017-02-14T00:00:00", 5062 "modified_gmt": "2017-02-14T00:00:00", 5063 "parent": 4, 5064 "slug": "4-autosave-v1", 5065 "guid": { 5066 "rendered": "http://example.org/?p=6" 5067 }, 5068 "title": { 5069 "rendered": "" 5070 }, 5071 "content": { 5072 "rendered": "<p>Autosave post content.</p>\n" 5073 }, 5074 "excerpt": { 5075 "rendered": "" 5076 }, 5077 "_links": { 5078 "parent": [ 5079 { 5080 "href": "http://example.org/index.php?rest_route=/wp/v2/posts/4" 5081 } 5082 ] 5083 } 5084 }, 5085 { 5086 "author": 2, 5087 "date": "2017-02-14T00:00:00", 5088 "date_gmt": "2017-02-14T00:00:00", 5060 5089 "id": 5, 5061 5090 "modified": "2017-02-14T00:00:00", … … 5067 5096 }, 5068 5097 "title": { 5069 "rendered": " "5098 "rendered": "REST API Client Fixture: Post" 5070 5099 }, 5071 5100 "content": { 5072 "rendered": "<p> Autosavepost content.</p>\n"5101 "rendered": "<p>Updated post content.</p>\n" 5073 5102 }, 5074 5103 "excerpt": { 5075 "rendered": " "5104 "rendered": "<p>REST API Client Fixture: Post</p>\n" 5076 5105 }, 5077 5106 "_links": { … … 5079 5108 { 5080 5109 "href": "http://example.org/index.php?rest_route=/wp/v2/posts/4" 5081 }5082 ]5083 }5084 },5085 {5086 "author": 376,5087 "date": "2017-02-14T00:00:00",5088 "date_gmt": "2017-02-14T00:00:00",5089 "id": 36744,5090 "modified": "2017-02-14T00:00:00",5091 "modified_gmt": "2017-02-14T00:00:00",5092 "parent": 36743,5093 "slug": "36743-revision-v1",5094 "guid": {5095 "rendered": "http://example.org/?p=36744"5096 },5097 "title": {5098 "rendered": "REST API Client Fixture: Post"5099 },5100 "content": {5101 "rendered": "<p>Updated post content.</p>\n"5102 },5103 "excerpt": {5104 "rendered": "<p>REST API Client Fixture: Post</p>\n"5105 },5106 "_links": {5107 "parent": [5108 {5109 "href": "http://example.org/index.php?rest_route=/wp/v2/posts/36743"5110 5110 } 5111 5111 ] … … 5139 5139 mockedApiResponse.postAutosaves = [ 5140 5140 { 5141 "author": 376,5141 "author": 2, 5142 5142 "date": "2017-02-14T00:00:00", 5143 5143 "date_gmt": "2017-02-14T00:00:00", 5144 "id": 36745,5144 "id": 6, 5145 5145 "modified": "2017-02-14T00:00:00", 5146 5146 "modified_gmt": "2017-02-14T00:00:00", 5147 "parent": 36743,5148 "slug": " 36743-autosave-v1",5147 "parent": 4, 5148 "slug": "4-autosave-v1", 5149 5149 "guid": { 5150 "rendered": "http://example.org/?p= 36745"5150 "rendered": "http://example.org/?p=6" 5151 5151 }, 5152 5152 "title": { … … 5162 5162 "parent": [ 5163 5163 { 5164 "href": "http://example.org/index.php?rest_route=/wp/v2/posts/ 36743"5164 "href": "http://example.org/index.php?rest_route=/wp/v2/posts/4" 5165 5165 } 5166 5166 ] … … 5170 5170 5171 5171 mockedApiResponse.autosave = { 5172 "author": 376,5172 "author": 2, 5173 5173 "date": "2017-02-14T00:00:00", 5174 5174 "date_gmt": "2017-02-14T00:00:00", 5175 "id": 36745,5175 "id": 6, 5176 5176 "modified": "2017-02-14T00:00:00", 5177 5177 "modified_gmt": "2017-02-14T00:00:00", 5178 "parent": 36743,5179 "slug": " 36743-autosave-v1",5178 "parent": 4, 5179 "slug": "4-autosave-v1", 5180 5180 "guid": { 5181 "rendered": "http://example.org/?p= 36745"5181 "rendered": "http://example.org/?p=6" 5182 5182 }, 5183 5183 "title": { … … 5194 5194 mockedApiResponse.PagesCollection = [ 5195 5195 { 5196 "id": 6,5196 "id": 7, 5197 5197 "date": "2017-02-14T00:00:00", 5198 5198 "date_gmt": "2017-02-14T00:00:00", 5199 5199 "guid": { 5200 "rendered": "http://example.org/?page_id= 6"5200 "rendered": "http://example.org/?page_id=7" 5201 5201 }, 5202 5202 "modified": "2017-02-14T00:00:00", … … 5205 5205 "status": "publish", 5206 5206 "type": "page", 5207 "link": "http://example.org/?page_id= 6",5207 "link": "http://example.org/?page_id=7", 5208 5208 "title": { 5209 5209 "rendered": "REST API Client Fixture: Page" … … 5230 5230 "self": [ 5231 5231 { 5232 "href": "http://example.org/index.php?rest_route=/wp/v2/pages/ 6"5232 "href": "http://example.org/index.php?rest_route=/wp/v2/pages/7" 5233 5233 } 5234 5234 ], … … 5246 5246 { 5247 5247 "embeddable": true, 5248 "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post= 6"5248 "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=7" 5249 5249 } 5250 5250 ], … … 5252 5252 { 5253 5253 "count": 2, 5254 "href": "http://example.org/index.php?rest_route=/wp/v2/pages/ 6/revisions"5254 "href": "http://example.org/index.php?rest_route=/wp/v2/pages/7/revisions" 5255 5255 } 5256 5256 ], 5257 5257 "predecessor-version": [ 5258 5258 { 5259 "id": 7,5260 "href": "http://example.org/index.php?rest_route=/wp/v2/pages/ 6/revisions/7"5259 "id": 9, 5260 "href": "http://example.org/index.php?rest_route=/wp/v2/pages/7/revisions/9" 5261 5261 } 5262 5262 ], 5263 5263 "wp:attachment": [ 5264 5264 { 5265 "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent= 6"5265 "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=7" 5266 5266 } 5267 5267 ], … … 5278 5278 5279 5279 mockedApiResponse.PageModel = { 5280 "id": 6,5280 "id": 7, 5281 5281 "date": "2017-02-14T00:00:00", 5282 5282 "date_gmt": "2017-02-14T00:00:00", 5283 5283 "guid": { 5284 "rendered": "http://example.org/?page_id= 6"5284 "rendered": "http://example.org/?page_id=7" 5285 5285 }, 5286 5286 "modified": "2017-02-14T00:00:00", … … 5289 5289 "status": "publish", 5290 5290 "type": "page", 5291 "link": "http://example.org/?page_id= 6",5291 "link": "http://example.org/?page_id=7", 5292 5292 "title": { 5293 5293 "rendered": "REST API Client Fixture: Page" … … 5318 5318 "date": "2017-02-14T00:00:00", 5319 5319 "date_gmt": "2017-02-14T00:00:00", 5320 "id": 7,5320 "id": 9, 5321 5321 "modified": "2017-02-14T00:00:00", 5322 5322 "modified_gmt": "2017-02-14T00:00:00", 5323 "parent": 6,5324 "slug": " 6-revision-v1",5323 "parent": 7, 5324 "slug": "7-autosave-v1", 5325 5325 "guid": { 5326 "rendered": "http://example.org/?p= 7"5326 "rendered": "http://example.org/?p=9" 5327 5327 }, 5328 5328 "title": { … … 5338 5338 "parent": [ 5339 5339 { 5340 "href": "http://example.org/index.php?rest_route=/wp/v2/pages/ 6"5340 "href": "http://example.org/index.php?rest_route=/wp/v2/pages/7" 5341 5341 } 5342 5342 ] … … 5344 5344 }, 5345 5345 { 5346 "author": 376,5346 "author": 2, 5347 5347 "date": "2017-02-14T00:00:00", 5348 5348 "date_gmt": "2017-02-14T00:00:00", 5349 "id": 36747,5349 "id": 8, 5350 5350 "modified": "2017-02-14T00:00:00", 5351 5351 "modified_gmt": "2017-02-14T00:00:00", 5352 "parent": 36746,5353 "slug": " 36746-revision-v1",5352 "parent": 7, 5353 "slug": "7-revision-v1", 5354 5354 "guid": { 5355 "rendered": "http://example.org/?p= 36747"5355 "rendered": "http://example.org/?p=8" 5356 5356 }, 5357 5357 "title": { … … 5367 5367 "parent": [ 5368 5368 { 5369 "href": "http://example.org/index.php?rest_route=/wp/v2/pages/ 36746"5369 "href": "http://example.org/index.php?rest_route=/wp/v2/pages/7" 5370 5370 } 5371 5371 ] … … 5378 5378 "date": "2017-02-14T00:00:00", 5379 5379 "date_gmt": "2017-02-14T00:00:00", 5380 "id": 7,5380 "id": 8, 5381 5381 "modified": "2017-02-14T00:00:00", 5382 5382 "modified_gmt": "2017-02-14T00:00:00", 5383 "parent": 6,5384 "slug": " 6-revision-v1",5383 "parent": 7, 5384 "slug": "7-revision-v1", 5385 5385 "guid": { 5386 "rendered": "http://example.org/?p= 7"5386 "rendered": "http://example.org/?p=8" 5387 5387 }, 5388 5388 "title": { … … 5399 5399 mockedApiResponse.pageAutosaves = [ 5400 5400 { 5401 "author": 376,5401 "author": 2, 5402 5402 "date": "2017-02-14T00:00:00", 5403 5403 "date_gmt": "2017-02-14T00:00:00", 5404 "id": 36748,5404 "id": 9, 5405 5405 "modified": "2017-02-14T00:00:00", 5406 5406 "modified_gmt": "2017-02-14T00:00:00", 5407 "parent": 36746,5408 "slug": " 36746-autosave-v1",5407 "parent": 7, 5408 "slug": "7-autosave-v1", 5409 5409 "guid": { 5410 "rendered": "http://example.org/?p= 36748"5410 "rendered": "http://example.org/?p=9" 5411 5411 }, 5412 5412 "title": { … … 5422 5422 "parent": [ 5423 5423 { 5424 "href": "http://example.org/index.php?rest_route=/wp/v2/pages/ 36746"5424 "href": "http://example.org/index.php?rest_route=/wp/v2/pages/7" 5425 5425 } 5426 5426 ] … … 5430 5430 5431 5431 mockedApiResponse.pageAutosave = { 5432 "author": 376,5432 "author": 2, 5433 5433 "date": "2017-02-14T00:00:00", 5434 5434 "date_gmt": "2017-02-14T00:00:00", 5435 "id": 36748,5435 "id": 9, 5436 5436 "modified": "2017-02-14T00:00:00", 5437 5437 "modified_gmt": "2017-02-14T00:00:00", 5438 "parent": 36746,5439 "slug": " 36746-autosave-v1",5438 "parent": 7, 5439 "slug": "7-autosave-v1", 5440 5440 "guid": { 5441 "rendered": "http://example.org/?p= 36748"5441 "rendered": "http://example.org/?p=9" 5442 5442 }, 5443 5443 "title": { … … 5454 5454 mockedApiResponse.MediaCollection = [ 5455 5455 { 5456 "id": 8,5456 "id": 10, 5457 5457 "date": "2017-02-14T00:00:00", 5458 5458 "date_gmt": "2017-02-14T00:00:00", 5459 5459 "guid": { 5460 "rendered": "http://example.org/?attachment_id= 8"5460 "rendered": "http://example.org/?attachment_id=10" 5461 5461 }, 5462 5462 "modified": "2017-02-14T00:00:00", … … 5465 5465 "status": "inherit", 5466 5466 "type": "attachment", 5467 "link": "http://example.org/?attachment_id= 8",5467 "link": "http://example.org/?attachment_id=10", 5468 5468 "title": { 5469 5469 "rendered": "REST API Client Fixture: Attachment" … … 5491 5491 "self": [ 5492 5492 { 5493 "href": "http://example.org/index.php?rest_route=/wp/v2/media/ 8"5493 "href": "http://example.org/index.php?rest_route=/wp/v2/media/10" 5494 5494 } 5495 5495 ], … … 5507 5507 { 5508 5508 "embeddable": true, 5509 "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post= 8"5509 "href": "http://example.org/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=10" 5510 5510 } 5511 5511 ] … … 5515 5515 5516 5516 mockedApiResponse.MediaModel = { 5517 "id": 8,5517 "id": 10, 5518 5518 "date": "2017-02-14T00:00:00", 5519 5519 "date_gmt": "2017-02-14T00:00:00", 5520 5520 "guid": { 5521 "rendered": "http://example.org/?attachment_id= 8"5521 "rendered": "http://example.org/?attachment_id=10" 5522 5522 }, 5523 5523 "modified": "2017-02-14T00:00:00", … … 5526 5526 "status": "inherit", 5527 5527 "type": "attachment", 5528 "link": "http://example.org/?attachment_id= 8",5528 "link": "http://example.org/?attachment_id=10", 5529 5529 "title": { 5530 5530 "rendered": "REST API Client Fixture: Attachment"
Note: See TracChangeset
for help on using the changeset viewer.