From 23395782d57eaeea877c6535ac0d30a7894b1877 Mon Sep 17 00:00:00 2001 From: Roel Bruggink Date: Wed, 12 Apr 2017 18:52:48 +0200 Subject: [PATCH 01/11] Add 'layouts' data to @types/[type] for use in a display menu --- src/plone/restapi/types/utils.py | 1 + 1 file changed, 1 insertion(+) diff --git a/src/plone/restapi/types/utils.py b/src/plone/restapi/types/utils.py index 9ae191bcd2..1e7b5c9172 100644 --- a/src/plone/restapi/types/utils.py +++ b/src/plone/restapi/types/utils.py @@ -155,6 +155,7 @@ def get_jsonschema_for_fti(fti, context, request, excluded_fields=None): 'properties': properties, 'required': required, 'fieldsets': get_fieldset_infos(fieldsets), + 'layouts': getattr(fti, 'view_methods', []), } From 6a10e6dd449b5d588bf5cedfb01bf2b30b978416 Mon Sep 17 00:00:00 2001 From: Roel Bruggink Date: Wed, 12 Apr 2017 19:03:10 +0200 Subject: [PATCH 02/11] Support settings layout for DX and AT --- src/plone/restapi/deserializer/atcontent.py | 4 ++++ src/plone/restapi/deserializer/dxcontent.py | 4 ++++ 2 files changed, 8 insertions(+) diff --git a/src/plone/restapi/deserializer/atcontent.py b/src/plone/restapi/deserializer/atcontent.py index f7f05eb3ee..784bf197a3 100644 --- a/src/plone/restapi/deserializer/atcontent.py +++ b/src/plone/restapi/deserializer/atcontent.py @@ -59,6 +59,10 @@ def __call__(self, validate_all=False): 'error': 'ValidationError'} for f, e in errors.items()] raise BadRequest(errors) + if 'layout' in data: + layout = data['layout'] + self.context.setLayout(layout) + if obj.checkCreationFlag(): obj.unmarkCreationFlag() notify(ObjectInitializedEvent(obj)) diff --git a/src/plone/restapi/deserializer/dxcontent.py b/src/plone/restapi/deserializer/dxcontent.py index 0ed09efcbf..aaaf1725a4 100644 --- a/src/plone/restapi/deserializer/dxcontent.py +++ b/src/plone/restapi/deserializer/dxcontent.py @@ -105,6 +105,10 @@ def __call__(self, validate_all=False): if errors: raise BadRequest(errors) + if 'layout' in data: + layout = data['layout'] + self.context.setLayout(layout) + if modified: notify(ObjectModifiedEvent(self.context)) From 5f4d2d96b68ab19a17228504b32c74cf545f3f47 Mon Sep 17 00:00:00 2001 From: Roel Bruggink Date: Wed, 12 Apr 2017 19:04:30 +0200 Subject: [PATCH 03/11] Support gettting layout for DX and AT content --- src/plone/restapi/serializer/atcontent.py | 1 + src/plone/restapi/serializer/dxcontent.py | 1 + 2 files changed, 2 insertions(+) diff --git a/src/plone/restapi/serializer/atcontent.py b/src/plone/restapi/serializer/atcontent.py index 430cc132f3..3a41371548 100644 --- a/src/plone/restapi/serializer/atcontent.py +++ b/src/plone/restapi/serializer/atcontent.py @@ -35,6 +35,7 @@ def __call__(self): 'parent': parent_summary, 'review_state': self._get_workflow_state(), 'UID': self.context.UID(), + 'layout': self.context.getLayout(), } obj = self.context diff --git a/src/plone/restapi/serializer/dxcontent.py b/src/plone/restapi/serializer/dxcontent.py index 82d5645858..d2f37f3463 100644 --- a/src/plone/restapi/serializer/dxcontent.py +++ b/src/plone/restapi/serializer/dxcontent.py @@ -47,6 +47,7 @@ def __call__(self): 'modified': json_compatible(self.context.modified()), 'review_state': self._get_workflow_state(), 'UID': self.context.UID(), + 'layout': self.context.getLayout(), } for schema in iterSchemata(self.context): From 0fbf92953956ac4c474e17c70da59dd9b32deda8 Mon Sep 17 00:00:00 2001 From: Roel Bruggink Date: Thu, 13 Apr 2017 09:33:01 +0200 Subject: [PATCH 04/11] Don't do a complexity check in the DX serializer. It is complex. --- src/plone/restapi/deserializer/dxcontent.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/plone/restapi/deserializer/dxcontent.py b/src/plone/restapi/deserializer/dxcontent.py index aaaf1725a4..9f67d6c5da 100644 --- a/src/plone/restapi/deserializer/dxcontent.py +++ b/src/plone/restapi/deserializer/dxcontent.py @@ -32,7 +32,7 @@ def __init__(self, context, request): self.sm = getSecurityManager() self.permission_cache = {} - def __call__(self, validate_all=False): + def __call__(self, validate_all=False): # noqa: ignore=C901 data = json_body(self.request) modified = False From 31803e00581ecf7fde2c67944760a54f1f703644 Mon Sep 17 00:00:00 2001 From: Roel Bruggink Date: Mon, 17 Apr 2017 09:25:53 +0200 Subject: [PATCH 05/11] Add test --- docs/source/_json/collection.resp | 11 ++- docs/source/_json/content_get.resp | 1 + docs/source/_json/content_post.resp | 1 + docs/source/_json/document.resp | 4 +- docs/source/_json/event.resp | 13 ++-- docs/source/_json/file.resp | 4 +- docs/source/_json/folder.resp | 4 +- docs/source/_json/image.resp | 4 +- docs/source/_json/link.resp | 4 +- docs/source/_json/newsitem.resp | 4 +- docs/source/_json/types_document.resp | 11 ++- docs/source/_json/vocabularies.resp | 76 +++++++++---------- src/plone/restapi/deserializer/atcontent.py | 10 ++- src/plone/restapi/deserializer/dxcontent.py | 2 + .../tests/test_atcontent_deserializer.py | 6 ++ .../tests/test_atcontent_serializer.py | 6 ++ .../tests/test_dxcontent_deserializer.py | 6 ++ .../tests/test_dxcontent_serializer.py | 6 ++ src/plone/restapi/tests/test_types.py | 1 + 19 files changed, 105 insertions(+), 69 deletions(-) diff --git a/docs/source/_json/collection.resp b/docs/source/_json/collection.resp index 39ac92c9ce..13f178bf7e 100644 --- a/docs/source/_json/collection.resp +++ b/docs/source/_json/collection.resp @@ -9,10 +9,14 @@ Content-Type: application/json "contributors": [], "created": "2016-01-21T08:14:48+00:00", "creators": [ - "test_user_1_", - "admin" + "test_user_1_" + ], + "customViewFields": [ + "Title", + "Creator", + "Type", + "ModificationDate" ], - "customViewFields": [], "description": "This is a collection with two documents", "effective": null, "exclude_from_nav": false, @@ -44,6 +48,7 @@ Content-Type: application/json ], "items_total": 3, "language": "", + "layout": "listing_view", "limit": 1000, "modified": "2016-01-21T08:24:11+00:00", "parent": { diff --git a/docs/source/_json/content_get.resp b/docs/source/_json/content_get.resp index ead081b2ef..a9d3d5d727 100644 --- a/docs/source/_json/content_get.resp +++ b/docs/source/_json/content_get.resp @@ -18,6 +18,7 @@ Content-Type: application/json "expires": null, "id": "my-document", "language": "", + "layout": "document_view", "modified": "2016-10-21T19:00:00+00:00", "parent": { "@id": "http://localhost:55001/plone/folder", diff --git a/docs/source/_json/content_post.resp b/docs/source/_json/content_post.resp index ecee4712b7..4d466e03d7 100644 --- a/docs/source/_json/content_post.resp +++ b/docs/source/_json/content_post.resp @@ -19,6 +19,7 @@ Location: http://localhost:55001/plone/folder/my-document "expires": null, "id": "my-document", "language": "", + "layout": "document_view", "modified": "2016-10-21T19:00:00+00:00", "parent": { "@id": "http://localhost:55001/plone/folder", diff --git a/docs/source/_json/document.resp b/docs/source/_json/document.resp index c559fbb8b2..2edf542014 100644 --- a/docs/source/_json/document.resp +++ b/docs/source/_json/document.resp @@ -10,8 +10,7 @@ Content-Type: application/json "contributors": [], "created": "2016-01-21T01:14:48+00:00", "creators": [ - "test_user_1_", - "admin" + "test_user_1_" ], "description": "Congratulations! You have successfully installed Plone.", "effective": null, @@ -19,6 +18,7 @@ Content-Type: application/json "expires": null, "id": "front-page", "language": "", + "layout": "document_view", "modified": "2016-01-21T01:24:11+00:00", "parent": { "@id": "http://localhost:55001/plone", diff --git a/docs/source/_json/event.resp b/docs/source/_json/event.resp index 3f0d30ff35..7920b007a4 100644 --- a/docs/source/_json/event.resp +++ b/docs/source/_json/event.resp @@ -14,20 +14,20 @@ Content-Type: application/json "contributors": [], "created": "2016-01-21T03:14:48+00:00", "creators": [ - "test_user_1_", - "admin" + "test_user_1_" ], "description": "This is an event", "effective": null, - "end": null, + "end": "2013-01-01T12:00:00", "event_url": null, "exclude_from_nav": false, "expires": null, "id": "event", "language": "", + "layout": "event_view", "location": null, "modified": "2016-01-21T03:24:11+00:00", - "open_end": null, + "open_end": false, "parent": { "@id": "http://localhost:55001/plone", "@type": "Plone Site", @@ -42,11 +42,10 @@ Content-Type: application/json "@id": "http://localhost:55001/plone/event/@sharing", "title": "Sharing" }, - "start": null, + "start": "2013-01-01T10:00:00", "subjects": [], "sync_uid": null, "text": null, - "timezone": null, "title": "Event", - "whole_day": null + "whole_day": false } \ No newline at end of file diff --git a/docs/source/_json/file.resp b/docs/source/_json/file.resp index 4a963ddba8..f3de1cf295 100644 --- a/docs/source/_json/file.resp +++ b/docs/source/_json/file.resp @@ -9,8 +9,7 @@ Content-Type: application/json "contributors": [], "created": "2016-01-21T05:14:48+00:00", "creators": [ - "test_user_1_", - "admin" + "test_user_1_" ], "description": "This is a file", "effective": null, @@ -24,6 +23,7 @@ Content-Type: application/json }, "id": "file", "language": "", + "layout": "file_view", "modified": "2016-01-21T05:24:11+00:00", "parent": { "@id": "http://localhost:55001/plone", diff --git a/docs/source/_json/folder.resp b/docs/source/_json/folder.resp index 168592757f..5155266835 100644 --- a/docs/source/_json/folder.resp +++ b/docs/source/_json/folder.resp @@ -9,8 +9,7 @@ Content-Type: application/json "contributors": [], "created": "2016-01-21T07:14:48+00:00", "creators": [ - "test_user_1_", - "admin" + "test_user_1_" ], "description": "This is a folder with two documents", "effective": null, @@ -35,6 +34,7 @@ Content-Type: application/json ], "items_total": 2, "language": "", + "layout": "listing_view", "modified": "2016-01-21T07:24:11+00:00", "nextPreviousEnabled": false, "parent": { diff --git a/docs/source/_json/image.resp b/docs/source/_json/image.resp index 924d7f9eb7..009b544908 100644 --- a/docs/source/_json/image.resp +++ b/docs/source/_json/image.resp @@ -9,8 +9,7 @@ Content-Type: application/json "contributors": [], "created": "2016-01-21T06:14:48+00:00", "creators": [ - "test_user_1_", - "admin" + "test_user_1_" ], "description": "This is an image", "effective": null, @@ -63,6 +62,7 @@ Content-Type: application/json "width": 215 }, "language": "", + "layout": "image_view", "modified": "2016-01-21T06:24:11+00:00", "parent": { "@id": "http://localhost:55001/plone", diff --git a/docs/source/_json/link.resp b/docs/source/_json/link.resp index 0807699ecf..02cbf4d299 100644 --- a/docs/source/_json/link.resp +++ b/docs/source/_json/link.resp @@ -10,8 +10,7 @@ Content-Type: application/json "contributors": [], "created": "2016-01-21T04:14:48+00:00", "creators": [ - "test_user_1_", - "admin" + "test_user_1_" ], "description": "This is a link", "effective": null, @@ -19,6 +18,7 @@ Content-Type: application/json "expires": null, "id": "link", "language": "", + "layout": "link_redirect_view", "modified": "2016-01-21T04:24:11+00:00", "parent": { "@id": "http://localhost:55001/plone", diff --git a/docs/source/_json/newsitem.resp b/docs/source/_json/newsitem.resp index 093ab94d04..da5259a3e2 100644 --- a/docs/source/_json/newsitem.resp +++ b/docs/source/_json/newsitem.resp @@ -10,8 +10,7 @@ Content-Type: application/json "contributors": [], "created": "2016-01-21T02:14:48+00:00", "creators": [ - "test_user_1_", - "admin" + "test_user_1_" ], "description": "This is a news item", "effective": null, @@ -65,6 +64,7 @@ Content-Type: application/json }, "image_caption": "This is an image caption.", "language": "", + "layout": "newsitem_view", "modified": "2016-01-21T02:24:11+00:00", "parent": { "@id": "http://localhost:55001/plone", diff --git a/docs/source/_json/types_document.resp b/docs/source/_json/types_document.resp index bc646053b0..e0b4928a5d 100644 --- a/docs/source/_json/types_document.resp +++ b/docs/source/_json/types_document.resp @@ -17,6 +17,7 @@ Content-Type: application/json+schema "fields": [ "allow_discussion", "exclude_from_nav", + "id", "table_of_contents" ], "id": "settings", @@ -49,6 +50,9 @@ Content-Type: application/json+schema "title": "Ownership" } ], + "layouts": [ + "document_view" + ], "properties": { "allow_discussion": { "choices": [ @@ -122,11 +126,16 @@ Content-Type: application/json+schema "type": "boolean" }, "expires": { - "description": "When this date is reached, the content will nolonger be visible in listings and searches.", + "description": "When this date is reached, the content will no longer be visible in listings and searches.", "title": "Expiration Date", "type": "string", "widget": "datetime" }, + "id": { + "description": "This name will be displayed in the URL.", + "title": "Short name", + "type": "string" + }, "language": { "choices": [ [ diff --git a/docs/source/_json/vocabularies.resp b/docs/source/_json/vocabularies.resp index c51f67f677..f981d65a37 100644 --- a/docs/source/_json/vocabularies.resp +++ b/docs/source/_json/vocabularies.resp @@ -3,8 +3,8 @@ Content-Type: application/json [ { - "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.Skins", - "title": "plone.app.vocabularies.Skins" + "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.ReallyUserFriendlyTypes", + "title": "plone.app.vocabularies.ReallyUserFriendlyTypes" }, { "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.AvailableContentLanguages", @@ -15,8 +15,12 @@ Content-Type: application/json "title": "plone.schemaeditor.VocabulariesVocabulary" }, { - "@id": "http://localhost:55001/plone/@vocabularies/plone.app.event.Weekdays", - "title": "plone.app.event.Weekdays" + "@id": "http://localhost:55001/plone/@vocabularies/plone.app.users.group_ids", + "title": "plone.app.users.group_ids" + }, + { + "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.Permissions", + "title": "plone.app.vocabularies.Permissions" }, { "@id": "http://localhost:55001/plone/@vocabularies/plone.contentrules.events", @@ -35,8 +39,16 @@ Content-Type: application/json "title": "plone.app.vocabularies.ImagesScales" }, { - "@id": "http://localhost:55001/plone/@vocabularies/wicked.vocabularies.BaseConfigurationsOptions", - "title": "wicked.vocabularies.BaseConfigurationsOptions" + "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.PortalActionCategories", + "title": "plone.app.vocabularies.PortalActionCategories" + }, + { + "@id": "http://localhost:55001/plone/@vocabularies/plone.app.multilingual.vocabularies.AllAvailableLanguageVocabulary", + "title": "plone.app.multilingual.vocabularies.AllAvailableLanguageVocabulary" + }, + { + "@id": "http://localhost:55001/plone/@vocabularies/plone.app.multilingual.RootCatalog", + "title": "plone.app.multilingual.RootCatalog" }, { "@id": "http://localhost:55001/plone/@vocabularies/plone.app.content.ValidAddableTypes", @@ -51,8 +63,8 @@ Content-Type: application/json "title": "plone.app.vocabularies.AvailableEditors" }, { - "@id": "http://localhost:55001/plone/@vocabularies/cmf.calendar.AvailableEventTypes", - "title": "cmf.calendar.AvailableEventTypes" + "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.Roles", + "title": "plone.app.vocabularies.Roles" }, { "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.SupportedContentLanguages", @@ -78,10 +90,6 @@ Content-Type: application/json "@id": "http://localhost:55001/plone/@vocabularies/plone.app.discussion.vocabularies.TextTransformVocabulary", "title": "plone.app.discussion.vocabularies.TextTransformVocabulary" }, - { - "@id": "http://localhost:55001/plone/@vocabularies/wicked.vocabularies.CacheConfigurationsOptions", - "title": "wicked.vocabularies.CacheConfigurationsOptions" - }, { "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.Month", "title": "plone.app.vocabularies.Month" @@ -102,26 +110,14 @@ Content-Type: application/json "@id": "http://localhost:55001/plone/@vocabularies/plone.app.contenttypes.metadatafields", "title": "plone.app.contenttypes.metadatafields" }, - { - "@id": "http://localhost:55001/plone/@vocabularies/Behaviors", - "title": "Behaviors" - }, { "@id": "http://localhost:55001/plone/@vocabularies/Interfaces", "title": "Interfaces" }, - { - "@id": "http://localhost:55001/plone/@vocabularies/plone.app.event.Timezones", - "title": "plone.app.event.Timezones" - }, { "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.WorkflowStates", "title": "plone.app.vocabularies.WorkflowStates" }, - { - "@id": "http://localhost:55001/plone/@vocabularies/plone.app.event.EventTypes", - "title": "plone.app.event.EventTypes" - }, { "@id": "http://localhost:55001/plone/@vocabularies/Fields", "title": "Fields" @@ -130,17 +126,21 @@ Content-Type: application/json "@id": "http://localhost:55001/plone/@vocabularies/plone.app.contenttypes.migration.atctypes", "title": "plone.app.contenttypes.migration.atctypes" }, + { + "@id": "http://localhost:55001/plone/@vocabularies/plone.app.multilingual.vocabularies.AllContentLanguageVocabulary", + "title": "plone.app.multilingual.vocabularies.AllContentLanguageVocabulary" + }, { "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.SyndicatableFeedItems", "title": "plone.app.vocabularies.SyndicatableFeedItems" }, { - "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.Users", - "title": "plone.app.vocabularies.Users" + "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.AllowedContentTypes", + "title": "plone.app.vocabularies.AllowedContentTypes" }, { - "@id": "http://localhost:55001/plone/@vocabularies/plone.app.event.AvailableTimezones", - "title": "plone.app.event.AvailableTimezones" + "@id": "http://localhost:55001/plone/@vocabularies/plone.app.users.user_registration_fields", + "title": "plone.app.users.user_registration_fields" }, { "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.WeekdaysAbbr", @@ -155,8 +155,8 @@ Content-Type: application/json "title": "plone.app.vocabularies.PortalTypes" }, { - "@id": "http://localhost:55001/plone/@vocabularies/plone.app.controlpanel.WickedPortalTypes", - "title": "plone.app.controlpanel.WickedPortalTypes" + "@id": "http://localhost:55001/plone/@vocabularies/Behaviors", + "title": "Behaviors" }, { "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.SyndicationFeedTypes", @@ -171,8 +171,8 @@ Content-Type: application/json "title": "plone.formwidget.relations.cmfcontentsearch" }, { - "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.ReallyUserFriendlyTypes", - "title": "plone.app.vocabularies.ReallyUserFriendlyTypes" + "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.Skins", + "title": "plone.app.vocabularies.Skins" }, { "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.AllowableContentTypes", @@ -195,19 +195,11 @@ Content-Type: application/json "title": "plone.app.contenttypes.migration.changed_base_classes" }, { - "@id": "http://localhost:55001/plone/@vocabularies/Group Ids", - "title": "Group Ids" + "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.Users", + "title": "plone.app.vocabularies.Users" }, { "@id": "http://localhost:55001/plone/@vocabularies/plone.app.event.SynchronizationStrategies", "title": "plone.app.event.SynchronizationStrategies" - }, - { - "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.AllowedContentTypes", - "title": "plone.app.vocabularies.AllowedContentTypes" - }, - { - "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.Roles", - "title": "plone.app.vocabularies.Roles" } ] \ No newline at end of file diff --git a/src/plone/restapi/deserializer/atcontent.py b/src/plone/restapi/deserializer/atcontent.py index 784bf197a3..173f02acd1 100644 --- a/src/plone/restapi/deserializer/atcontent.py +++ b/src/plone/restapi/deserializer/atcontent.py @@ -59,10 +59,6 @@ def __call__(self, validate_all=False): 'error': 'ValidationError'} for f, e in errors.items()] raise BadRequest(errors) - if 'layout' in data: - layout = data['layout'] - self.context.setLayout(layout) - if obj.checkCreationFlag(): obj.unmarkCreationFlag() notify(ObjectInitializedEvent(obj)) @@ -71,6 +67,12 @@ def __call__(self, validate_all=False): notify(ObjectEditedEvent(obj)) obj.at_post_edit_script() + # We'll set the layout after the validation and and even if there + # are no other changes. + if 'layout' in data: + layout = data['layout'] + self.context.setLayout(layout) + return obj def validate(self): diff --git a/src/plone/restapi/deserializer/dxcontent.py b/src/plone/restapi/deserializer/dxcontent.py index 9f67d6c5da..90c1278979 100644 --- a/src/plone/restapi/deserializer/dxcontent.py +++ b/src/plone/restapi/deserializer/dxcontent.py @@ -105,6 +105,8 @@ def __call__(self, validate_all=False): # noqa: ignore=C901 if errors: raise BadRequest(errors) + # We'll set the layout after the validation and and even if there + # are no other changes. if 'layout' in data: layout = data['layout'] self.context.setLayout(layout) diff --git a/src/plone/restapi/tests/test_atcontent_deserializer.py b/src/plone/restapi/tests/test_atcontent_deserializer.py index 409ac3ee3c..8c4d428a36 100644 --- a/src/plone/restapi/tests/test_atcontent_deserializer.py +++ b/src/plone/restapi/tests/test_atcontent_deserializer.py @@ -132,6 +132,12 @@ def __call__(self, request): self.assertEquals( 'pre_validation_error', cm.exception.message[0]['message']) + def test_set_layout(self): + current_layout = self.doc1.getLayout() + self.assertNotEquals(current_layout, "my_new_layout") + self.deserialize(body='{"layout": "my_new_layout"}') + self.assertEquals('my_new_layout', self.doc1.getLayout()) + class TestValidationRequest(unittest.TestCase): diff --git a/src/plone/restapi/tests/test_atcontent_serializer.py b/src/plone/restapi/tests/test_atcontent_serializer.py index 76ddd9d81c..143dde64fa 100644 --- a/src/plone/restapi/tests/test_atcontent_serializer.py +++ b/src/plone/restapi/tests/test_atcontent_serializer.py @@ -143,3 +143,9 @@ def test_serializer_orders_folder_items_by_get_object_position_in_parent(self): 'review_state': 'private' }, ]) + + def test_get_layout(self): + current_layout = self.doc1.getLayout() + obj = self.serialize(self.doc1) + self.assertIn('layout', obj) + self.assertEquals(current_layout, obj['layout']) diff --git a/src/plone/restapi/tests/test_dxcontent_deserializer.py b/src/plone/restapi/tests/test_dxcontent_deserializer.py index 45fd157417..2f67121ea1 100644 --- a/src/plone/restapi/tests/test_dxcontent_deserializer.py +++ b/src/plone/restapi/tests/test_dxcontent_deserializer.py @@ -127,3 +127,9 @@ def test_deserializer_passes_validation_with_not_provided_defaults(self): self.portal.doc1.test_default_value_field) self.assertEquals(u'DefaultFactory', self.portal.doc1.test_default_factory_field) + + def test_set_layout(self): + current_layout = self.portal.doc1.getLayout() + self.assertNotEquals(current_layout, "my_new_layout") + self.deserialize(body='{"layout": "my_new_layout"}') + self.assertEquals('my_new_layout', self.portal.doc1.getLayout()) diff --git a/src/plone/restapi/tests/test_dxcontent_serializer.py b/src/plone/restapi/tests/test_dxcontent_serializer.py index 506868698b..ad695176c8 100644 --- a/src/plone/restapi/tests/test_dxcontent_serializer.py +++ b/src/plone/restapi/tests/test_dxcontent_serializer.py @@ -116,3 +116,9 @@ def test_serializer_includes_field_with_read_permission(self): obj = self.serialize() self.assertIn(u'test_read_permission_field', obj) self.assertEqual(u'Secret Stuff', obj[u'test_read_permission_field']) + + def test_get_layout(self): + current_layout = self.portal.doc1.getLayout() + obj = self.serialize() + self.assertIn('layout', obj) + self.assertEquals(current_layout, obj['layout']) diff --git a/src/plone/restapi/tests/test_types.py b/src/plone/restapi/tests/test_types.py index f4d20f6191..d7dd7053b3 100644 --- a/src/plone/restapi/tests/test_types.py +++ b/src/plone/restapi/tests/test_types.py @@ -98,6 +98,7 @@ def test_get_jsonschema_for_fti(self): self.assertIn('title', jsonschema['required']) self.assertEquals('default', jsonschema['fieldsets'][0]['id']) self.assertIn('title', jsonschema['fieldsets'][0]['fields']) + self.assertIn('layouts', jsonschema) jsonschema = get_jsonschema_for_fti( ttool['Document'], From 65eb63ea36c1a889570dfcdaba36124b5d1f1b01 Mon Sep 17 00:00:00 2001 From: Roel Bruggink Date: Mon, 17 Apr 2017 09:29:20 +0200 Subject: [PATCH 06/11] Changelog entry --- CHANGES.rst | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/CHANGES.rst b/CHANGES.rst index 698ef41f5f..edf747b9e7 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -13,6 +13,12 @@ Bugfixes: - Don't fetch unnecessary PasswordResetTool in Plone 5.1 [tomgross] +New Features: +- Support setting/modifying 'layout' on DX and AT content endpoints + [jaroel] +- Support getting the defined layouts on the root types endpoint + [jaroel] + 1.0a12 (2017-04-03) ------------------- From afd052f3033a0b92aab65f7134ee8e206986bdc6 Mon Sep 17 00:00:00 2001 From: Roel Bruggink Date: Mon, 17 Apr 2017 09:48:56 +0200 Subject: [PATCH 07/11] Revert unwanted response changes --- docs/source/_json/collection.resp | 110 ++++++----- docs/source/_json/content_get.resp | 60 +++--- docs/source/_json/content_post.resp | 56 +++--- docs/source/_json/document.resp | 65 +++---- docs/source/_json/event.resp | 86 +++++---- docs/source/_json/file.resp | 63 +++--- docs/source/_json/folder.resp | 79 ++++---- docs/source/_json/image.resp | 109 +++++------ docs/source/_json/link.resp | 57 +++--- docs/source/_json/newsitem.resp | 119 ++++++------ docs/source/_json/types_document.resp | 264 +++++++++++++------------- docs/source/_json/vocabularies.resp | 76 ++++---- 12 files changed, 575 insertions(+), 569 deletions(-) diff --git a/docs/source/_json/collection.resp b/docs/source/_json/collection.resp index 13f178bf7e..3f8be317f3 100644 --- a/docs/source/_json/collection.resp +++ b/docs/source/_json/collection.resp @@ -2,78 +2,74 @@ HTTP/1.1 200 OK Content-Type: application/json { - "@id": "http://localhost:55001/plone/collection", - "@type": "Collection", - "UID": "SomeUUID000000000000000000000002", - "allow_discussion": null, - "contributors": [], - "created": "2016-01-21T08:14:48+00:00", + "@id": "http://localhost:55001/plone/collection", + "@type": "Collection", + "UID": "SomeUUID000000000000000000000002", + "allow_discussion": null, + "contributors": [], + "created": "2016-01-21T08:14:48+00:00", "creators": [ - "test_user_1_" - ], - "customViewFields": [ - "Title", - "Creator", - "Type", - "ModificationDate" - ], - "description": "This is a collection with two documents", - "effective": null, - "exclude_from_nav": false, - "expires": null, - "id": "collection", - "item_count": 30, + "test_user_1_", + "admin" + ], + "customViewFields": [], + "description": "This is a collection with two documents", + "effective": null, + "exclude_from_nav": false, + "expires": null, + "id": "collection", + "item_count": 30, "items": [ { - "@id": "http://localhost:55001/plone/front-page", - "@type": "Document", - "description": "Congratulations! You have successfully installed Plone.", - "review_state": "private", + "@id": "http://localhost:55001/plone/front-page", + "@type": "Document", + "description": "Congratulations! You have successfully installed Plone.", + "review_state": "private", "title": "Welcome to Plone" - }, + }, { - "@id": "http://localhost:55001/plone/doc1", - "@type": "Document", - "description": "", - "review_state": "private", + "@id": "http://localhost:55001/plone/doc1", + "@type": "Document", + "description": "", + "review_state": "private", "title": "Document 1" - }, + }, { - "@id": "http://localhost:55001/plone/doc2", - "@type": "Document", - "description": "", - "review_state": "private", + "@id": "http://localhost:55001/plone/doc2", + "@type": "Document", + "description": "", + "review_state": "private", "title": "Document 2" } - ], - "items_total": 3, - "language": "", - "layout": "listing_view", - "limit": 1000, - "modified": "2016-01-21T08:24:11+00:00", + ], + "items_total": 3, + "language": "", + "layout": "listing_view", + "limit": 1000, + "modified": "2016-01-21T08:24:11+00:00", "parent": { - "@id": "http://localhost:55001/plone", - "@type": "Plone Site", - "description": "", + "@id": "http://localhost:55001/plone", + "@type": "Plone Site", + "description": "", "title": "Plone site" - }, + }, "query": [ { - "i": "portal_type", - "o": "plone.app.querystring.operation.string.is", + "i": "portal_type", + "o": "plone.app.querystring.operation.string.is", "v": "Document" } - ], - "relatedItems": [], - "review_state": "private", - "rights": "", + ], + "relatedItems": [], + "review_state": "private", + "rights": "", "sharing": { - "@id": "http://localhost:55001/plone/collection/@sharing", + "@id": "http://localhost:55001/plone/collection/@sharing", "title": "Sharing" - }, - "sort_on": null, - "sort_reversed": null, - "subjects": [], - "text": null, + }, + "sort_on": null, + "sort_reversed": null, + "subjects": [], + "text": null, "title": "My Collection" -} \ No newline at end of file +} diff --git a/docs/source/_json/content_get.resp b/docs/source/_json/content_get.resp index a9d3d5d727..a2c8037fb8 100644 --- a/docs/source/_json/content_get.resp +++ b/docs/source/_json/content_get.resp @@ -2,40 +2,40 @@ HTTP/1.1 200 OK Content-Type: application/json { - "@id": "http://localhost:55001/plone/folder/my-document", - "@type": "Document", - "UID": "SomeUUID000000000000000000000005", - "allow_discussion": null, - "changeNote": "", - "contributors": [], - "created": "2016-10-21T19:00:00+00:00", + "@id": "http://localhost:55001/plone/folder/my-document", + "@type": "Document", + "UID": "SomeUUID000000000000000000000005", + "allow_discussion": null, + "changeNote": "", + "contributors": [], + "created": "2016-10-21T19:00:00+00:00", "creators": [ "admin" - ], - "description": "", - "effective": null, - "exclude_from_nav": false, - "expires": null, - "id": "my-document", - "language": "", - "layout": "document_view", - "modified": "2016-10-21T19:00:00+00:00", + ], + "description": "", + "effective": null, + "exclude_from_nav": false, + "expires": null, + "id": "my-document", + "language": "", + "layout": "document_view", + "modified": "2016-10-21T19:00:00+00:00", "parent": { - "@id": "http://localhost:55001/plone/folder", - "@type": "Folder", - "description": "This is a folder with two documents", - "review_state": "private", + "@id": "http://localhost:55001/plone/folder", + "@type": "Folder", + "description": "This is a folder with two documents", + "review_state": "private", "title": "My Folder" - }, - "relatedItems": [], - "review_state": "private", - "rights": "", + }, + "relatedItems": [], + "review_state": "private", + "rights": "", "sharing": { - "@id": "http://localhost:55001/plone/folder/my-document/@sharing", + "@id": "http://localhost:55001/plone/folder/my-document/@sharing", "title": "Sharing" - }, - "subjects": [], - "table_of_contents": null, - "text": null, + }, + "subjects": [], + "table_of_contents": null, + "text": null, "title": "My Document" -} \ No newline at end of file +} diff --git a/docs/source/_json/content_post.resp b/docs/source/_json/content_post.resp index 4d466e03d7..93524df793 100644 --- a/docs/source/_json/content_post.resp +++ b/docs/source/_json/content_post.resp @@ -3,36 +3,36 @@ Content-Type: application/json Location: http://localhost:55001/plone/folder/my-document { - "@id": "http://localhost:55001/plone/folder/my-document", - "@type": "Document", - "UID": "SomeUUID000000000000000000000005", - "allow_discussion": null, - "changeNote": "", - "contributors": [], - "created": "2016-10-21T19:00:00+00:00", + "@id": "http://localhost:55001/plone/folder/my-document", + "@type": "Document", + "UID": "SomeUUID000000000000000000000005", + "allow_discussion": null, + "changeNote": "", + "contributors": [], + "created": "2016-10-21T19:00:00+00:00", "creators": [ "admin" - ], - "description": "", - "effective": null, - "exclude_from_nav": false, - "expires": null, - "id": "my-document", - "language": "", - "layout": "document_view", - "modified": "2016-10-21T19:00:00+00:00", + ], + "description": "", + "effective": null, + "exclude_from_nav": false, + "expires": null, + "id": "my-document", + "language": "", + "layout": "document_view", + "modified": "2016-10-21T19:00:00+00:00", "parent": { - "@id": "http://localhost:55001/plone/folder", - "@type": "Folder", - "description": "This is a folder with two documents", - "review_state": "private", + "@id": "http://localhost:55001/plone/folder", + "@type": "Folder", + "description": "This is a folder with two documents", + "review_state": "private", "title": "My Folder" - }, - "relatedItems": [], - "review_state": "private", - "rights": "", - "subjects": [], - "table_of_contents": null, - "text": null, + }, + "relatedItems": [], + "review_state": "private", + "rights": "", + "subjects": [], + "table_of_contents": null, + "text": null, "title": "My Document" -} \ No newline at end of file +} diff --git a/docs/source/_json/document.resp b/docs/source/_json/document.resp index 2edf542014..dd40c6198e 100644 --- a/docs/source/_json/document.resp +++ b/docs/source/_json/document.resp @@ -2,43 +2,44 @@ HTTP/1.1 200 OK Content-Type: application/json { - "@id": "http://localhost:55001/plone/front-page", - "@type": "Document", - "UID": "SomeUUID000000000000000000000001", - "allow_discussion": null, - "changeNote": "", - "contributors": [], - "created": "2016-01-21T01:14:48+00:00", + "@id": "http://localhost:55001/plone/front-page", + "@type": "Document", + "UID": "SomeUUID000000000000000000000001", + "allow_discussion": null, + "changeNote": "", + "contributors": [], + "created": "2016-01-21T01:14:48+00:00", "creators": [ - "test_user_1_" - ], - "description": "Congratulations! You have successfully installed Plone.", - "effective": null, - "exclude_from_nav": false, - "expires": null, - "id": "front-page", - "language": "", - "layout": "document_view", - "modified": "2016-01-21T01:24:11+00:00", + "test_user_1_", + "admin" + ], + "description": "Congratulations! You have successfully installed Plone.", + "effective": null, + "exclude_from_nav": false, + "expires": null, + "id": "front-page", + "language": "", + "layout": "document_view", + "modified": "2016-01-21T01:24:11+00:00", "parent": { - "@id": "http://localhost:55001/plone", - "@type": "Plone Site", - "description": "", + "@id": "http://localhost:55001/plone", + "@type": "Plone Site", + "description": "", "title": "Plone site" - }, - "relatedItems": [], - "review_state": "private", - "rights": "", + }, + "relatedItems": [], + "review_state": "private", + "rights": "", "sharing": { - "@id": "http://localhost:55001/plone/front-page/@sharing", + "@id": "http://localhost:55001/plone/front-page/@sharing", "title": "Sharing" - }, - "subjects": [], - "table_of_contents": null, + }, + "subjects": [], + "table_of_contents": null, "text": { - "content-type": "text/plain", - "data": "If you're seeing this instead of the web site you were expecting, the owner of this web site has just installed Plone. Do not contact the Plone Team or the Plone mailing lists about this.", + "content-type": "text/plain", + "data": "If you're seeing this instead of the web site you were expecting, the owner of this web site has just installed Plone. Do not contact the Plone Team or the Plone mailing lists about this.", "encoding": "utf-8" - }, + }, "title": "Welcome to Plone" -} \ No newline at end of file +} diff --git a/docs/source/_json/event.resp b/docs/source/_json/event.resp index 7920b007a4..1685ca4891 100644 --- a/docs/source/_json/event.resp +++ b/docs/source/_json/event.resp @@ -2,50 +2,52 @@ HTTP/1.1 200 OK Content-Type: application/json { - "@id": "http://localhost:55001/plone/event", - "@type": "Event", - "UID": "SomeUUID000000000000000000000002", - "allow_discussion": null, - "attendees": [], - "changeNote": "", - "contact_email": null, - "contact_name": null, - "contact_phone": null, - "contributors": [], - "created": "2016-01-21T03:14:48+00:00", + "@id": "http://localhost:55001/plone/event", + "@type": "Event", + "UID": "SomeUUID000000000000000000000002", + "allow_discussion": null, + "attendees": [], + "changeNote": "", + "contact_email": null, + "contact_name": null, + "contact_phone": null, + "contributors": [], + "created": "2016-01-21T03:14:48+00:00", "creators": [ - "test_user_1_" - ], - "description": "This is an event", - "effective": null, - "end": "2013-01-01T12:00:00", - "event_url": null, - "exclude_from_nav": false, - "expires": null, - "id": "event", - "language": "", - "layout": "event_view", - "location": null, - "modified": "2016-01-21T03:24:11+00:00", - "open_end": false, + "test_user_1_", + "admin" + ], + "description": "This is an event", + "effective": null, + "end": null, + "event_url": null, + "exclude_from_nav": false, + "expires": null, + "id": "event", + "language": "", + "layout": "event_view", + "location": null, + "modified": "2016-01-21T03:24:11+00:00", + "open_end": null, "parent": { - "@id": "http://localhost:55001/plone", - "@type": "Plone Site", - "description": "", + "@id": "http://localhost:55001/plone", + "@type": "Plone Site", + "description": "", "title": "Plone site" - }, - "recurrence": null, - "relatedItems": [], - "review_state": "private", - "rights": "", + }, + "recurrence": null, + "relatedItems": [], + "review_state": "private", + "rights": "", "sharing": { - "@id": "http://localhost:55001/plone/event/@sharing", + "@id": "http://localhost:55001/plone/event/@sharing", "title": "Sharing" - }, - "start": "2013-01-01T10:00:00", - "subjects": [], - "sync_uid": null, - "text": null, - "title": "Event", - "whole_day": false -} \ No newline at end of file + }, + "start": null, + "subjects": [], + "sync_uid": null, + "text": null, + "timezone": null, + "title": "Event", + "whole_day": null +} diff --git a/docs/source/_json/file.resp b/docs/source/_json/file.resp index f3de1cf295..21933f6537 100644 --- a/docs/source/_json/file.resp +++ b/docs/source/_json/file.resp @@ -2,42 +2,43 @@ HTTP/1.1 200 OK Content-Type: application/json { - "@id": "http://localhost:55001/plone/file", - "@type": "File", - "UID": "SomeUUID000000000000000000000002", - "allow_discussion": null, - "contributors": [], - "created": "2016-01-21T05:14:48+00:00", + "@id": "http://localhost:55001/plone/file", + "@type": "File", + "UID": "SomeUUID000000000000000000000002", + "allow_discussion": null, + "contributors": [], + "created": "2016-01-21T05:14:48+00:00", "creators": [ - "test_user_1_" - ], - "description": "This is a file", - "effective": null, - "exclude_from_nav": false, - "expires": null, + "test_user_1_", + "admin" + ], + "description": "This is a file", + "effective": null, + "exclude_from_nav": false, + "expires": null, "file": { - "content-type": "application/pdf", - "download": "http://localhost:55001/plone/file/@@download/file", - "filename": "file.pdf", + "content-type": "application/pdf", + "download": "http://localhost:55001/plone/file/@@download/file", + "filename": "file.pdf", "size": 74429 - }, - "id": "file", - "language": "", - "layout": "file_view", - "modified": "2016-01-21T05:24:11+00:00", + }, + "id": "file", + "language": "", + "layout": "file_view", + "modified": "2016-01-21T05:24:11+00:00", "parent": { - "@id": "http://localhost:55001/plone", - "@type": "Plone Site", - "description": "", + "@id": "http://localhost:55001/plone", + "@type": "Plone Site", + "description": "", "title": "Plone site" - }, - "relatedItems": [], - "review_state": null, - "rights": "", + }, + "relatedItems": [], + "review_state": null, + "rights": "", "sharing": { - "@id": "http://localhost:55001/plone/file/@sharing", + "@id": "http://localhost:55001/plone/file/@sharing", "title": "Sharing" - }, - "subjects": [], + }, + "subjects": [], "title": "My File" -} \ No newline at end of file +} diff --git a/docs/source/_json/folder.resp b/docs/source/_json/folder.resp index 5155266835..a4a38b8825 100644 --- a/docs/source/_json/folder.resp +++ b/docs/source/_json/folder.resp @@ -2,54 +2,55 @@ HTTP/1.1 200 OK Content-Type: application/json { - "@id": "http://localhost:55001/plone/folder", - "@type": "Folder", - "UID": "SomeUUID000000000000000000000002", - "allow_discussion": null, - "contributors": [], - "created": "2016-01-21T07:14:48+00:00", + "@id": "http://localhost:55001/plone/folder", + "@type": "Folder", + "UID": "SomeUUID000000000000000000000002", + "allow_discussion": null, + "contributors": [], + "created": "2016-01-21T07:14:48+00:00", "creators": [ - "test_user_1_" - ], - "description": "This is a folder with two documents", - "effective": null, - "exclude_from_nav": false, - "expires": null, - "id": "folder", + "test_user_1_", + "admin" + ], + "description": "This is a folder with two documents", + "effective": null, + "exclude_from_nav": false, + "expires": null, + "id": "folder", "items": [ { - "@id": "http://localhost:55001/plone/folder/doc1", - "@type": "Document", - "description": "", - "review_state": "private", + "@id": "http://localhost:55001/plone/folder/doc1", + "@type": "Document", + "description": "", + "review_state": "private", "title": "A document within a folder" - }, + }, { - "@id": "http://localhost:55001/plone/folder/doc2", - "@type": "Document", - "description": "", - "review_state": "private", + "@id": "http://localhost:55001/plone/folder/doc2", + "@type": "Document", + "description": "", + "review_state": "private", "title": "A document within a folder" } - ], - "items_total": 2, - "language": "", - "layout": "listing_view", - "modified": "2016-01-21T07:24:11+00:00", - "nextPreviousEnabled": false, + ], + "items_total": 2, + "language": "", + "layout": "listing_view", + "modified": "2016-01-21T07:24:11+00:00", + "nextPreviousEnabled": false, "parent": { - "@id": "http://localhost:55001/plone", - "@type": "Plone Site", - "description": "", + "@id": "http://localhost:55001/plone", + "@type": "Plone Site", + "description": "", "title": "Plone site" - }, - "relatedItems": [], - "review_state": "private", - "rights": "", + }, + "relatedItems": [], + "review_state": "private", + "rights": "", "sharing": { - "@id": "http://localhost:55001/plone/folder/@sharing", + "@id": "http://localhost:55001/plone/folder/@sharing", "title": "Sharing" - }, - "subjects": [], + }, + "subjects": [], "title": "My Folder" -} \ No newline at end of file +} diff --git a/docs/source/_json/image.resp b/docs/source/_json/image.resp index 009b544908..19134a9b61 100644 --- a/docs/source/_json/image.resp +++ b/docs/source/_json/image.resp @@ -2,81 +2,82 @@ HTTP/1.1 200 OK Content-Type: application/json { - "@id": "http://localhost:55001/plone/image", - "@type": "Image", - "UID": "SomeUUID000000000000000000000002", - "allow_discussion": null, - "contributors": [], - "created": "2016-01-21T06:14:48+00:00", + "@id": "http://localhost:55001/plone/image", + "@type": "Image", + "UID": "SomeUUID000000000000000000000002", + "allow_discussion": null, + "contributors": [], + "created": "2016-01-21T06:14:48+00:00", "creators": [ - "test_user_1_" - ], - "description": "This is an image", - "effective": null, - "exclude_from_nav": false, - "expires": null, - "id": "image", + "test_user_1_", + "admin" + ], + "description": "This is an image", + "effective": null, + "exclude_from_nav": false, + "expires": null, + "id": "image", "image": { - "content-type": "image/png", - "download": "http://localhost:55001/plone/image/@@images/image", - "filename": "image.png", - "height": 56, + "content-type": "image/png", + "download": "http://localhost:55001/plone/image/@@images/image", + "filename": "image.png", + "height": 56, "scales": { "icon": { - "download": "http://localhost:55001/plone/image/@@images/image/icon", - "height": 8, + "download": "http://localhost:55001/plone/image/@@images/image/icon", + "height": 8, "width": 32 - }, + }, "large": { - "download": "http://localhost:55001/plone/image/@@images/image/large", - "height": 56, + "download": "http://localhost:55001/plone/image/@@images/image/large", + "height": 56, "width": 215 - }, + }, "listing": { - "download": "http://localhost:55001/plone/image/@@images/image/listing", - "height": 4, + "download": "http://localhost:55001/plone/image/@@images/image/listing", + "height": 4, "width": 16 - }, + }, "mini": { - "download": "http://localhost:55001/plone/image/@@images/image/mini", - "height": 52, + "download": "http://localhost:55001/plone/image/@@images/image/mini", + "height": 52, "width": 200 - }, + }, "preview": { - "download": "http://localhost:55001/plone/image/@@images/image/preview", - "height": 56, + "download": "http://localhost:55001/plone/image/@@images/image/preview", + "height": 56, "width": 215 - }, + }, "thumb": { - "download": "http://localhost:55001/plone/image/@@images/image/thumb", - "height": 33, + "download": "http://localhost:55001/plone/image/@@images/image/thumb", + "height": 33, "width": 128 - }, + }, "tile": { - "download": "http://localhost:55001/plone/image/@@images/image/tile", - "height": 16, + "download": "http://localhost:55001/plone/image/@@images/image/tile", + "height": 16, "width": 64 } - }, - "size": 1185, + }, + "size": 1185, "width": 215 - }, - "language": "", - "layout": "image_view", - "modified": "2016-01-21T06:24:11+00:00", + }, + "language": "", + "layout": "image_view", + "modified": "2016-01-21T06:24:11+00:00", "parent": { - "@id": "http://localhost:55001/plone", - "@type": "Plone Site", - "description": "", + "@id": "http://localhost:55001/plone", + "@type": "Plone Site", + "description": "", "title": "Plone site" - }, - "relatedItems": [], - "review_state": null, - "rights": "", + }, + "relatedItems": [], + "review_state": null, + "rights": "", "sharing": { - "@id": "http://localhost:55001/plone/image/@sharing", + "@id": "http://localhost:55001/plone/image/@sharing", "title": "Sharing" - }, - "subjects": [], + }, + "subjects": [], "title": "My Image" -} \ No newline at end of file +} diff --git a/docs/source/_json/link.resp b/docs/source/_json/link.resp index 02cbf4d299..f77bbf0550 100644 --- a/docs/source/_json/link.resp +++ b/docs/source/_json/link.resp @@ -2,37 +2,38 @@ HTTP/1.1 200 OK Content-Type: application/json { - "@id": "http://localhost:55001/plone/link", - "@type": "Link", - "UID": "SomeUUID000000000000000000000002", - "allow_discussion": null, - "changeNote": "", - "contributors": [], - "created": "2016-01-21T04:14:48+00:00", + "@id": "http://localhost:55001/plone/link", + "@type": "Link", + "UID": "SomeUUID000000000000000000000002", + "allow_discussion": null, + "changeNote": "", + "contributors": [], + "created": "2016-01-21T04:14:48+00:00", "creators": [ - "test_user_1_" - ], - "description": "This is a link", - "effective": null, - "exclude_from_nav": false, - "expires": null, - "id": "link", - "language": "", - "layout": "link_redirect_view", - "modified": "2016-01-21T04:24:11+00:00", + "test_user_1_", + "admin" + ], + "description": "This is a link", + "effective": null, + "exclude_from_nav": false, + "expires": null, + "id": "link", + "language": "", + "layout": "link_redirect_view", + "modified": "2016-01-21T04:24:11+00:00", "parent": { - "@id": "http://localhost:55001/plone", - "@type": "Plone Site", - "description": "", + "@id": "http://localhost:55001/plone", + "@type": "Plone Site", + "description": "", "title": "Plone site" - }, - "remoteUrl": "http://", - "review_state": "private", - "rights": "", + }, + "remoteUrl": "http://", + "review_state": "private", + "rights": "", "sharing": { - "@id": "http://localhost:55001/plone/link/@sharing", + "@id": "http://localhost:55001/plone/link/@sharing", "title": "Sharing" - }, - "subjects": [], + }, + "subjects": [], "title": "My Link" -} \ No newline at end of file +} diff --git a/docs/source/_json/newsitem.resp b/docs/source/_json/newsitem.resp index da5259a3e2..d0ae1c4fcb 100644 --- a/docs/source/_json/newsitem.resp +++ b/docs/source/_json/newsitem.resp @@ -2,88 +2,89 @@ HTTP/1.1 200 OK Content-Type: application/json { - "@id": "http://localhost:55001/plone/newsitem", - "@type": "News Item", - "UID": "SomeUUID000000000000000000000002", - "allow_discussion": null, - "changeNote": "", - "contributors": [], - "created": "2016-01-21T02:14:48+00:00", + "@id": "http://localhost:55001/plone/newsitem", + "@type": "News Item", + "UID": "SomeUUID000000000000000000000002", + "allow_discussion": null, + "changeNote": "", + "contributors": [], + "created": "2016-01-21T02:14:48+00:00", "creators": [ - "test_user_1_" - ], - "description": "This is a news item", - "effective": null, - "exclude_from_nav": false, - "expires": null, - "id": "newsitem", + "test_user_1_", + "admin" + ], + "description": "This is a news item", + "effective": null, + "exclude_from_nav": false, + "expires": null, + "id": "newsitem", "image": { - "content-type": "image/png", - "download": "http://localhost:55001/plone/newsitem/@@images/image", - "filename": "image.png", - "height": 56, + "content-type": "image/png", + "download": "http://localhost:55001/plone/newsitem/@@images/image", + "filename": "image.png", + "height": 56, "scales": { "icon": { - "download": "http://localhost:55001/plone/newsitem/@@images/image/icon", - "height": 8, + "download": "http://localhost:55001/plone/newsitem/@@images/image/icon", + "height": 8, "width": 32 - }, + }, "large": { - "download": "http://localhost:55001/plone/newsitem/@@images/image/large", - "height": 56, + "download": "http://localhost:55001/plone/newsitem/@@images/image/large", + "height": 56, "width": 215 - }, + }, "listing": { - "download": "http://localhost:55001/plone/newsitem/@@images/image/listing", - "height": 4, + "download": "http://localhost:55001/plone/newsitem/@@images/image/listing", + "height": 4, "width": 16 - }, + }, "mini": { - "download": "http://localhost:55001/plone/newsitem/@@images/image/mini", - "height": 52, + "download": "http://localhost:55001/plone/newsitem/@@images/image/mini", + "height": 52, "width": 200 - }, + }, "preview": { - "download": "http://localhost:55001/plone/newsitem/@@images/image/preview", - "height": 56, + "download": "http://localhost:55001/plone/newsitem/@@images/image/preview", + "height": 56, "width": 215 - }, + }, "thumb": { - "download": "http://localhost:55001/plone/newsitem/@@images/image/thumb", - "height": 33, + "download": "http://localhost:55001/plone/newsitem/@@images/image/thumb", + "height": 33, "width": 128 - }, + }, "tile": { - "download": "http://localhost:55001/plone/newsitem/@@images/image/tile", - "height": 16, + "download": "http://localhost:55001/plone/newsitem/@@images/image/tile", + "height": 16, "width": 64 } - }, - "size": 1185, + }, + "size": 1185, "width": 215 - }, - "image_caption": "This is an image caption.", - "language": "", - "layout": "newsitem_view", - "modified": "2016-01-21T02:24:11+00:00", + }, + "image_caption": "This is an image caption.", + "language": "", + "layout": "newsitem_view", + "modified": "2016-01-21T02:24:11+00:00", "parent": { - "@id": "http://localhost:55001/plone", - "@type": "Plone Site", - "description": "", + "@id": "http://localhost:55001/plone", + "@type": "Plone Site", + "description": "", "title": "Plone site" - }, - "relatedItems": [], - "review_state": "private", - "rights": "", + }, + "relatedItems": [], + "review_state": "private", + "rights": "", "sharing": { - "@id": "http://localhost:55001/plone/newsitem/@sharing", + "@id": "http://localhost:55001/plone/newsitem/@sharing", "title": "Sharing" - }, - "subjects": [], + }, + "subjects": [], "text": { - "content-type": "text/plain", - "data": "Lorem ipsum", + "content-type": "text/plain", + "data": "Lorem ipsum", "encoding": "utf-8" - }, + }, "title": "My News Item" -} \ No newline at end of file +} diff --git a/docs/source/_json/types_document.resp b/docs/source/_json/types_document.resp index e0b4928a5d..34c2dea867 100644 --- a/docs/source/_json/types_document.resp +++ b/docs/source/_json/types_document.resp @@ -5,226 +5,220 @@ Content-Type: application/json+schema "fieldsets": [ { "fields": [ - "title", - "description", - "text", + "title", + "description", + "text", "changeNote" - ], - "id": "default", + ], + "id": "default", "title": "Default" - }, + }, { "fields": [ - "allow_discussion", - "exclude_from_nav", - "id", + "allow_discussion", + "exclude_from_nav", "table_of_contents" - ], - "id": "settings", + ], + "id": "settings", "title": "Settings" - }, + }, { "fields": [ - "subjects", - "language", + "subjects", + "language", "relatedItems" - ], - "id": "categorization", + ], + "id": "categorization", "title": "Categorization" - }, + }, { "fields": [ - "effective", + "effective", "expires" - ], - "id": "dates", + ], + "id": "dates", "title": "Dates" - }, + }, { "fields": [ - "creators", - "contributors", + "creators", + "contributors", "rights" - ], - "id": "ownership", + ], + "id": "ownership", "title": "Ownership" } - ], + ], "layouts": [ "document_view" - ], + ], "properties": { "allow_discussion": { "choices": [ [ - "True", + "True", "Yes" - ], + ], [ - "False", + "False", "No" ] - ], - "description": "Allow discussion for this content object.", + ], + "description": "Allow discussion for this content object.", "enum": [ - "True", + "True", "False" - ], + ], "enumNames": [ - "Yes", + "Yes", "No" - ], - "title": "Allow discussion", + ], + "title": "Allow discussion", "type": "string" - }, + }, "changeNote": { - "description": "Enter a comment that describes the changes you made.", - "title": "Change Note", + "description": "Enter a comment that describes the changes you made.", + "title": "Change Note", "type": "string" - }, + }, "contributors": { - "additionalItems": true, - "description": "The names of people that have contributed to this item. Each contributor should be on a separate line.", + "additionalItems": true, + "description": "The names of people that have contributed to this item. Each contributor should be on a separate line.", "items": { - "description": "", - "title": "", + "description": "", + "title": "", "type": "string" - }, - "title": "Contributors", - "type": "array", + }, + "title": "Contributors", + "type": "array", "uniqueItems": true - }, + }, "creators": { - "additionalItems": true, - "description": "Persons responsible for creating the content of this item. Please enter a list of user names, one per line. The principal creator should come first.", + "additionalItems": true, + "description": "Persons responsible for creating the content of this item. Please enter a list of user names, one per line. The principal creator should come first.", "items": { - "description": "", - "title": "", + "description": "", + "title": "", "type": "string" - }, - "title": "Creators", - "type": "array", + }, + "title": "Creators", + "type": "array", "uniqueItems": true - }, + }, "description": { - "description": "Used in item listings and search results.", - "minLength": 0, - "title": "Summary", - "type": "string", + "description": "Used in item listings and search results.", + "minLength": 0, + "title": "Summary", + "type": "string", "widget": "textarea" - }, + }, "effective": { - "description": "If this date is in the future, the content will not show up in listings and searches until this date.", - "title": "Publishing Date", - "type": "string", + "description": "If this date is in the future, the content will not show up in listings and searches until this date.", + "title": "Publishing Date", + "type": "string", "widget": "datetime" - }, + }, "exclude_from_nav": { - "default": false, - "description": "If selected, this item will not appear in the navigation tree", - "title": "Exclude from navigation", + "default": false, + "description": "If selected, this item will not appear in the navigation tree", + "title": "Exclude from navigation", "type": "boolean" - }, + }, "expires": { - "description": "When this date is reached, the content will no longer be visible in listings and searches.", - "title": "Expiration Date", - "type": "string", + "description": "When this date is reached, the content will nolonger be visible in listings and searches.", + "title": "Expiration Date", + "type": "string", "widget": "datetime" - }, - "id": { - "description": "This name will be displayed in the URL.", - "title": "Short name", - "type": "string" - }, + }, "language": { "choices": [ [ - "de", + "de", "Deutsch" - ], + ], [ - "en", + "en", "English" - ], + ], [ - "es", + "es", "Espa\u00f1ol" - ], + ], [ - "fr", + "fr", "Fran\u00e7ais" ] - ], - "default": "en", - "description": "", + ], + "default": "en", + "description": "", "enum": [ - "de", - "en", - "es", + "de", + "en", + "es", "fr" - ], + ], "enumNames": [ - "Deutsch", - "English", - "Espa\u00f1ol", + "Deutsch", + "English", + "Espa\u00f1ol", "Fran\u00e7ais" - ], - "title": "Language", + ], + "title": "Language", "type": "string" - }, + }, "relatedItems": { - "additionalItems": true, - "default": [], - "description": "", + "additionalItems": true, + "default": [], + "description": "", "items": { - "description": "", - "title": "Related", + "description": "", + "title": "Related", "type": "string" - }, - "title": "Related Items", - "type": "array", + }, + "title": "Related Items", + "type": "array", "uniqueItems": true - }, + }, "rights": { - "description": "Copyright statement or other rights information on this item.", - "minLength": 0, - "title": "Rights", - "type": "string", + "description": "Copyright statement or other rights information on this item.", + "minLength": 0, + "title": "Rights", + "type": "string", "widget": "textarea" - }, + }, "subjects": { - "additionalItems": true, - "description": "Tags are commonly used for ad-hoc organization of content.", + "additionalItems": true, + "description": "Tags are commonly used for ad-hoc organization of content.", "items": { - "description": "", - "title": "", + "description": "", + "title": "", "type": "string" - }, - "title": "Tags", - "type": "array", + }, + "title": "Tags", + "type": "array", "uniqueItems": true - }, + }, "table_of_contents": { - "description": "If selected, this will show a table of contents at the top of the page.", - "title": "Table of contents", + "description": "If selected, this will show a table of contents at the top of the page.", + "title": "Table of contents", "type": "boolean" - }, + }, "text": { - "description": "", - "title": "Text", - "type": "string", + "description": "", + "title": "Text", + "type": "string", "widget": "richtext" - }, + }, "title": { - "description": "", - "title": "Title", + "description": "", + "title": "Title", "type": "string" } - }, + }, "required": [ - "title", + "title", "exclude_from_nav" - ], - "title": "Page", + ], + "title": "Page", "type": "object" -} \ No newline at end of file +} diff --git a/docs/source/_json/vocabularies.resp b/docs/source/_json/vocabularies.resp index f981d65a37..c51f67f677 100644 --- a/docs/source/_json/vocabularies.resp +++ b/docs/source/_json/vocabularies.resp @@ -3,8 +3,8 @@ Content-Type: application/json [ { - "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.ReallyUserFriendlyTypes", - "title": "plone.app.vocabularies.ReallyUserFriendlyTypes" + "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.Skins", + "title": "plone.app.vocabularies.Skins" }, { "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.AvailableContentLanguages", @@ -15,12 +15,8 @@ Content-Type: application/json "title": "plone.schemaeditor.VocabulariesVocabulary" }, { - "@id": "http://localhost:55001/plone/@vocabularies/plone.app.users.group_ids", - "title": "plone.app.users.group_ids" - }, - { - "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.Permissions", - "title": "plone.app.vocabularies.Permissions" + "@id": "http://localhost:55001/plone/@vocabularies/plone.app.event.Weekdays", + "title": "plone.app.event.Weekdays" }, { "@id": "http://localhost:55001/plone/@vocabularies/plone.contentrules.events", @@ -39,16 +35,8 @@ Content-Type: application/json "title": "plone.app.vocabularies.ImagesScales" }, { - "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.PortalActionCategories", - "title": "plone.app.vocabularies.PortalActionCategories" - }, - { - "@id": "http://localhost:55001/plone/@vocabularies/plone.app.multilingual.vocabularies.AllAvailableLanguageVocabulary", - "title": "plone.app.multilingual.vocabularies.AllAvailableLanguageVocabulary" - }, - { - "@id": "http://localhost:55001/plone/@vocabularies/plone.app.multilingual.RootCatalog", - "title": "plone.app.multilingual.RootCatalog" + "@id": "http://localhost:55001/plone/@vocabularies/wicked.vocabularies.BaseConfigurationsOptions", + "title": "wicked.vocabularies.BaseConfigurationsOptions" }, { "@id": "http://localhost:55001/plone/@vocabularies/plone.app.content.ValidAddableTypes", @@ -63,8 +51,8 @@ Content-Type: application/json "title": "plone.app.vocabularies.AvailableEditors" }, { - "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.Roles", - "title": "plone.app.vocabularies.Roles" + "@id": "http://localhost:55001/plone/@vocabularies/cmf.calendar.AvailableEventTypes", + "title": "cmf.calendar.AvailableEventTypes" }, { "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.SupportedContentLanguages", @@ -90,6 +78,10 @@ Content-Type: application/json "@id": "http://localhost:55001/plone/@vocabularies/plone.app.discussion.vocabularies.TextTransformVocabulary", "title": "plone.app.discussion.vocabularies.TextTransformVocabulary" }, + { + "@id": "http://localhost:55001/plone/@vocabularies/wicked.vocabularies.CacheConfigurationsOptions", + "title": "wicked.vocabularies.CacheConfigurationsOptions" + }, { "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.Month", "title": "plone.app.vocabularies.Month" @@ -110,14 +102,26 @@ Content-Type: application/json "@id": "http://localhost:55001/plone/@vocabularies/plone.app.contenttypes.metadatafields", "title": "plone.app.contenttypes.metadatafields" }, + { + "@id": "http://localhost:55001/plone/@vocabularies/Behaviors", + "title": "Behaviors" + }, { "@id": "http://localhost:55001/plone/@vocabularies/Interfaces", "title": "Interfaces" }, + { + "@id": "http://localhost:55001/plone/@vocabularies/plone.app.event.Timezones", + "title": "plone.app.event.Timezones" + }, { "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.WorkflowStates", "title": "plone.app.vocabularies.WorkflowStates" }, + { + "@id": "http://localhost:55001/plone/@vocabularies/plone.app.event.EventTypes", + "title": "plone.app.event.EventTypes" + }, { "@id": "http://localhost:55001/plone/@vocabularies/Fields", "title": "Fields" @@ -126,21 +130,17 @@ Content-Type: application/json "@id": "http://localhost:55001/plone/@vocabularies/plone.app.contenttypes.migration.atctypes", "title": "plone.app.contenttypes.migration.atctypes" }, - { - "@id": "http://localhost:55001/plone/@vocabularies/plone.app.multilingual.vocabularies.AllContentLanguageVocabulary", - "title": "plone.app.multilingual.vocabularies.AllContentLanguageVocabulary" - }, { "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.SyndicatableFeedItems", "title": "plone.app.vocabularies.SyndicatableFeedItems" }, { - "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.AllowedContentTypes", - "title": "plone.app.vocabularies.AllowedContentTypes" + "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.Users", + "title": "plone.app.vocabularies.Users" }, { - "@id": "http://localhost:55001/plone/@vocabularies/plone.app.users.user_registration_fields", - "title": "plone.app.users.user_registration_fields" + "@id": "http://localhost:55001/plone/@vocabularies/plone.app.event.AvailableTimezones", + "title": "plone.app.event.AvailableTimezones" }, { "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.WeekdaysAbbr", @@ -155,8 +155,8 @@ Content-Type: application/json "title": "plone.app.vocabularies.PortalTypes" }, { - "@id": "http://localhost:55001/plone/@vocabularies/Behaviors", - "title": "Behaviors" + "@id": "http://localhost:55001/plone/@vocabularies/plone.app.controlpanel.WickedPortalTypes", + "title": "plone.app.controlpanel.WickedPortalTypes" }, { "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.SyndicationFeedTypes", @@ -171,8 +171,8 @@ Content-Type: application/json "title": "plone.formwidget.relations.cmfcontentsearch" }, { - "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.Skins", - "title": "plone.app.vocabularies.Skins" + "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.ReallyUserFriendlyTypes", + "title": "plone.app.vocabularies.ReallyUserFriendlyTypes" }, { "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.AllowableContentTypes", @@ -195,11 +195,19 @@ Content-Type: application/json "title": "plone.app.contenttypes.migration.changed_base_classes" }, { - "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.Users", - "title": "plone.app.vocabularies.Users" + "@id": "http://localhost:55001/plone/@vocabularies/Group Ids", + "title": "Group Ids" }, { "@id": "http://localhost:55001/plone/@vocabularies/plone.app.event.SynchronizationStrategies", "title": "plone.app.event.SynchronizationStrategies" + }, + { + "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.AllowedContentTypes", + "title": "plone.app.vocabularies.AllowedContentTypes" + }, + { + "@id": "http://localhost:55001/plone/@vocabularies/plone.app.vocabularies.Roles", + "title": "plone.app.vocabularies.Roles" } ] \ No newline at end of file From f0f83b2c9e01d7005e3675c3b8088c83200e9ec1 Mon Sep 17 00:00:00 2001 From: Roel Bruggink Date: Mon, 17 Apr 2017 09:55:33 +0200 Subject: [PATCH 08/11] Add docs --- docs/source/types.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/source/types.rst b/docs/source/types.rst index 189b7f69ff..f01d7ab736 100644 --- a/docs/source/types.rst +++ b/docs/source/types.rst @@ -4,7 +4,7 @@ Types .. note:: These docs are generated by code tests, therefore you will see some 'test' contenttypes appear here. -Available content types in a Plone site can be listed and queried by accessing the ``/@types`` endpoint on any context (requires an authenticated user). The 'addable' key specifies if the content type can be added to the current context. +Available content types in a Plone site can be listed and queried by accessing the ``/@types`` endpoint on any context (requires an authenticated user). The 'addable' key specifies if the content type can be added to the current context. The 'layouts' key specifies the defined views. .. http:example:: curl httpie python-requests From 74d38fa3ac44ec97d93b048e6935780c8b45b3ac Mon Sep 17 00:00:00 2001 From: Roel Bruggink Date: Mon, 17 Apr 2017 10:05:29 +0200 Subject: [PATCH 09/11] Ignore whitespace changes at EOL. Aimed at json responses. --- test-no-uncommitted-doc-changes.in | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test-no-uncommitted-doc-changes.in b/test-no-uncommitted-doc-changes.in index ed41a81d63..f983b70104 100644 --- a/test-no-uncommitted-doc-changes.in +++ b/test-no-uncommitted-doc-changes.in @@ -20,7 +20,7 @@ if [ "$PLONE_VERSION" = "5.0.x" ]; then exit 0 fi -changes=$(git diff --exit-code $DUMPS_DIR) +changes=$(git diff --ignore-space-at-eol --exit-code $DUMPS_DIR) if [ $? -ne 0 ]; then red "ERROR: There are modified files in $DUMPS_DIR after running test_documentation.py!" red From 54cce7ee8638d386995592c0e32a2adec2d01c09 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Mon, 17 Apr 2017 19:42:13 +0200 Subject: [PATCH 10/11] Re-add blank on _json files for a clean merge request. --- docs/source/_json/collection.resp | 104 +++++------ docs/source/_json/content_get.resp | 60 +++--- docs/source/_json/content_post.resp | 56 +++--- docs/source/_json/document.resp | 64 +++---- docs/source/_json/event.resp | 84 ++++----- docs/source/_json/file.resp | 62 +++---- docs/source/_json/folder.resp | 78 ++++---- docs/source/_json/image.resp | 108 +++++------ docs/source/_json/link.resp | 56 +++--- docs/source/_json/newsitem.resp | 118 ++++++------ docs/source/_json/types_document.resp | 258 +++++++++++++------------- 11 files changed, 524 insertions(+), 524 deletions(-) diff --git a/docs/source/_json/collection.resp b/docs/source/_json/collection.resp index 3f8be317f3..74ee02047f 100644 --- a/docs/source/_json/collection.resp +++ b/docs/source/_json/collection.resp @@ -2,74 +2,74 @@ HTTP/1.1 200 OK Content-Type: application/json { - "@id": "http://localhost:55001/plone/collection", - "@type": "Collection", - "UID": "SomeUUID000000000000000000000002", - "allow_discussion": null, - "contributors": [], - "created": "2016-01-21T08:14:48+00:00", + "@id": "http://localhost:55001/plone/collection", + "@type": "Collection", + "UID": "SomeUUID000000000000000000000002", + "allow_discussion": null, + "contributors": [], + "created": "2016-01-21T08:14:48+00:00", "creators": [ - "test_user_1_", + "test_user_1_", "admin" - ], - "customViewFields": [], - "description": "This is a collection with two documents", - "effective": null, - "exclude_from_nav": false, - "expires": null, - "id": "collection", - "item_count": 30, + ], + "customViewFields": [], + "description": "This is a collection with two documents", + "effective": null, + "exclude_from_nav": false, + "expires": null, + "id": "collection", + "item_count": 30, "items": [ { - "@id": "http://localhost:55001/plone/front-page", - "@type": "Document", - "description": "Congratulations! You have successfully installed Plone.", - "review_state": "private", + "@id": "http://localhost:55001/plone/front-page", + "@type": "Document", + "description": "Congratulations! You have successfully installed Plone.", + "review_state": "private", "title": "Welcome to Plone" - }, + }, { - "@id": "http://localhost:55001/plone/doc1", - "@type": "Document", - "description": "", - "review_state": "private", + "@id": "http://localhost:55001/plone/doc1", + "@type": "Document", + "description": "", + "review_state": "private", "title": "Document 1" - }, + }, { - "@id": "http://localhost:55001/plone/doc2", - "@type": "Document", - "description": "", - "review_state": "private", + "@id": "http://localhost:55001/plone/doc2", + "@type": "Document", + "description": "", + "review_state": "private", "title": "Document 2" } - ], - "items_total": 3, - "language": "", - "layout": "listing_view", - "limit": 1000, - "modified": "2016-01-21T08:24:11+00:00", + ], + "items_total": 3, + "language": "", + "layout": "listing_view", + "limit": 1000, + "modified": "2016-01-21T08:24:11+00:00", "parent": { - "@id": "http://localhost:55001/plone", - "@type": "Plone Site", - "description": "", + "@id": "http://localhost:55001/plone", + "@type": "Plone Site", + "description": "", "title": "Plone site" - }, + }, "query": [ { - "i": "portal_type", - "o": "plone.app.querystring.operation.string.is", + "i": "portal_type", + "o": "plone.app.querystring.operation.string.is", "v": "Document" } - ], - "relatedItems": [], - "review_state": "private", - "rights": "", + ], + "relatedItems": [], + "review_state": "private", + "rights": "", "sharing": { - "@id": "http://localhost:55001/plone/collection/@sharing", + "@id": "http://localhost:55001/plone/collection/@sharing", "title": "Sharing" - }, - "sort_on": null, - "sort_reversed": null, - "subjects": [], - "text": null, + }, + "sort_on": null, + "sort_reversed": null, + "subjects": [], + "text": null, "title": "My Collection" -} +} \ No newline at end of file diff --git a/docs/source/_json/content_get.resp b/docs/source/_json/content_get.resp index a2c8037fb8..a9d3d5d727 100644 --- a/docs/source/_json/content_get.resp +++ b/docs/source/_json/content_get.resp @@ -2,40 +2,40 @@ HTTP/1.1 200 OK Content-Type: application/json { - "@id": "http://localhost:55001/plone/folder/my-document", - "@type": "Document", - "UID": "SomeUUID000000000000000000000005", - "allow_discussion": null, - "changeNote": "", - "contributors": [], - "created": "2016-10-21T19:00:00+00:00", + "@id": "http://localhost:55001/plone/folder/my-document", + "@type": "Document", + "UID": "SomeUUID000000000000000000000005", + "allow_discussion": null, + "changeNote": "", + "contributors": [], + "created": "2016-10-21T19:00:00+00:00", "creators": [ "admin" - ], - "description": "", - "effective": null, - "exclude_from_nav": false, - "expires": null, - "id": "my-document", - "language": "", - "layout": "document_view", - "modified": "2016-10-21T19:00:00+00:00", + ], + "description": "", + "effective": null, + "exclude_from_nav": false, + "expires": null, + "id": "my-document", + "language": "", + "layout": "document_view", + "modified": "2016-10-21T19:00:00+00:00", "parent": { - "@id": "http://localhost:55001/plone/folder", - "@type": "Folder", - "description": "This is a folder with two documents", - "review_state": "private", + "@id": "http://localhost:55001/plone/folder", + "@type": "Folder", + "description": "This is a folder with two documents", + "review_state": "private", "title": "My Folder" - }, - "relatedItems": [], - "review_state": "private", - "rights": "", + }, + "relatedItems": [], + "review_state": "private", + "rights": "", "sharing": { - "@id": "http://localhost:55001/plone/folder/my-document/@sharing", + "@id": "http://localhost:55001/plone/folder/my-document/@sharing", "title": "Sharing" - }, - "subjects": [], - "table_of_contents": null, - "text": null, + }, + "subjects": [], + "table_of_contents": null, + "text": null, "title": "My Document" -} +} \ No newline at end of file diff --git a/docs/source/_json/content_post.resp b/docs/source/_json/content_post.resp index 93524df793..4d466e03d7 100644 --- a/docs/source/_json/content_post.resp +++ b/docs/source/_json/content_post.resp @@ -3,36 +3,36 @@ Content-Type: application/json Location: http://localhost:55001/plone/folder/my-document { - "@id": "http://localhost:55001/plone/folder/my-document", - "@type": "Document", - "UID": "SomeUUID000000000000000000000005", - "allow_discussion": null, - "changeNote": "", - "contributors": [], - "created": "2016-10-21T19:00:00+00:00", + "@id": "http://localhost:55001/plone/folder/my-document", + "@type": "Document", + "UID": "SomeUUID000000000000000000000005", + "allow_discussion": null, + "changeNote": "", + "contributors": [], + "created": "2016-10-21T19:00:00+00:00", "creators": [ "admin" - ], - "description": "", - "effective": null, - "exclude_from_nav": false, - "expires": null, - "id": "my-document", - "language": "", - "layout": "document_view", - "modified": "2016-10-21T19:00:00+00:00", + ], + "description": "", + "effective": null, + "exclude_from_nav": false, + "expires": null, + "id": "my-document", + "language": "", + "layout": "document_view", + "modified": "2016-10-21T19:00:00+00:00", "parent": { - "@id": "http://localhost:55001/plone/folder", - "@type": "Folder", - "description": "This is a folder with two documents", - "review_state": "private", + "@id": "http://localhost:55001/plone/folder", + "@type": "Folder", + "description": "This is a folder with two documents", + "review_state": "private", "title": "My Folder" - }, - "relatedItems": [], - "review_state": "private", - "rights": "", - "subjects": [], - "table_of_contents": null, - "text": null, + }, + "relatedItems": [], + "review_state": "private", + "rights": "", + "subjects": [], + "table_of_contents": null, + "text": null, "title": "My Document" -} +} \ No newline at end of file diff --git a/docs/source/_json/document.resp b/docs/source/_json/document.resp index dd40c6198e..fe3981f42c 100644 --- a/docs/source/_json/document.resp +++ b/docs/source/_json/document.resp @@ -2,44 +2,44 @@ HTTP/1.1 200 OK Content-Type: application/json { - "@id": "http://localhost:55001/plone/front-page", - "@type": "Document", - "UID": "SomeUUID000000000000000000000001", - "allow_discussion": null, - "changeNote": "", - "contributors": [], - "created": "2016-01-21T01:14:48+00:00", + "@id": "http://localhost:55001/plone/front-page", + "@type": "Document", + "UID": "SomeUUID000000000000000000000001", + "allow_discussion": null, + "changeNote": "", + "contributors": [], + "created": "2016-01-21T01:14:48+00:00", "creators": [ - "test_user_1_", + "test_user_1_", "admin" - ], - "description": "Congratulations! You have successfully installed Plone.", - "effective": null, - "exclude_from_nav": false, - "expires": null, - "id": "front-page", - "language": "", - "layout": "document_view", - "modified": "2016-01-21T01:24:11+00:00", + ], + "description": "Congratulations! You have successfully installed Plone.", + "effective": null, + "exclude_from_nav": false, + "expires": null, + "id": "front-page", + "language": "", + "layout": "document_view", + "modified": "2016-01-21T01:24:11+00:00", "parent": { - "@id": "http://localhost:55001/plone", - "@type": "Plone Site", - "description": "", + "@id": "http://localhost:55001/plone", + "@type": "Plone Site", + "description": "", "title": "Plone site" - }, - "relatedItems": [], - "review_state": "private", - "rights": "", + }, + "relatedItems": [], + "review_state": "private", + "rights": "", "sharing": { - "@id": "http://localhost:55001/plone/front-page/@sharing", + "@id": "http://localhost:55001/plone/front-page/@sharing", "title": "Sharing" - }, - "subjects": [], - "table_of_contents": null, + }, + "subjects": [], + "table_of_contents": null, "text": { - "content-type": "text/plain", - "data": "If you're seeing this instead of the web site you were expecting, the owner of this web site has just installed Plone. Do not contact the Plone Team or the Plone mailing lists about this.", + "content-type": "text/plain", + "data": "If you're seeing this instead of the web site you were expecting, the owner of this web site has just installed Plone. Do not contact the Plone Team or the Plone mailing lists about this.", "encoding": "utf-8" - }, + }, "title": "Welcome to Plone" -} +} \ No newline at end of file diff --git a/docs/source/_json/event.resp b/docs/source/_json/event.resp index 1685ca4891..102751e52d 100644 --- a/docs/source/_json/event.resp +++ b/docs/source/_json/event.resp @@ -2,52 +2,52 @@ HTTP/1.1 200 OK Content-Type: application/json { - "@id": "http://localhost:55001/plone/event", - "@type": "Event", - "UID": "SomeUUID000000000000000000000002", - "allow_discussion": null, - "attendees": [], - "changeNote": "", - "contact_email": null, - "contact_name": null, - "contact_phone": null, - "contributors": [], - "created": "2016-01-21T03:14:48+00:00", + "@id": "http://localhost:55001/plone/event", + "@type": "Event", + "UID": "SomeUUID000000000000000000000002", + "allow_discussion": null, + "attendees": [], + "changeNote": "", + "contact_email": null, + "contact_name": null, + "contact_phone": null, + "contributors": [], + "created": "2016-01-21T03:14:48+00:00", "creators": [ - "test_user_1_", + "test_user_1_", "admin" - ], - "description": "This is an event", - "effective": null, - "end": null, - "event_url": null, - "exclude_from_nav": false, - "expires": null, - "id": "event", - "language": "", - "layout": "event_view", - "location": null, - "modified": "2016-01-21T03:24:11+00:00", - "open_end": null, + ], + "description": "This is an event", + "effective": null, + "end": null, + "event_url": null, + "exclude_from_nav": false, + "expires": null, + "id": "event", + "language": "", + "layout": "event_view", + "location": null, + "modified": "2016-01-21T03:24:11+00:00", + "open_end": null, "parent": { - "@id": "http://localhost:55001/plone", - "@type": "Plone Site", - "description": "", + "@id": "http://localhost:55001/plone", + "@type": "Plone Site", + "description": "", "title": "Plone site" - }, - "recurrence": null, - "relatedItems": [], - "review_state": "private", - "rights": "", + }, + "recurrence": null, + "relatedItems": [], + "review_state": "private", + "rights": "", "sharing": { - "@id": "http://localhost:55001/plone/event/@sharing", + "@id": "http://localhost:55001/plone/event/@sharing", "title": "Sharing" - }, - "start": null, - "subjects": [], - "sync_uid": null, - "text": null, - "timezone": null, - "title": "Event", + }, + "start": null, + "subjects": [], + "sync_uid": null, + "text": null, + "timezone": null, + "title": "Event", "whole_day": null -} +} \ No newline at end of file diff --git a/docs/source/_json/file.resp b/docs/source/_json/file.resp index 21933f6537..a5a3692f3c 100644 --- a/docs/source/_json/file.resp +++ b/docs/source/_json/file.resp @@ -2,43 +2,43 @@ HTTP/1.1 200 OK Content-Type: application/json { - "@id": "http://localhost:55001/plone/file", - "@type": "File", - "UID": "SomeUUID000000000000000000000002", - "allow_discussion": null, - "contributors": [], - "created": "2016-01-21T05:14:48+00:00", + "@id": "http://localhost:55001/plone/file", + "@type": "File", + "UID": "SomeUUID000000000000000000000002", + "allow_discussion": null, + "contributors": [], + "created": "2016-01-21T05:14:48+00:00", "creators": [ - "test_user_1_", + "test_user_1_", "admin" - ], - "description": "This is a file", - "effective": null, - "exclude_from_nav": false, - "expires": null, + ], + "description": "This is a file", + "effective": null, + "exclude_from_nav": false, + "expires": null, "file": { - "content-type": "application/pdf", - "download": "http://localhost:55001/plone/file/@@download/file", - "filename": "file.pdf", + "content-type": "application/pdf", + "download": "http://localhost:55001/plone/file/@@download/file", + "filename": "file.pdf", "size": 74429 - }, - "id": "file", - "language": "", - "layout": "file_view", - "modified": "2016-01-21T05:24:11+00:00", + }, + "id": "file", + "language": "", + "layout": "file_view", + "modified": "2016-01-21T05:24:11+00:00", "parent": { - "@id": "http://localhost:55001/plone", - "@type": "Plone Site", - "description": "", + "@id": "http://localhost:55001/plone", + "@type": "Plone Site", + "description": "", "title": "Plone site" - }, - "relatedItems": [], - "review_state": null, - "rights": "", + }, + "relatedItems": [], + "review_state": null, + "rights": "", "sharing": { - "@id": "http://localhost:55001/plone/file/@sharing", + "@id": "http://localhost:55001/plone/file/@sharing", "title": "Sharing" - }, - "subjects": [], + }, + "subjects": [], "title": "My File" -} +} \ No newline at end of file diff --git a/docs/source/_json/folder.resp b/docs/source/_json/folder.resp index a4a38b8825..8965e3ec3b 100644 --- a/docs/source/_json/folder.resp +++ b/docs/source/_json/folder.resp @@ -2,55 +2,55 @@ HTTP/1.1 200 OK Content-Type: application/json { - "@id": "http://localhost:55001/plone/folder", - "@type": "Folder", - "UID": "SomeUUID000000000000000000000002", - "allow_discussion": null, - "contributors": [], - "created": "2016-01-21T07:14:48+00:00", + "@id": "http://localhost:55001/plone/folder", + "@type": "Folder", + "UID": "SomeUUID000000000000000000000002", + "allow_discussion": null, + "contributors": [], + "created": "2016-01-21T07:14:48+00:00", "creators": [ - "test_user_1_", + "test_user_1_", "admin" - ], - "description": "This is a folder with two documents", - "effective": null, - "exclude_from_nav": false, - "expires": null, - "id": "folder", + ], + "description": "This is a folder with two documents", + "effective": null, + "exclude_from_nav": false, + "expires": null, + "id": "folder", "items": [ { - "@id": "http://localhost:55001/plone/folder/doc1", - "@type": "Document", - "description": "", - "review_state": "private", + "@id": "http://localhost:55001/plone/folder/doc1", + "@type": "Document", + "description": "", + "review_state": "private", "title": "A document within a folder" - }, + }, { - "@id": "http://localhost:55001/plone/folder/doc2", - "@type": "Document", - "description": "", - "review_state": "private", + "@id": "http://localhost:55001/plone/folder/doc2", + "@type": "Document", + "description": "", + "review_state": "private", "title": "A document within a folder" } - ], - "items_total": 2, - "language": "", - "layout": "listing_view", - "modified": "2016-01-21T07:24:11+00:00", - "nextPreviousEnabled": false, + ], + "items_total": 2, + "language": "", + "layout": "listing_view", + "modified": "2016-01-21T07:24:11+00:00", + "nextPreviousEnabled": false, "parent": { - "@id": "http://localhost:55001/plone", - "@type": "Plone Site", - "description": "", + "@id": "http://localhost:55001/plone", + "@type": "Plone Site", + "description": "", "title": "Plone site" - }, - "relatedItems": [], - "review_state": "private", - "rights": "", + }, + "relatedItems": [], + "review_state": "private", + "rights": "", "sharing": { - "@id": "http://localhost:55001/plone/folder/@sharing", + "@id": "http://localhost:55001/plone/folder/@sharing", "title": "Sharing" - }, - "subjects": [], + }, + "subjects": [], "title": "My Folder" -} +} \ No newline at end of file diff --git a/docs/source/_json/image.resp b/docs/source/_json/image.resp index 19134a9b61..3f7bb60fd3 100644 --- a/docs/source/_json/image.resp +++ b/docs/source/_json/image.resp @@ -2,82 +2,82 @@ HTTP/1.1 200 OK Content-Type: application/json { - "@id": "http://localhost:55001/plone/image", - "@type": "Image", - "UID": "SomeUUID000000000000000000000002", - "allow_discussion": null, - "contributors": [], - "created": "2016-01-21T06:14:48+00:00", + "@id": "http://localhost:55001/plone/image", + "@type": "Image", + "UID": "SomeUUID000000000000000000000002", + "allow_discussion": null, + "contributors": [], + "created": "2016-01-21T06:14:48+00:00", "creators": [ - "test_user_1_", + "test_user_1_", "admin" - ], - "description": "This is an image", - "effective": null, - "exclude_from_nav": false, - "expires": null, - "id": "image", + ], + "description": "This is an image", + "effective": null, + "exclude_from_nav": false, + "expires": null, + "id": "image", "image": { - "content-type": "image/png", - "download": "http://localhost:55001/plone/image/@@images/image", - "filename": "image.png", - "height": 56, + "content-type": "image/png", + "download": "http://localhost:55001/plone/image/@@images/image", + "filename": "image.png", + "height": 56, "scales": { "icon": { - "download": "http://localhost:55001/plone/image/@@images/image/icon", - "height": 8, + "download": "http://localhost:55001/plone/image/@@images/image/icon", + "height": 8, "width": 32 - }, + }, "large": { - "download": "http://localhost:55001/plone/image/@@images/image/large", - "height": 56, + "download": "http://localhost:55001/plone/image/@@images/image/large", + "height": 56, "width": 215 - }, + }, "listing": { - "download": "http://localhost:55001/plone/image/@@images/image/listing", - "height": 4, + "download": "http://localhost:55001/plone/image/@@images/image/listing", + "height": 4, "width": 16 - }, + }, "mini": { - "download": "http://localhost:55001/plone/image/@@images/image/mini", - "height": 52, + "download": "http://localhost:55001/plone/image/@@images/image/mini", + "height": 52, "width": 200 - }, + }, "preview": { - "download": "http://localhost:55001/plone/image/@@images/image/preview", - "height": 56, + "download": "http://localhost:55001/plone/image/@@images/image/preview", + "height": 56, "width": 215 - }, + }, "thumb": { - "download": "http://localhost:55001/plone/image/@@images/image/thumb", - "height": 33, + "download": "http://localhost:55001/plone/image/@@images/image/thumb", + "height": 33, "width": 128 - }, + }, "tile": { - "download": "http://localhost:55001/plone/image/@@images/image/tile", - "height": 16, + "download": "http://localhost:55001/plone/image/@@images/image/tile", + "height": 16, "width": 64 } - }, - "size": 1185, + }, + "size": 1185, "width": 215 - }, - "language": "", - "layout": "image_view", - "modified": "2016-01-21T06:24:11+00:00", + }, + "language": "", + "layout": "image_view", + "modified": "2016-01-21T06:24:11+00:00", "parent": { - "@id": "http://localhost:55001/plone", - "@type": "Plone Site", - "description": "", + "@id": "http://localhost:55001/plone", + "@type": "Plone Site", + "description": "", "title": "Plone site" - }, - "relatedItems": [], - "review_state": null, - "rights": "", + }, + "relatedItems": [], + "review_state": null, + "rights": "", "sharing": { - "@id": "http://localhost:55001/plone/image/@sharing", + "@id": "http://localhost:55001/plone/image/@sharing", "title": "Sharing" - }, - "subjects": [], + }, + "subjects": [], "title": "My Image" -} +} \ No newline at end of file diff --git a/docs/source/_json/link.resp b/docs/source/_json/link.resp index f77bbf0550..7d4cf8071e 100644 --- a/docs/source/_json/link.resp +++ b/docs/source/_json/link.resp @@ -2,38 +2,38 @@ HTTP/1.1 200 OK Content-Type: application/json { - "@id": "http://localhost:55001/plone/link", - "@type": "Link", - "UID": "SomeUUID000000000000000000000002", - "allow_discussion": null, - "changeNote": "", - "contributors": [], - "created": "2016-01-21T04:14:48+00:00", + "@id": "http://localhost:55001/plone/link", + "@type": "Link", + "UID": "SomeUUID000000000000000000000002", + "allow_discussion": null, + "changeNote": "", + "contributors": [], + "created": "2016-01-21T04:14:48+00:00", "creators": [ - "test_user_1_", + "test_user_1_", "admin" - ], - "description": "This is a link", - "effective": null, - "exclude_from_nav": false, - "expires": null, - "id": "link", - "language": "", - "layout": "link_redirect_view", - "modified": "2016-01-21T04:24:11+00:00", + ], + "description": "This is a link", + "effective": null, + "exclude_from_nav": false, + "expires": null, + "id": "link", + "language": "", + "layout": "link_redirect_view", + "modified": "2016-01-21T04:24:11+00:00", "parent": { - "@id": "http://localhost:55001/plone", - "@type": "Plone Site", - "description": "", + "@id": "http://localhost:55001/plone", + "@type": "Plone Site", + "description": "", "title": "Plone site" - }, - "remoteUrl": "http://", - "review_state": "private", - "rights": "", + }, + "remoteUrl": "http://", + "review_state": "private", + "rights": "", "sharing": { - "@id": "http://localhost:55001/plone/link/@sharing", + "@id": "http://localhost:55001/plone/link/@sharing", "title": "Sharing" - }, - "subjects": [], + }, + "subjects": [], "title": "My Link" -} +} \ No newline at end of file diff --git a/docs/source/_json/newsitem.resp b/docs/source/_json/newsitem.resp index d0ae1c4fcb..7709cf293c 100644 --- a/docs/source/_json/newsitem.resp +++ b/docs/source/_json/newsitem.resp @@ -2,89 +2,89 @@ HTTP/1.1 200 OK Content-Type: application/json { - "@id": "http://localhost:55001/plone/newsitem", - "@type": "News Item", - "UID": "SomeUUID000000000000000000000002", - "allow_discussion": null, - "changeNote": "", - "contributors": [], - "created": "2016-01-21T02:14:48+00:00", + "@id": "http://localhost:55001/plone/newsitem", + "@type": "News Item", + "UID": "SomeUUID000000000000000000000002", + "allow_discussion": null, + "changeNote": "", + "contributors": [], + "created": "2016-01-21T02:14:48+00:00", "creators": [ - "test_user_1_", + "test_user_1_", "admin" - ], - "description": "This is a news item", - "effective": null, - "exclude_from_nav": false, - "expires": null, - "id": "newsitem", + ], + "description": "This is a news item", + "effective": null, + "exclude_from_nav": false, + "expires": null, + "id": "newsitem", "image": { - "content-type": "image/png", - "download": "http://localhost:55001/plone/newsitem/@@images/image", - "filename": "image.png", - "height": 56, + "content-type": "image/png", + "download": "http://localhost:55001/plone/newsitem/@@images/image", + "filename": "image.png", + "height": 56, "scales": { "icon": { - "download": "http://localhost:55001/plone/newsitem/@@images/image/icon", - "height": 8, + "download": "http://localhost:55001/plone/newsitem/@@images/image/icon", + "height": 8, "width": 32 - }, + }, "large": { - "download": "http://localhost:55001/plone/newsitem/@@images/image/large", - "height": 56, + "download": "http://localhost:55001/plone/newsitem/@@images/image/large", + "height": 56, "width": 215 - }, + }, "listing": { - "download": "http://localhost:55001/plone/newsitem/@@images/image/listing", - "height": 4, + "download": "http://localhost:55001/plone/newsitem/@@images/image/listing", + "height": 4, "width": 16 - }, + }, "mini": { - "download": "http://localhost:55001/plone/newsitem/@@images/image/mini", - "height": 52, + "download": "http://localhost:55001/plone/newsitem/@@images/image/mini", + "height": 52, "width": 200 - }, + }, "preview": { - "download": "http://localhost:55001/plone/newsitem/@@images/image/preview", - "height": 56, + "download": "http://localhost:55001/plone/newsitem/@@images/image/preview", + "height": 56, "width": 215 - }, + }, "thumb": { - "download": "http://localhost:55001/plone/newsitem/@@images/image/thumb", - "height": 33, + "download": "http://localhost:55001/plone/newsitem/@@images/image/thumb", + "height": 33, "width": 128 - }, + }, "tile": { - "download": "http://localhost:55001/plone/newsitem/@@images/image/tile", - "height": 16, + "download": "http://localhost:55001/plone/newsitem/@@images/image/tile", + "height": 16, "width": 64 } - }, - "size": 1185, + }, + "size": 1185, "width": 215 - }, - "image_caption": "This is an image caption.", - "language": "", - "layout": "newsitem_view", - "modified": "2016-01-21T02:24:11+00:00", + }, + "image_caption": "This is an image caption.", + "language": "", + "layout": "newsitem_view", + "modified": "2016-01-21T02:24:11+00:00", "parent": { - "@id": "http://localhost:55001/plone", - "@type": "Plone Site", - "description": "", + "@id": "http://localhost:55001/plone", + "@type": "Plone Site", + "description": "", "title": "Plone site" - }, - "relatedItems": [], - "review_state": "private", - "rights": "", + }, + "relatedItems": [], + "review_state": "private", + "rights": "", "sharing": { - "@id": "http://localhost:55001/plone/newsitem/@sharing", + "@id": "http://localhost:55001/plone/newsitem/@sharing", "title": "Sharing" - }, - "subjects": [], + }, + "subjects": [], "text": { - "content-type": "text/plain", - "data": "Lorem ipsum", + "content-type": "text/plain", + "data": "Lorem ipsum", "encoding": "utf-8" - }, + }, "title": "My News Item" -} +} \ No newline at end of file diff --git a/docs/source/_json/types_document.resp b/docs/source/_json/types_document.resp index 34c2dea867..7a4a181962 100644 --- a/docs/source/_json/types_document.resp +++ b/docs/source/_json/types_document.resp @@ -5,220 +5,220 @@ Content-Type: application/json+schema "fieldsets": [ { "fields": [ - "title", - "description", - "text", + "title", + "description", + "text", "changeNote" - ], - "id": "default", + ], + "id": "default", "title": "Default" - }, + }, { "fields": [ - "allow_discussion", - "exclude_from_nav", + "allow_discussion", + "exclude_from_nav", "table_of_contents" - ], - "id": "settings", + ], + "id": "settings", "title": "Settings" - }, + }, { "fields": [ - "subjects", - "language", + "subjects", + "language", "relatedItems" - ], - "id": "categorization", + ], + "id": "categorization", "title": "Categorization" - }, + }, { "fields": [ - "effective", + "effective", "expires" - ], - "id": "dates", + ], + "id": "dates", "title": "Dates" - }, + }, { "fields": [ - "creators", - "contributors", + "creators", + "contributors", "rights" - ], - "id": "ownership", + ], + "id": "ownership", "title": "Ownership" } - ], + ], "layouts": [ "document_view" - ], + ], "properties": { "allow_discussion": { "choices": [ [ - "True", + "True", "Yes" - ], + ], [ - "False", + "False", "No" ] - ], - "description": "Allow discussion for this content object.", + ], + "description": "Allow discussion for this content object.", "enum": [ - "True", + "True", "False" - ], + ], "enumNames": [ - "Yes", + "Yes", "No" - ], - "title": "Allow discussion", + ], + "title": "Allow discussion", "type": "string" - }, + }, "changeNote": { - "description": "Enter a comment that describes the changes you made.", - "title": "Change Note", + "description": "Enter a comment that describes the changes you made.", + "title": "Change Note", "type": "string" - }, + }, "contributors": { - "additionalItems": true, - "description": "The names of people that have contributed to this item. Each contributor should be on a separate line.", + "additionalItems": true, + "description": "The names of people that have contributed to this item. Each contributor should be on a separate line.", "items": { - "description": "", - "title": "", + "description": "", + "title": "", "type": "string" - }, - "title": "Contributors", - "type": "array", + }, + "title": "Contributors", + "type": "array", "uniqueItems": true - }, + }, "creators": { - "additionalItems": true, - "description": "Persons responsible for creating the content of this item. Please enter a list of user names, one per line. The principal creator should come first.", + "additionalItems": true, + "description": "Persons responsible for creating the content of this item. Please enter a list of user names, one per line. The principal creator should come first.", "items": { - "description": "", - "title": "", + "description": "", + "title": "", "type": "string" - }, - "title": "Creators", - "type": "array", + }, + "title": "Creators", + "type": "array", "uniqueItems": true - }, + }, "description": { - "description": "Used in item listings and search results.", - "minLength": 0, - "title": "Summary", - "type": "string", + "description": "Used in item listings and search results.", + "minLength": 0, + "title": "Summary", + "type": "string", "widget": "textarea" - }, + }, "effective": { - "description": "If this date is in the future, the content will not show up in listings and searches until this date.", - "title": "Publishing Date", - "type": "string", + "description": "If this date is in the future, the content will not show up in listings and searches until this date.", + "title": "Publishing Date", + "type": "string", "widget": "datetime" - }, + }, "exclude_from_nav": { - "default": false, - "description": "If selected, this item will not appear in the navigation tree", - "title": "Exclude from navigation", + "default": false, + "description": "If selected, this item will not appear in the navigation tree", + "title": "Exclude from navigation", "type": "boolean" - }, + }, "expires": { - "description": "When this date is reached, the content will nolonger be visible in listings and searches.", - "title": "Expiration Date", - "type": "string", + "description": "When this date is reached, the content will nolonger be visible in listings and searches.", + "title": "Expiration Date", + "type": "string", "widget": "datetime" - }, + }, "language": { "choices": [ [ - "de", + "de", "Deutsch" - ], + ], [ - "en", + "en", "English" - ], + ], [ - "es", + "es", "Espa\u00f1ol" - ], + ], [ - "fr", + "fr", "Fran\u00e7ais" ] - ], - "default": "en", - "description": "", + ], + "default": "en", + "description": "", "enum": [ - "de", - "en", - "es", + "de", + "en", + "es", "fr" - ], + ], "enumNames": [ - "Deutsch", - "English", - "Espa\u00f1ol", + "Deutsch", + "English", + "Espa\u00f1ol", "Fran\u00e7ais" - ], - "title": "Language", + ], + "title": "Language", "type": "string" - }, + }, "relatedItems": { - "additionalItems": true, - "default": [], - "description": "", + "additionalItems": true, + "default": [], + "description": "", "items": { - "description": "", - "title": "Related", + "description": "", + "title": "Related", "type": "string" - }, - "title": "Related Items", - "type": "array", + }, + "title": "Related Items", + "type": "array", "uniqueItems": true - }, + }, "rights": { - "description": "Copyright statement or other rights information on this item.", - "minLength": 0, - "title": "Rights", - "type": "string", + "description": "Copyright statement or other rights information on this item.", + "minLength": 0, + "title": "Rights", + "type": "string", "widget": "textarea" - }, + }, "subjects": { - "additionalItems": true, - "description": "Tags are commonly used for ad-hoc organization of content.", + "additionalItems": true, + "description": "Tags are commonly used for ad-hoc organization of content.", "items": { - "description": "", - "title": "", + "description": "", + "title": "", "type": "string" - }, - "title": "Tags", - "type": "array", + }, + "title": "Tags", + "type": "array", "uniqueItems": true - }, + }, "table_of_contents": { - "description": "If selected, this will show a table of contents at the top of the page.", - "title": "Table of contents", + "description": "If selected, this will show a table of contents at the top of the page.", + "title": "Table of contents", "type": "boolean" - }, + }, "text": { - "description": "", - "title": "Text", - "type": "string", + "description": "", + "title": "Text", + "type": "string", "widget": "richtext" - }, + }, "title": { - "description": "", - "title": "Title", + "description": "", + "title": "Title", "type": "string" } - }, + }, "required": [ - "title", + "title", "exclude_from_nav" - ], - "title": "Page", + ], + "title": "Page", "type": "object" -} +} \ No newline at end of file From 3b2c9e9162d61f4c9300852451da6e60ff98f230 Mon Sep 17 00:00:00 2001 From: Timo Stollenwerk Date: Mon, 17 Apr 2017 19:58:06 +0200 Subject: [PATCH 11/11] Move new features to the top of the changelog. --- CHANGES.rst | 17 ++++++++++------- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/CHANGES.rst b/CHANGES.rst index edf747b9e7..5b7abd84e1 100644 --- a/CHANGES.rst +++ b/CHANGES.rst @@ -4,20 +4,23 @@ Changelog 1.0a13 (unreleased) ------------------- +New Features: + +- Add support for setting/modifying 'layout' on DX and AT content endpoints. + [jaroel] + +- Add support for getting the defined layouts on the root types endpoint. + [jaroel] + Bugfixes: -- Add the title to the workflow history in the @workflow endpoint. This fixes - #279. +- Add the title to the workflow history in the @workflow endpoint. + This fixes #279. [sneridagh] - Don't fetch unnecessary PasswordResetTool in Plone 5.1 [tomgross] -New Features: -- Support setting/modifying 'layout' on DX and AT content endpoints - [jaroel] -- Support getting the defined layouts on the root types endpoint - [jaroel] 1.0a12 (2017-04-03) -------------------