From 87808d33b26c3b38bbd5e7e07e34ea92e765d59e Mon Sep 17 00:00:00 2001 From: tischsoic Date: Wed, 4 Sep 2024 16:02:25 +0200 Subject: [PATCH] Missing attribues, & Introduce x-ibexa-example-file --- .../examples/GET/Root.json.example | 93 + .../examples/GET/Root.xml.example | 25 + .../bookmark/GET/BookmarkList.json.example | 254 +++ .../bookmark/GET/BookmarkList.xml.example | 121 + .../assetId/assetSource/GET/Asset.xml.example | 15 + .../GET/ImageVariation.xml.example | 8 + .../locations/GET/LocationList.json.example | 80 + .../locations/GET/LocationList.xml.example | 38 + .../location_id/PATCH/Location.json.example | 80 + .../location_id/PATCH/Location.xml.example | 38 + .../PATCH/LocationUpdate.json.example | 9 + .../PATCH/LocationUpdate.xml.example | 8 + .../locations/path/GET/Location.json.example | 80 + .../locations/path/GET/Location.xml.example | 34 + .../children/GET/LocationList.xml.example | 7 + .../GET/UrlAliasRefList.xml.example | 5 + .../content/objects/POST/Content.json.example | 153 ++ .../content/objects/POST/Content.xml.example | 113 + .../objects/POST/ContentCreate.json.example | 49 + .../objects/POST/ContentCreate.xml.example | 36 + .../objects/POST/ContentInfo.xml.example | 17 + .../content_id/GET/Content.json.example | 136 ++ .../content_id/GET/Content.xml.example | 93 + .../content_id/GET/ContentInfo.xml.example | 0 .../content_id/PATCH/ContentInfo.xml.example | 17 + .../PATCH/ContentUpdate.xml.example | 9 + .../currentversion/COPY/Version.json.example | 89 + .../currentversion/COPY/Version.xml.example | 73 + .../currentversion/GET/Version.json.example | 89 + .../currentversion/GET/Version.xml.example | 73 + .../locations/GET/LocationList.json.example | 12 + .../locations/GET/LocationList.xml.example | 4 + .../locations/POST/Location.json.example | 80 + .../locations/POST/Location.xml.example | 38 + .../POST/LocationCreate.json.example | 12 + .../locations/POST/LocationCreate.xml.example | 8 + .../GET/ContentObjectStates.json.example | 23 + .../GET/ContentObjectStates.xml.example | 7 + .../ContentObjectStates.request.json.example | 9 + .../ContentObjectStates.request.xml.example | 4 + .../ContentObjectStates.response.json.example | 11 + .../ContentObjectStates.response.xml.example | 4 + .../versions/GET/VersionList.json.example | 125 + .../versions/GET/VersionList.xml.example | 69 + .../version_no/COPY/Version.json.example | 89 + .../version_no/COPY/Version.xml.example | 73 + .../version_no/GET/Version.json.example | 89 + .../version_no/GET/Version.xml.example | 73 + .../version_no/PATCH/Version.xml.example | 48 + .../PATCH/VersionUpdate.xml.example | 21 + .../relations/GET/RelationList.json.example | 21 + .../relations/GET/RelationList.xml.example | 8 + .../relations/POST/Relation.json.example | 15 + .../relations/POST/Relation.xml.example | 6 + .../POST/RelationCreate.json.example | 7 + .../relations/POST/RelationCreate.xml.example | 4 + .../relation_id/GET/Relation.xml.example | 6 + .../GET/ObjectStateGroupList.json.example | 92 + .../GET/ObjectStateGroupList.xml.example | 42 + .../POST/ObjectStateGroup.json.example | 30 + .../POST/ObjectStateGroup.xml.example | 14 + .../POST/ObjectStateGroupCreate.json.example | 22 + .../POST/ObjectStateGroupCreate.xml.example | 11 + .../GET/ObjectStateGroup.json.example | 30 + .../GET/ObjectStateGroup.xml.example | 14 + .../PATCH/ObjectStateGroup.json.example | 30 + .../PATCH/ObjectStateGroup.xml.example | 14 + .../PATCH/ObjectStateGroupUpdate.json.example | 12 + .../PATCH/ObjectStateGroupUpdate.xml.example | 6 + .../GET/ObjectStateList.json.example | 66 + .../GET/ObjectStateList.xml.example | 31 + .../POST/ObjectState.json.example | 31 + .../objectstates/POST/ObjectState.xml.example | 15 + .../POST/ObjectStateCreate.json.example | 24 + .../POST/ObjectStateCreate.xml.example | 12 + .../GET/ObjectState.json.example | 31 + .../GET/ObjectState.xml.example | 15 + .../PATCH/ObjectState.json.example | 31 + .../PATCH/ObjectState.xml.example | 15 + .../PATCH/ObjectStateUpdate.json.example | 12 + .../PATCH/ObjectStateUpdate.xml.example | 8 + .../sections/GET/SectionList.json.example | 50 + .../sections/GET/SectionList.xml.example | 33 + .../sections/POST/Section.json.example | 9 + .../content/sections/POST/Section.xml.example | 6 + .../sections/POST/SectionInput.json.example | 6 + .../sections/POST/SectionInput.xml.example | 5 + .../section_id/GET/Section.json.example | 9 + .../section_id/GET/Section.xml.example | 6 + .../section_id/PATCH/Section.json.example | 9 + .../section_id/PATCH/Section.xml.example | 6 + .../PATCH/SectionInput.json.example | 6 + .../section_id/PATCH/SectionInput.xml.example | 5 + .../content/trash/GET/Trash.json.example | 146 ++ .../content/trash/GET/Trash.xml.example | 34 + .../trash_itemid/GET/TrashItem.json.example | 71 + .../trash_itemid/GET/TrashItem.xml.example | 33 + .../GET/ContentTypeGroupList.json.example | 68 + .../GET/ContentTypeGroupList.xml.example | 30 + .../POST/ContentTypeGroup.json.example | 22 + .../POST/ContentTypeGroup.xml.example | 10 + .../POST/ContentTypeGroupInput.json.example | 5 + .../POST/ContentTypeGroupInput.xml.example | 4 + .../GET/ContentTypeGroup.json.example | 1595 +++++++++++++ .../GET/ContentTypeGroup.xml.example | 1034 +++++++++ .../PATCH/ContentTypeGroup.json.example | 22 + .../PATCH/ContentTypeGroup.xml.example | 10 + .../PATCH/ContentTypeGroupInput.json.example | 5 + .../PATCH/ContentTypeGroupInput.xml.example | 4 + .../GET/ContentTypeInfoList.json.example | 2011 +++++++++++++++++ .../types/GET/ContentTypeInfoList.xml.example | 49 + .../types/GET/ContentTypeList.xml.example | 184 ++ .../types/POST/ContentType.xml.example | 52 + .../types/POST/ContentTypeCreate.json.example | 86 + .../types/POST/ContentTypeCreate.xml.example | 56 + .../GET/ContentTypeInfoList.json.example | 733 ++++++ .../types/GET/ContentTypeInfoList.xml.example | 480 ++++ .../GET/ContentType.json.example | 303 +++ .../GET/ContentType.xml.example | 182 ++ .../POST/ContentTypeInfo.json.example | 46 + .../POST/ContentTypeInfo.xml.example | 24 + .../POST/ContentTypeUpdate.json.example | 6 + .../POST/ContentTypeUpdate.xml.example | 4 + .../draft/PATCH/ContentTypeInfo.json.example | 51 + .../draft/PATCH/ContentTypeInfo.xml.example | 26 + .../PATCH/ContentTypeUpdate.json.example | 21 + .../draft/PATCH/ContentTypeUpdate.xml.example | 9 + .../draft/PUBLISH/ContentType.xml.example | 50 + .../POST/FieldDefinition.xml.example | 22 + .../POST/FieldDefinitionCreate.xml.example | 12 + .../GET/FieldDefinition.json.example | 38 + .../GET/FieldDefinition.xml.example | 25 + .../PATCH/FieldDefinition.xml.example | 21 + .../PATCH/FieldDefinitionUpdate.xml.example | 5 + .../GET/FieldDefinition.json.example | 38 + .../GET/FieldDefinition.xml.example | 25 + .../GET/ContentTypeGroupRefList.json.example | 12 + .../GET/ContentTypeGroupRefList.xml.example | 4 + .../POST/ContentTypeGroupRefList.xml.example | 12 + .../ContentTypeGroupRefList.json.example | 24 + .../ContentTypeGroupRefList.xml.example | 9 + .../GET/UrlAliasRefList.json.example | 12 + .../GET/UrlAliasRefList.xml.example | 4 + .../urlaliases/POST/UrlAlias.json.example | 15 + .../urlaliases/POST/UrlAlias.xml.example | 10 + .../POST/UrlAliasCreate.json.example | 10 + .../POST/UrlAliasCreate.xml.example | 8 + .../url_alias_id/GET/UrlAlias.json.example | 15 + .../url_alias_id/GET/UrlAlias.xml.example | 10 + .../GET/UrlWildcardList.json.example | 16 + .../GET/UrlWildcardList.xml.example | 8 + .../POST/UrlWildcard.json.example | 10 + .../urlwildcards/POST/UrlWildcard.xml.example | 6 + .../POST/UrlWildcardCreate.json.example | 7 + .../POST/UrlWildcardCreate.xml.example | 6 + .../wildcard_id/GET/UrlWildcard.json.example | 10 + .../wildcard_id/GET/UrlWildcard.xml.example | 6 + .../countries/GET/CountriesList.xml.example | 1479 ++++++++++++ .../groups/GET/UserGroupList.json.example | 156 ++ .../user/groups/GET/UserGroupList.xml.example | 94 + .../GET/UserGroupRefList.json.example | 12 + .../GET/UserGroupRefList.xml.example | 4 + .../id/users/GET/UserRefList.json.example | 16 + .../id/users/GET/UserRefList.xml.example | 5 + .../groups/path/GET/UserGroup.json.example | 120 + .../groups/path/GET/UserGroup.xml.example | 62 + .../groups/path/PATCH/UserGroup.json.example | 120 + .../groups/path/PATCH/UserGroup.xml.example | 62 + .../path/PATCH/UserGroupUpdate.json.example | 7 + .../path/PATCH/UserGroupUpdate.xml.example | 4 + .../roles/GET/RoleAssigmentList.json.example | 10 + .../roles/GET/RoleAssignmentList.xml.example | 4 + .../roles/POST/RoleAssignInput.json.example | 23 + .../roles/POST/RoleAssignInput.xml.example | 10 + .../POST/RoleAssignmentList.json.example | 16 + .../roles/POST/RoleAssignmentList.xml.example | 27 + .../DELETE/RoleAssignmentList.json.example | 27 + .../DELETE/RoleAssignmentList.xml.example | 11 + .../role_id/GET/RoleAssignment.json.example | 10 + .../role_id/GET/RoleAssignment.xml.example | 4 + .../subgroups/POST/UserGroup.json.example | 120 + .../path/subgroups/POST/UserGroup.xml.example | 62 + .../POST/UserGroupCreate.json.example | 20 + .../POST/UserGroupCreate.xml.example | 17 + .../groups/path/users/POST/User.json.example | 149 ++ .../groups/path/users/POST/User.xml.example | 86 + .../path/users/POST/UserCreate.json.example | 35 + .../path/users/POST/UserCreate.xml.example | 32 + .../user/policies/GET/PolicyList.json.example | 104 + .../user/policies/GET/PolicyList.xml.example | 53 + .../user/roles/GET/RoleList.json.example | 71 + .../user/roles/GET/RoleList.xml.example | 31 + .../user/roles/POST/Role.json.example | 11 + .../examples/user/roles/POST/Role.xml.example | 5 + .../user/roles/POST/RoleInput.json.example | 5 + .../user/roles/POST/RoleInput.xml.example | 4 + .../user/roles/id/GET/Role.json.example | 11 + .../user/roles/id/GET/Role.xml.example | 5 + .../user/roles/id/PATCH/Role.json.example | 11 + .../user/roles/id/PATCH/Role.xml.example | 5 + .../roles/id/PATCH/RoleInput.json.example | 5 + .../user/roles/id/PATCH/RoleInput.xml.example | 4 + .../user/roles/id/POST/RoleDraft.json.example | 11 + .../user/roles/id/POST/RoleDraft.xml.example | 5 + .../user/roles/id/draft/GET/Role.json.example | 11 + .../user/roles/id/draft/GET/Role.xml.example | 5 + .../roles/id/draft/PATCH/Role.json.example | 11 + .../roles/id/draft/PATCH/Role.xml.example | 5 + .../id/draft/PATCH/RoleInput.json.example | 5 + .../id/draft/PATCH/RoleInput.xml.example | 4 + .../id/policies/GET/PolicyList.json.example | 104 + .../id/policies/GET/PolicyList.xml.example | 53 + .../roles/id/policies/POST/Policy.xml.example | 17 + .../id/policies/POST/PolicyCreate.xml.example | 17 + .../id/policies/id/GET/Policy.json.example | 9 + .../id/policies/id/GET/Policy.xml.example | 19 + .../id/policies/id/PATCH/Policy.xml.example | 17 + .../id/PATCH/PolicyUpdate.xml.example | 15 + .../user/sessions/POST/Session.json.example | 12 + .../user/sessions/POST/Session.xml.example | 7 + .../sessions/POST/SessionInput.json.example | 7 + .../sessions/POST/SessionInput.xml.example | 5 + .../refresh/POST/Session.json.example | 12 + .../refresh/POST/Session.xml.example | 7 + .../user/token/jwt/POST/JWT.json.example | 7 + .../user/token/jwt/POST/JWT.xml.example | 4 + .../user/token/jwt/POST/JWTInput.json.example | 7 + .../user/token/jwt/POST/JWTInput.xml.example | 4 + .../user/users/GET/UserList.json.example | 155 ++ .../user/users/GET/UserList.xml.example | 88 + .../user/users/GET/UserRefList.xml.example | 4 + .../user/users/user_id/GET/User.json.example | 155 ++ .../user/users/user_id/GET/User.xml.example | 96 + .../users/user_id/PATCH/User.json.example | 149 ++ .../user/users/user_id/PATCH/User.xml.example | 94 + .../user_id/PATCH/UserUpdate.json.example | 6 + .../user_id/PATCH/UserUpdate.xml.example | 5 + .../groups/GET/UserGroupRefList.xml.example | 9 + .../groups/POST/UserGroupRefList.json.example | 24 + .../groups/POST/UserGroupRefList.xml.example | 9 + .../DELETE/UserGroupRefList.xml.example | 10 + .../group_id/UserGroupRefList.json.example | 12 + .../roles/GET/RoleAssignmentList.json.example | 27 + .../roles/GET/RoleAssignmentList.xml.example | 11 + .../roles/POST/RoleAssignInput.json.example | 23 + .../roles/POST/RoleAssignInput.xml.example | 10 + .../POST/RoleAssignmentList.json.example | 46 + .../roles/POST/RoleAssignmentList.xml.example | 19 + .../DELETE/RoleAssignmentList.json.example | 24 + .../DELETE/RoleAssignmentList.xml.example | 15 + .../role_id/GET/RoleAssignment.json.example | 21 + .../role_id/GET/RoleAssignment.xml.example | 9 + .../examples/views/POST/View.xml.v11.example | 67 + .../views/POST/ViewInput.json.example | 28 + .../examples/views/POST/ViewInput.xml.example | 27 + .../api_platform/user/roles_schemas.yml | 273 +++ .../api_platform/user/sessions_schemas.yml | 52 + .../api_platform/user/token_schemas.yml | 39 + .../api_platform/user/user_groups_schemas.yml | 192 ++ .../api_platform/user/users_schemas.yml | 206 ++ src/bundle/Resources/config/api_platform.yml | 5 + src/lib/Server/Controller/Bookmark.php | 146 ++ src/lib/Server/Controller/Content.php | 1541 +++++++++++++ src/lib/Server/Controller/ContentType.php | 1482 +++++++++++- src/lib/Server/Controller/JWT.php | 72 + src/lib/Server/Controller/Location.php | 339 ++- src/lib/Server/Controller/ObjectState.php | 681 +++++- src/lib/Server/Controller/Role.php | 1190 +++++++++- src/lib/Server/Controller/Root.php | 42 + src/lib/Server/Controller/Section.php | 311 +++ src/lib/Server/Controller/Services.php | 41 + .../Server/Controller/SessionController.php | 282 +++ src/lib/Server/Controller/Trash.php | 151 ++ src/lib/Server/Controller/URLAlias.php | 209 ++ src/lib/Server/Controller/URLWildcard.php | 209 ++ src/lib/Server/Controller/User.php | 1481 ++++++++++++ src/lib/Server/Controller/Views.php | 69 + 277 files changed, 24993 insertions(+), 4 deletions(-) create mode 100644 src/bundle/Resources/api_platform/examples/GET/Root.json.example create mode 100644 src/bundle/Resources/api_platform/examples/GET/Root.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/bookmark/GET/BookmarkList.json.example create mode 100644 src/bundle/Resources/api_platform/examples/bookmark/GET/BookmarkList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/assets/images/assetId/assetSource/GET/Asset.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/binary/images/image_id/variations/variation_identifier/GET/ImageVariation.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/locations/GET/LocationList.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/locations/GET/LocationList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/locations/location_id/PATCH/Location.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/locations/location_id/PATCH/Location.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/locations/location_id/PATCH/LocationUpdate.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/locations/location_id/PATCH/LocationUpdate.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/locations/path/GET/Location.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/locations/path/GET/Location.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/locations/path/children/GET/LocationList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/locations/path/urlaliases/GET/UrlAliasRefList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/POST/Content.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/POST/Content.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/POST/ContentCreate.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/POST/ContentCreate.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/POST/ContentInfo.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/GET/Content.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/GET/Content.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/GET/ContentInfo.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/PATCH/ContentInfo.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/PATCH/ContentUpdate.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/currentversion/COPY/Version.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/currentversion/COPY/Version.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/currentversion/GET/Version.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/currentversion/GET/Version.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/locations/GET/LocationList.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/locations/GET/LocationList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/locations/POST/Location.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/locations/POST/Location.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/locations/POST/LocationCreate.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/locations/POST/LocationCreate.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/objectstates/GET/ContentObjectStates.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/objectstates/GET/ContentObjectStates.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/objectstates/PATCH/ContentObjectStates.request.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/objectstates/PATCH/ContentObjectStates.request.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/objectstates/PATCH/ContentObjectStates.response.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/objectstates/PATCH/ContentObjectStates.response.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/GET/VersionList.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/GET/VersionList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/COPY/Version.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/COPY/Version.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/GET/Version.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/GET/Version.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/PATCH/Version.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/PATCH/VersionUpdate.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/GET/RelationList.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/GET/RelationList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/POST/Relation.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/POST/Relation.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/POST/RelationCreate.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/POST/RelationCreate.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/relation_id/GET/Relation.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objectstategroups/GET/ObjectStateGroupList.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objectstategroups/GET/ObjectStateGroupList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objectstategroups/POST/ObjectStateGroup.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objectstategroups/POST/ObjectStateGroup.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objectstategroups/POST/ObjectStateGroupCreate.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objectstategroups/POST/ObjectStateGroupCreate.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/GET/ObjectStateGroup.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/GET/ObjectStateGroup.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/PATCH/ObjectStateGroup.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/PATCH/ObjectStateGroup.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/PATCH/ObjectStateGroupUpdate.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/PATCH/ObjectStateGroupUpdate.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/GET/ObjectStateList.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/GET/ObjectStateList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/POST/ObjectState.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/POST/ObjectState.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/POST/ObjectStateCreate.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/POST/ObjectStateCreate.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/object_state_id/GET/ObjectState.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/object_state_id/GET/ObjectState.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/object_state_id/PATCH/ObjectState.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/object_state_id/PATCH/ObjectState.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/object_state_id/PATCH/ObjectStateUpdate.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/object_state_id/PATCH/ObjectStateUpdate.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/sections/GET/SectionList.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/sections/GET/SectionList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/sections/POST/Section.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/sections/POST/Section.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/sections/POST/SectionInput.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/sections/POST/SectionInput.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/sections/section_id/GET/Section.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/sections/section_id/GET/Section.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/sections/section_id/PATCH/Section.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/sections/section_id/PATCH/Section.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/sections/section_id/PATCH/SectionInput.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/sections/section_id/PATCH/SectionInput.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/trash/GET/Trash.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/trash/GET/Trash.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/trash/trash_itemid/GET/TrashItem.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/trash/trash_itemid/GET/TrashItem.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/typegroups/GET/ContentTypeGroupList.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/typegroups/GET/ContentTypeGroupList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/typegroups/POST/ContentTypeGroup.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/typegroups/POST/ContentTypeGroup.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/typegroups/POST/ContentTypeGroupInput.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/typegroups/POST/ContentTypeGroupInput.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/GET/ContentTypeGroup.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/GET/ContentTypeGroup.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/PATCH/ContentTypeGroup.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/PATCH/ContentTypeGroup.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/PATCH/ContentTypeGroupInput.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/PATCH/ContentTypeGroupInput.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/types/GET/ContentTypeInfoList.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/types/GET/ContentTypeInfoList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/types/GET/ContentTypeList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/types/POST/ContentType.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/types/POST/ContentTypeCreate.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/types/POST/ContentTypeCreate.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/types/GET/ContentTypeInfoList.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/types/GET/ContentTypeInfoList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/types/content_type_id/GET/ContentType.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/types/content_type_id/GET/ContentType.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/types/content_type_id/POST/ContentTypeInfo.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/types/content_type_id/POST/ContentTypeInfo.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/types/content_type_id/POST/ContentTypeUpdate.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/types/content_type_id/POST/ContentTypeUpdate.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/PATCH/ContentTypeInfo.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/PATCH/ContentTypeInfo.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/PATCH/ContentTypeUpdate.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/PATCH/ContentTypeUpdate.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/PUBLISH/ContentType.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/field_definitions/POST/FieldDefinition.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/field_definitions/POST/FieldDefinitionCreate.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/field_definitions/field_definition_id/GET/FieldDefinition.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/field_definitions/field_definition_id/GET/FieldDefinition.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/field_definitions/field_definition_id/PATCH/FieldDefinition.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/field_definitions/field_definition_id/PATCH/FieldDefinitionUpdate.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/types/content_type_id/field_definition_id/GET/FieldDefinition.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/types/content_type_id/field_definition_id/GET/FieldDefinition.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/types/content_type_id/groups/GET/ContentTypeGroupRefList.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/types/content_type_id/groups/GET/ContentTypeGroupRefList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/types/content_type_id/groups/POST/ContentTypeGroupRefList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/types/content_type_id/groups/id/DELETE/ContentTypeGroupRefList.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/types/content_type_id/groups/id/DELETE/ContentTypeGroupRefList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/urlaliases/GET/UrlAliasRefList.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/urlaliases/GET/UrlAliasRefList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/urlaliases/POST/UrlAlias.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/urlaliases/POST/UrlAlias.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/urlaliases/POST/UrlAliasCreate.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/urlaliases/POST/UrlAliasCreate.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/urlaliases/url_alias_id/GET/UrlAlias.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/urlaliases/url_alias_id/GET/UrlAlias.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/urlwildcards/GET/UrlWildcardList.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/urlwildcards/GET/UrlWildcardList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/urlwildcards/POST/UrlWildcard.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/urlwildcards/POST/UrlWildcard.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/urlwildcards/POST/UrlWildcardCreate.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/urlwildcards/POST/UrlWildcardCreate.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/content/urlwildcards/wildcard_id/GET/UrlWildcard.json.example create mode 100644 src/bundle/Resources/api_platform/examples/content/urlwildcards/wildcard_id/GET/UrlWildcard.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/services/countries/GET/CountriesList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/groups/GET/UserGroupList.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/groups/GET/UserGroupList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/groups/id/subgroups/GET/UserGroupRefList.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/groups/id/subgroups/GET/UserGroupRefList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/groups/id/users/GET/UserRefList.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/groups/id/users/GET/UserRefList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/groups/path/GET/UserGroup.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/groups/path/GET/UserGroup.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/groups/path/PATCH/UserGroup.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/groups/path/PATCH/UserGroup.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/groups/path/PATCH/UserGroupUpdate.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/groups/path/PATCH/UserGroupUpdate.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/groups/path/roles/GET/RoleAssigmentList.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/groups/path/roles/GET/RoleAssignmentList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/groups/path/roles/POST/RoleAssignInput.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/groups/path/roles/POST/RoleAssignInput.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/groups/path/roles/POST/RoleAssignmentList.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/groups/path/roles/POST/RoleAssignmentList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/groups/path/roles/role_id/DELETE/RoleAssignmentList.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/groups/path/roles/role_id/DELETE/RoleAssignmentList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/groups/path/roles/role_id/GET/RoleAssignment.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/groups/path/roles/role_id/GET/RoleAssignment.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/groups/path/subgroups/POST/UserGroup.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/groups/path/subgroups/POST/UserGroup.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/groups/path/subgroups/POST/UserGroupCreate.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/groups/path/subgroups/POST/UserGroupCreate.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/groups/path/users/POST/User.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/groups/path/users/POST/User.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/groups/path/users/POST/UserCreate.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/groups/path/users/POST/UserCreate.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/policies/GET/PolicyList.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/policies/GET/PolicyList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/roles/GET/RoleList.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/roles/GET/RoleList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/roles/POST/Role.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/roles/POST/Role.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/roles/POST/RoleInput.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/roles/POST/RoleInput.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/roles/id/GET/Role.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/roles/id/GET/Role.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/roles/id/PATCH/Role.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/roles/id/PATCH/Role.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/roles/id/PATCH/RoleInput.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/roles/id/PATCH/RoleInput.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/roles/id/POST/RoleDraft.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/roles/id/POST/RoleDraft.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/roles/id/draft/GET/Role.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/roles/id/draft/GET/Role.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/roles/id/draft/PATCH/Role.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/roles/id/draft/PATCH/Role.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/roles/id/draft/PATCH/RoleInput.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/roles/id/draft/PATCH/RoleInput.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/roles/id/policies/GET/PolicyList.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/roles/id/policies/GET/PolicyList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/roles/id/policies/POST/Policy.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/roles/id/policies/POST/PolicyCreate.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/roles/id/policies/id/GET/Policy.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/roles/id/policies/id/GET/Policy.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/roles/id/policies/id/PATCH/Policy.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/roles/id/policies/id/PATCH/PolicyUpdate.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/sessions/POST/Session.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/sessions/POST/Session.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/sessions/POST/SessionInput.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/sessions/POST/SessionInput.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/sessions/session_id/refresh/POST/Session.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/sessions/session_id/refresh/POST/Session.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/token/jwt/POST/JWT.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/token/jwt/POST/JWT.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/token/jwt/POST/JWTInput.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/token/jwt/POST/JWTInput.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/users/GET/UserList.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/users/GET/UserList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/users/GET/UserRefList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/users/user_id/GET/User.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/users/user_id/GET/User.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/users/user_id/PATCH/User.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/users/user_id/PATCH/User.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/users/user_id/PATCH/UserUpdate.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/users/user_id/PATCH/UserUpdate.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/users/user_id/groups/GET/UserGroupRefList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/users/user_id/groups/POST/UserGroupRefList.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/users/user_id/groups/POST/UserGroupRefList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/users/user_id/groups/group_id/DELETE/UserGroupRefList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/users/user_id/groups/group_id/UserGroupRefList.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/users/user_id/roles/GET/RoleAssignmentList.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/users/user_id/roles/GET/RoleAssignmentList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/users/user_id/roles/POST/RoleAssignInput.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/users/user_id/roles/POST/RoleAssignInput.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/users/user_id/roles/POST/RoleAssignmentList.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/users/user_id/roles/POST/RoleAssignmentList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/DELETE/RoleAssignmentList.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/DELETE/RoleAssignmentList.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/GET/RoleAssignment.json.example create mode 100644 src/bundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/GET/RoleAssignment.xml.example create mode 100644 src/bundle/Resources/api_platform/examples/views/POST/View.xml.v11.example create mode 100644 src/bundle/Resources/api_platform/examples/views/POST/ViewInput.json.example create mode 100644 src/bundle/Resources/api_platform/examples/views/POST/ViewInput.xml.example create mode 100644 src/bundle/Resources/api_platform/user/roles_schemas.yml create mode 100644 src/bundle/Resources/api_platform/user/sessions_schemas.yml create mode 100644 src/bundle/Resources/api_platform/user/token_schemas.yml create mode 100644 src/bundle/Resources/api_platform/user/user_groups_schemas.yml create mode 100644 src/bundle/Resources/api_platform/user/users_schemas.yml diff --git a/src/bundle/Resources/api_platform/examples/GET/Root.json.example b/src/bundle/Resources/api_platform/examples/GET/Root.json.example new file mode 100644 index 000000000..e78d9b52b --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/GET/Root.json.example @@ -0,0 +1,93 @@ +{ + "Root": { + "_media-type": "application/vnd.ibexa.api.Root+json", + "content": { + "_href": "/api/ibexa/v2/content/objects", + "_media-type": "" + }, + "contentByRemoteId": { + "_href": "/api/ibexa/v2/content/objects{?remoteId}", + "_media-type": "" + }, + "contentTypeByIdentifier": { + "_href": "/api/ibexa/v2/content/types{?identifier}", + "_media-type": "" + }, + "contentTypeGroupByIdentifier": { + "_href": "/api/ibexa/v2/content/typegroups{?identifier}", + "_media-type": "" + }, + "contentTypeGroups": { + "_href": "/api/ibexa/v2/content/typegroups", + "_media-type": "application/vnd.ibexa.api.ContentTypeGroupList+json" + }, + "contentTypes": { + "_href": "/api/ibexa/v2/content/types", + "_media-type": "application/vnd.ibexa.api.ContentTypeInfoList+json" + }, + "createSession": { + "_href": "/api/ibexa/v2/user/sessions", + "_media-type": "application/vnd.ibexa.api.UserSession+json" + }, + "globalUrlAliases": { + "_href": "/api/ibexa/v2/content/urlaliases", + "_media-type": "application/vnd.ibexa.api.UrlAliasRefList+json" + }, + "locationByPath": { + "_href": "/api/ibexa/v2/content/locations{?locationPath}", + "_media-type": "" + }, + "locationByRemoteId": { + "_href": "/api/ibexa/v2/content/locations{?remoteId}", + "_media-type": "" + }, + "objectStateGroups": { + "_href": "/api/ibexa/v2/content/objectstategroups", + "_media-type": "application/vnd.ibexa.api.ObjectStateGroupList+json" + }, + "objectStates": { + "_href": "/api/ibexa/v2/content/objectstategroups/{objectStateGroupId}/objectstates", + "_media-type": "application/vnd.ibexa.api.ObjectStateList+json" + }, + "roles": { + "_href": "/api/ibexa/v2/user/roles", + "_media-type": "application/vnd.ibexa.api.RoleList+json" + }, + "rootLocation": { + "_href": "/api/ibexa/v2/content/locations/1/2", + "_media-type": "application/vnd.ibexa.api.Location+json" + }, + "rootMediaFolder": { + "_href": "/api/ibexa/v2/content/locations/1/43", + "_media-type": "application/vnd.ibexa.api.Location+json" + }, + "rootUserGroup": { + "_href": "/api/ibexa/v2/user/groups/1/5", + "_media-type": "application/vnd.ibexa.api.UserGroup+json" + }, + "sections": { + "_href": "/api/ibexa/v2/content/sections", + "_media-type": "application/vnd.ibexa.api.SectionList+json" + }, + "trash": { + "_href": "/api/ibexa/v2/content/trash", + "_media-type": "application/vnd.ibexa.api.Trash+json" + }, + "urlWildcards": { + "_href": "/api/ibexa/v2/content/urlwildcards", + "_media-type": "application/vnd.ibexa.api.UrlWildcardList+json" + }, + "users": { + "_href": "/api/ibexa/v2/user/users", + "_media-type": "application/vnd.ibexa.api.UserRefList+json" + }, + "views": { + "_href": "/api/ibexa/v2/views", + "_media-type": "application/vnd.ibexa.api.RefList+json" + }, + "refreshSession": { + "_media-type": "application\/vnd.ibexa.api.UserSession+json", + "_href": "\/api\/ezp\/v2\/user\/sessions\/{sessionId}\/refresh" + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/GET/Root.xml.example b/src/bundle/Resources/api_platform/examples/GET/Root.xml.example new file mode 100644 index 000000000..8019452d5 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/GET/Root.xml.example @@ -0,0 +1,25 @@ + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/src/bundle/Resources/api_platform/examples/bookmark/GET/BookmarkList.json.example b/src/bundle/Resources/api_platform/examples/bookmark/GET/BookmarkList.json.example new file mode 100644 index 000000000..ca99248ef --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/bookmark/GET/BookmarkList.json.example @@ -0,0 +1,254 @@ +{ + "BookmarkList": { + "_media-type": "application/vnd.ibexa.api.BookmarkList+json", + "count": 3, + "items": [ + { + "_media-type": "application/vnd.ibexa.api.Bookmark+json", + "__href": "/api/ibexa/v2/bookmark/65", + "Location": { + "_media-type": "application/vnd.ibexa.api.Location+json", + "_href": "/api/ibexa/v2/content/locations/1/2/57/65", + "id": 65, + "priority": 0, + "hidden": false, + "invisible": false, + "explicitlyHidden": false, + "ParentLocation": { + "_media-type": "application/vnd.ibexa.api.Location+json", + "_href": "/api/ibexa/v2/content/locations/1/2/57" + }, + "pathString": "/1/2/57/65/", + "depth": 3, + "childCount": 0, + "remoteId": "aa538e305aea472eb221ce23d1cc4b50", + "Children": { + "_media-type": "application/vnd.ibexa.api.LocationList+json", + "_href": "/api/ibexa/v2/content/locations/1/2/57/65/children" + }, + "Content": { + "_media-type": "application/vnd.ibexa.api.Content+json", + "_href": "/api/ibexa/v2/content/objects/63" + }, + "sortField": "PATH", + "sortOrder": "ASC", + "UrlAliases": { + "_media-type": "application/vnd.ibexa.api.UrlAliasRefList+json", + "_href": "/api/ibexa/v2/content/locations/1/2/57/65/urlaliases" + }, + "ContentInfo": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/63", + "Content": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/63", + "_remoteId": "211e99934c8fef5900e4813b96ec5c87", + "_id": 63, + "ContentType": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/2" + }, + "Name": "Art3", + "TranslatedName": "Art3", + "Versions": { + "_media-type": "application/vnd.ibexa.api.VersionList+json", + "_href": "/api/ibexa/v2/content/objects/63/versions" + }, + "CurrentVersion": { + "_media-type": "application/vnd.ibexa.api.Version+json", + "_href": "/api/ibexa/v2/content/objects/63/currentversion" + }, + "Section": { + "_media-type": "application/vnd.ibexa.api.Section+json", + "_href": "/api/ibexa/v2/content/sections/1" + }, + "Locations": { + "_media-type": "application/vnd.ibexa.api.LocationList+json", + "_href": "/api/ibexa/v2/content/objects/63/locations" + }, + "Owner": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "lastModificationDate": "2021-06-28T11:34:17+00:00", + "publishedDate": "2021-06-28T11:34:17+00:00", + "mainLanguageCode": "eng-GB", + "currentVersionNo": 1, + "alwaysAvailable": false, + "isHidden": false, + "status": "PUBLISHED", + "ObjectStates": { + "_media-type": "application/vnd.ibexa.api.ContentObjectStates+json", + "_href": "/api/ibexa/v2/content/objects/63/objectstates" + } + } + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.Bookmark+json", + "__href": "/api/ibexa/v2/bookmark/68", + "Location": { + "_media-type": "application/vnd.ibexa.api.Location+json", + "_href": "/api/ibexa/v2/content/locations/1/2/58/68", + "id": 68, + "priority": 0, + "hidden": false, + "invisible": false, + "explicitlyHidden": false, + "ParentLocation": { + "_media-type": "application/vnd.ibexa.api.Location+json", + "_href": "/api/ibexa/v2/content/locations/1/2/58" + }, + "pathString": "/1/2/58/68/", + "depth": 3, + "childCount": 0, + "remoteId": "b8cc4627dbc3ca693c85b6b06a8f7492", + "Children": { + "_media-type": "application/vnd.ibexa.api.LocationList+json", + "_href": "/api/ibexa/v2/content/locations/1/2/58/68/children" + }, + "Content": { + "_media-type": "application/vnd.ibexa.api.Content+json", + "_href": "/api/ibexa/v2/content/objects/67" + }, + "sortField": "PUBLISHED", + "sortOrder": "DESC", + "UrlAliases": { + "_media-type": "application/vnd.ibexa.api.UrlAliasRefList+json", + "_href": "/api/ibexa/v2/content/locations/1/2/58/68/urlaliases" + }, + "ContentInfo": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/67", + "Content": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/67", + "_remoteId": "180adb876af5755d65c1a362fcd619c8", + "_id": 67, + "ContentType": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/45" + }, + "Name": "Tip1", + "TranslatedName": "Tip1", + "Versions": { + "_media-type": "application/vnd.ibexa.api.VersionList+json", + "_href": "/api/ibexa/v2/content/objects/67/versions" + }, + "CurrentVersion": { + "_media-type": "application/vnd.ibexa.api.Version+json", + "_href": "/api/ibexa/v2/content/objects/67/currentversion" + }, + "Section": { + "_media-type": "application/vnd.ibexa.api.Section+json", + "_href": "/api/ibexa/v2/content/sections/1" + }, + "Locations": { + "_media-type": "application/vnd.ibexa.api.LocationList+json", + "_href": "/api/ibexa/v2/content/objects/67/locations" + }, + "Owner": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "lastModificationDate": "2021-06-28T11:36:21+00:00", + "publishedDate": "2021-06-28T11:36:21+00:00", + "mainLanguageCode": "eng-GB", + "currentVersionNo": 1, + "alwaysAvailable": true, + "isHidden": false, + "status": "PUBLISHED", + "ObjectStates": { + "_media-type": "application/vnd.ibexa.api.ContentObjectStates+json", + "_href": "/api/ibexa/v2/content/objects/67/objectstates" + } + } + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.Bookmark+json", + "__href": "/api/ibexa/v2/bookmark/59", + "Location": { + "_media-type": "application/vnd.ibexa.api.Location+json", + "_href": "/api/ibexa/v2/content/locations/1/2/59", + "id": 59, + "priority": 0, + "hidden": false, + "invisible": false, + "explicitlyHidden": false, + "ParentLocation": { + "_media-type": "application/vnd.ibexa.api.Location+json", + "_href": "/api/ibexa/v2/content/locations/1/2" + }, + "pathString": "/1/2/59/", + "depth": 2, + "childCount": 3, + "remoteId": "fd949fc2eed1fff847d73021ff1a6ea9", + "Children": { + "_media-type": "application/vnd.ibexa.api.LocationList+json", + "_href": "/api/ibexa/v2/content/locations/1/2/59/children" + }, + "Content": { + "_media-type": "application/vnd.ibexa.api.Content+json", + "_href": "/api/ibexa/v2/content/objects/58" + }, + "sortField": "PATH", + "sortOrder": "ASC", + "UrlAliases": { + "_media-type": "application/vnd.ibexa.api.UrlAliasRefList+json", + "_href": "/api/ibexa/v2/content/locations/1/2/59/urlaliases" + }, + "ContentInfo": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/58", + "Content": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/58", + "_remoteId": "00b513aae54036a16e00fb3365c4b5f3", + "_id": 58, + "ContentType": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/1" + }, + "Name": "Dog Breed Catalog", + "TranslatedName": "Dog Breed Catalog", + "Versions": { + "_media-type": "application/vnd.ibexa.api.VersionList+json", + "_href": "/api/ibexa/v2/content/objects/58/versions" + }, + "CurrentVersion": { + "_media-type": "application/vnd.ibexa.api.Version+json", + "_href": "/api/ibexa/v2/content/objects/58/currentversion" + }, + "Section": { + "_media-type": "application/vnd.ibexa.api.Section+json", + "_href": "/api/ibexa/v2/content/sections/1" + }, + "Locations": { + "_media-type": "application/vnd.ibexa.api.LocationList+json", + "_href": "/api/ibexa/v2/content/objects/58/locations" + }, + "Owner": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "lastModificationDate": "2021-06-28T11:23:10+00:00", + "publishedDate": "2021-06-28T11:23:10+00:00", + "mainLanguageCode": "eng-GB", + "currentVersionNo": 1, + "alwaysAvailable": true, + "isHidden": false, + "status": "PUBLISHED", + "ObjectStates": { + "_media-type": "application/vnd.ibexa.api.ContentObjectStates+json", + "_href": "/api/ibexa/v2/content/objects/58/objectstates" + } + } + } + } + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/bookmark/GET/BookmarkList.xml.example b/src/bundle/Resources/api_platform/examples/bookmark/GET/BookmarkList.xml.example new file mode 100644 index 000000000..627155bff --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/bookmark/GET/BookmarkList.xml.example @@ -0,0 +1,121 @@ + + + 3 + + + 65 + 0 + false + false + false + + /1/2/57/65/ + 3 + 0 + aa538e305aea472eb221ce23d1cc4b50 + + + PATH + ASC + + + + + Art3 + Art3 + + +
+ + + 2021-06-28T11:34:17+00:00 + 2021-06-28T11:34:17+00:00 + eng-GB + 1 + false + false + PUBLISHED + + + + + + + + 68 + 0 + false + false + false + + /1/2/58/68/ + 3 + 0 + b8cc4627dbc3ca693c85b6b06a8f7492 + + + PUBLISHED + DESC + + + + + Tip1 + Tip1 + + +
+ + + 2021-06-28T11:36:21+00:00 + 2021-06-28T11:36:21+00:00 + eng-GB + 1 + true + false + PUBLISHED + + + + + + + + 59 + 0 + false + false + false + + /1/2/59/ + 2 + 3 + fd949fc2eed1fff847d73021ff1a6ea9 + + + PATH + ASC + + + + + Dog Breed Catalog + Dog Breed Catalog + + +
+ + + 2021-06-28T11:23:10+00:00 + 2021-06-28T11:23:10+00:00 + eng-GB + 1 + true + false + PUBLISHED + + + + + + diff --git a/src/bundle/Resources/api_platform/examples/content/assets/images/assetId/assetSource/GET/Asset.xml.example b/src/bundle/Resources/api_platform/examples/content/assets/images/assetId/assetSource/GET/Asset.xml.example new file mode 100644 index 000000000..e3dfbbc47 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/assets/images/assetId/assetSource/GET/Asset.xml.example @@ -0,0 +1,15 @@ + + + https://images.unsplash.com/photo-1544568100-847a948585b9?ixlib=rb-1.2.1&ixid=eyJhcHBfaWQiOjE1MDk5MH0 + UtrE5DcgEyg + unsplash + + medium-coated brown dog during daytime + 5184 + 3888 + 2018-12-11T17:46:12-05:00 + 2020-10-23T23:08:44-04:00 + Jamie Street + https://unsplash.com/@jamie452?utm_source=Ibexa+Platform+DAM+Connector&utm_medium=referral&utm_campaign=api-credit + + diff --git a/src/bundle/Resources/api_platform/examples/content/binary/images/image_id/variations/variation_identifier/GET/ImageVariation.xml.example b/src/bundle/Resources/api_platform/examples/content/binary/images/image_id/variations/variation_identifier/GET/ImageVariation.xml.example new file mode 100644 index 000000000..b9455ea03 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/binary/images/image_id/variations/variation_identifier/GET/ImageVariation.xml.example @@ -0,0 +1,8 @@ + + + http://127.0.0.1:8000/var/site/storage/images/_aliases/large/6/1/2/0/216-1-eng-GB/ez-logo-small.png + image/png + 20 + 20 + 1709 + diff --git a/src/bundle/Resources/api_platform/examples/content/locations/GET/LocationList.json.example b/src/bundle/Resources/api_platform/examples/content/locations/GET/LocationList.json.example new file mode 100644 index 000000000..387248e5b --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/locations/GET/LocationList.json.example @@ -0,0 +1,80 @@ +{ + "Location": { + "_media-type": "application/vnd.ibexa.api.Location+json", + "_href": "/api/ibexa/v2/content/locations/1/2/58", + "id": 58, + "priority": 0, + "hidden": false, + "invisible": false, + "explicitlyHidden": false, + "ParentLocation": { + "_media-type": "application/vnd.ibexa.api.Location+json", + "_href": "/api/ibexa/v2/content/locations/1/2" + }, + "pathString": "/1/2/58/", + "depth": 2, + "childCount": 3, + "remoteId": "0cfe62f27753448d79aaa8acd8d01699", + "Children": { + "_media-type": "application/vnd.ibexa.api.LocationList+json", + "_href": "/api/ibexa/v2/content/locations/1/2/58/children" + }, + "Content": { + "_media-type": "application/vnd.ibexa.api.Content+json", + "_href": "/api/ibexa/v2/content/objects/57" + }, + "sortField": "PATH", + "sortOrder": "ASC", + "UrlAliases": { + "_media-type": "application/vnd.ibexa.api.UrlAliasRefList+json", + "_href": "/api/ibexa/v2/content/locations/1/2/58/urlaliases" + }, + "ContentInfo": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/57", + "Content": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/57", + "_remoteId": "782f5afa9d6587804daa911e88ff5bb9", + "_id": 57, + "ContentType": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/1" + }, + "Name": "All Tips", + "TranslatedName": "All Tips", + "Versions": { + "_media-type": "application/vnd.ibexa.api.VersionList+json", + "_href": "/api/ibexa/v2/content/objects/57/versions" + }, + "CurrentVersion": { + "_media-type": "application/vnd.ibexa.api.Version+json", + "_href": "/api/ibexa/v2/content/objects/57/currentversion" + }, + "Section": { + "_media-type": "application/vnd.ibexa.api.Section+json", + "_href": "/api/ibexa/v2/content/sections/1" + }, + "Locations": { + "_media-type": "application/vnd.ibexa.api.LocationList+json", + "_href": "/api/ibexa/v2/content/objects/57/locations" + }, + "Owner": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "lastModificationDate": "2021-06-28T11:22:52+00:00", + "publishedDate": "2021-06-28T11:22:52+00:00", + "mainLanguageCode": "eng-GB", + "currentVersionNo": 1, + "alwaysAvailable": true, + "isHidden": false, + "status": "PUBLISHED", + "ObjectStates": { + "_media-type": "application/vnd.ibexa.api.ContentObjectStates+json", + "_href": "/api/ibexa/v2/content/objects/57/objectstates" + } + } + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/locations/GET/LocationList.xml.example b/src/bundle/Resources/api_platform/examples/content/locations/GET/LocationList.xml.example new file mode 100644 index 000000000..d3401621c --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/locations/GET/LocationList.xml.example @@ -0,0 +1,38 @@ + + + 58 + 0 + false + false + false + + /1/2/58/ + 2 + 3 + 0cfe62f27753448d79aaa8acd8d01699 + + + PATH + ASC + + + + + All Tips + All Tips + + +
+ + + 2021-06-28T11:22:52+00:00 + 2021-06-28T11:22:52+00:00 + eng-GB + 1 + true + false + PUBLISHED + + + + diff --git a/src/bundle/Resources/api_platform/examples/content/locations/location_id/PATCH/Location.json.example b/src/bundle/Resources/api_platform/examples/content/locations/location_id/PATCH/Location.json.example new file mode 100644 index 000000000..e7bff475d --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/locations/location_id/PATCH/Location.json.example @@ -0,0 +1,80 @@ +{ + "Location": { + "_media-type": "application/vnd.ibexa.api.Location+json", + "_href": "/api/ibexa/v2/content/locations/1/2/59", + "id": 59, + "priority": 3, + "hidden": true, + "invisible": true, + "explicitlyHidden": true, + "ParentLocation": { + "_media-type": "application/vnd.ibexa.api.Location+json", + "_href": "/api/ibexa/v2/content/locations/1/2" + }, + "pathString": "/1/2/59/", + "depth": 2, + "childCount": 5, + "remoteId": "remoteId-qwert999", + "Children": { + "_media-type": "application/vnd.ibexa.api.LocationList+json", + "_href": "/api/ibexa/v2/content/locations/1/2/59/children" + }, + "Content": { + "_media-type": "application/vnd.ibexa.api.Content+json", + "_href": "/api/ibexa/v2/content/objects/58" + }, + "sortField": "NAME", + "sortOrder": "DESC", + "UrlAliases": { + "_media-type": "application/vnd.ibexa.api.UrlAliasRefList+json", + "_href": "/api/ibexa/v2/content/locations/1/2/59/urlaliases" + }, + "ContentInfo": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/58", + "Content": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/58", + "_remoteId": "00b513aae54036a16e00fb3365c4b5f3", + "_id": 58, + "ContentType": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/1" + }, + "Name": "Dog Breed Catalog", + "TranslatedName": "Dog Breed Catalog", + "Versions": { + "_media-type": "application/vnd.ibexa.api.VersionList+json", + "_href": "/api/ibexa/v2/content/objects/58/versions" + }, + "CurrentVersion": { + "_media-type": "application/vnd.ibexa.api.Version+json", + "_href": "/api/ibexa/v2/content/objects/58/currentversion" + }, + "Section": { + "_media-type": "application/vnd.ibexa.api.Section+json", + "_href": "/api/ibexa/v2/content/sections/1" + }, + "Locations": { + "_media-type": "application/vnd.ibexa.api.LocationList+json", + "_href": "/api/ibexa/v2/content/objects/58/locations" + }, + "Owner": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "lastModificationDate": "2021-06-28T11:23:10+00:00", + "publishedDate": "2021-06-28T11:23:10+00:00", + "mainLanguageCode": "eng-GB", + "currentVersionNo": 1, + "alwaysAvailable": true, + "isHidden": false, + "status": "PUBLISHED", + "ObjectStates": { + "_media-type": "application/vnd.ibexa.api.ContentObjectStates+json", + "_href": "/api/ibexa/v2/content/objects/58/objectstates" + } + } + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/locations/location_id/PATCH/Location.xml.example b/src/bundle/Resources/api_platform/examples/content/locations/location_id/PATCH/Location.xml.example new file mode 100644 index 000000000..d3401621c --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/locations/location_id/PATCH/Location.xml.example @@ -0,0 +1,38 @@ + + + 58 + 0 + false + false + false + + /1/2/58/ + 2 + 3 + 0cfe62f27753448d79aaa8acd8d01699 + + + PATH + ASC + + + + + All Tips + All Tips + + +
+ + + 2021-06-28T11:22:52+00:00 + 2021-06-28T11:22:52+00:00 + eng-GB + 1 + true + false + PUBLISHED + + + + diff --git a/src/bundle/Resources/api_platform/examples/content/locations/location_id/PATCH/LocationUpdate.json.example b/src/bundle/Resources/api_platform/examples/content/locations/location_id/PATCH/LocationUpdate.json.example new file mode 100644 index 000000000..e7a29a87a --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/locations/location_id/PATCH/LocationUpdate.json.example @@ -0,0 +1,9 @@ +{ + "LocationUpdate": { + "priority": "3", + "hidden": true, + "remoteId": "remoteId-qwert999", + "sortField": "NAME", + "sortOrder": "DESC" + } +} \ No newline at end of file diff --git a/src/bundle/Resources/api_platform/examples/content/locations/location_id/PATCH/LocationUpdate.xml.example b/src/bundle/Resources/api_platform/examples/content/locations/location_id/PATCH/LocationUpdate.xml.example new file mode 100644 index 000000000..c4ffb31f0 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/locations/location_id/PATCH/LocationUpdate.xml.example @@ -0,0 +1,8 @@ + + + 3 + true + remoteId-qwert999 + CLASS + DESC + diff --git a/src/bundle/Resources/api_platform/examples/content/locations/path/GET/Location.json.example b/src/bundle/Resources/api_platform/examples/content/locations/path/GET/Location.json.example new file mode 100644 index 000000000..387248e5b --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/locations/path/GET/Location.json.example @@ -0,0 +1,80 @@ +{ + "Location": { + "_media-type": "application/vnd.ibexa.api.Location+json", + "_href": "/api/ibexa/v2/content/locations/1/2/58", + "id": 58, + "priority": 0, + "hidden": false, + "invisible": false, + "explicitlyHidden": false, + "ParentLocation": { + "_media-type": "application/vnd.ibexa.api.Location+json", + "_href": "/api/ibexa/v2/content/locations/1/2" + }, + "pathString": "/1/2/58/", + "depth": 2, + "childCount": 3, + "remoteId": "0cfe62f27753448d79aaa8acd8d01699", + "Children": { + "_media-type": "application/vnd.ibexa.api.LocationList+json", + "_href": "/api/ibexa/v2/content/locations/1/2/58/children" + }, + "Content": { + "_media-type": "application/vnd.ibexa.api.Content+json", + "_href": "/api/ibexa/v2/content/objects/57" + }, + "sortField": "PATH", + "sortOrder": "ASC", + "UrlAliases": { + "_media-type": "application/vnd.ibexa.api.UrlAliasRefList+json", + "_href": "/api/ibexa/v2/content/locations/1/2/58/urlaliases" + }, + "ContentInfo": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/57", + "Content": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/57", + "_remoteId": "782f5afa9d6587804daa911e88ff5bb9", + "_id": 57, + "ContentType": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/1" + }, + "Name": "All Tips", + "TranslatedName": "All Tips", + "Versions": { + "_media-type": "application/vnd.ibexa.api.VersionList+json", + "_href": "/api/ibexa/v2/content/objects/57/versions" + }, + "CurrentVersion": { + "_media-type": "application/vnd.ibexa.api.Version+json", + "_href": "/api/ibexa/v2/content/objects/57/currentversion" + }, + "Section": { + "_media-type": "application/vnd.ibexa.api.Section+json", + "_href": "/api/ibexa/v2/content/sections/1" + }, + "Locations": { + "_media-type": "application/vnd.ibexa.api.LocationList+json", + "_href": "/api/ibexa/v2/content/objects/57/locations" + }, + "Owner": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "lastModificationDate": "2021-06-28T11:22:52+00:00", + "publishedDate": "2021-06-28T11:22:52+00:00", + "mainLanguageCode": "eng-GB", + "currentVersionNo": 1, + "alwaysAvailable": true, + "isHidden": false, + "status": "PUBLISHED", + "ObjectStates": { + "_media-type": "application/vnd.ibexa.api.ContentObjectStates+json", + "_href": "/api/ibexa/v2/content/objects/57/objectstates" + } + } + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/locations/path/GET/Location.xml.example b/src/bundle/Resources/api_platform/examples/content/locations/path/GET/Location.xml.example new file mode 100644 index 000000000..f45e159a5 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/locations/path/GET/Location.xml.example @@ -0,0 +1,34 @@ + + + 61 + 0 + false + false + + /1/2/61/ + 2 + 0 + 2cfa66027e3806b113d994c9c26d3a66 + + + NAME + ASC + + + + + 666 + + +
+ + + 2018-11-09T14:49:52+01:00 + 2018-11-09T14:49:52+01:00 + eng-GB + 1 + false + + + + diff --git a/src/bundle/Resources/api_platform/examples/content/locations/path/children/GET/LocationList.xml.example b/src/bundle/Resources/api_platform/examples/content/locations/path/children/GET/LocationList.xml.example new file mode 100644 index 000000000..82e59109a --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/locations/path/children/GET/LocationList.xml.example @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/bundle/Resources/api_platform/examples/content/locations/path/urlaliases/GET/UrlAliasRefList.xml.example b/src/bundle/Resources/api_platform/examples/content/locations/path/urlaliases/GET/UrlAliasRefList.xml.example new file mode 100644 index 000000000..26a02c360 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/locations/path/urlaliases/GET/UrlAliasRefList.xml.example @@ -0,0 +1,5 @@ + + + + + diff --git a/src/bundle/Resources/api_platform/examples/content/objects/POST/Content.json.example b/src/bundle/Resources/api_platform/examples/content/objects/POST/Content.json.example new file mode 100644 index 000000000..5e8bd68f3 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/POST/Content.json.example @@ -0,0 +1,153 @@ +{ + "Content": { + "_media-type": "application/vnd.ibexa.api.Content+json", + "_href": "/api/ibexa/v2/content/objects/109", + "_remoteId": "8716f007ba15f6f35139acb55e39b811", + "_id": 109, + "ContentType": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/2" + }, + "Name": "draft article", + "TranslatedName": "draft article", + "Versions": { + "_media-type": "application/vnd.ibexa.api.VersionList+json", + "_href": "/api/ibexa/v2/content/objects/109/versions" + }, + "CurrentVersion": { + "_media-type": "application/vnd.ibexa.api.Version+json", + "_href": "/api/ibexa/v2/content/objects/109/currentversion", + "Version": { + "_media-type": "application/vnd.ibexa.api.Version+json", + "_href": "/api/ibexa/v2/content/objects/109/versions/1", + "VersionInfo": { + "id": 587, + "versionNo": 1, + "status": "DRAFT", + "modificationDate": "2023-05-24T06:27:54+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "creationDate": "2023-05-24T06:27:54+00:00", + "initialLanguageCode": "eng-GB", + "languageCodes": "eng-GB", + "VersionTranslationInfo": { + "_media-type": "application/vnd.ibexa.api.VersionTranslationInfo+json", + "Language": [ + { + "languageCode": "eng-GB" + } + ] + }, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "draft article" + } + ] + }, + "Content": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/109" + } + }, + "Fields": { + "field": [ + { + "id": 488, + "fieldDefinitionIdentifier": "title", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezstring", + "fieldValue": "draft article" + }, + { + "id": 489, + "fieldDefinitionIdentifier": "short_title", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezstring", + "fieldValue": null + }, + { + "id": 490, + "fieldDefinitionIdentifier": "author", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezauthor", + "fieldValue": [] + }, + { + "id": 491, + "fieldDefinitionIdentifier": "intro", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezrichtext", + "fieldValue": { + "xml": "\n
draft draft
\n", + "xhtml5edit": "\n

draft draft

\n" + } + }, + { + "id": 492, + "fieldDefinitionIdentifier": "body", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezrichtext", + "fieldValue": { + "xml": "\n
draft draft draft
\n", + "xhtml5edit": "\n

draft draft draft

\n" + } + }, + { + "id": 493, + "fieldDefinitionIdentifier": "enable_comments", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezboolean", + "fieldValue": false + }, + { + "id": 494, + "fieldDefinitionIdentifier": "image", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezobjectrelation", + "fieldValue": { + "destinationContentId": null + } + } + ] + }, + "Relations": { + "_media-type": "application/vnd.ibexa.api.RelationList+json", + "_href": "/api/ibexa/v2/content/objects/109/versions/1/relations", + "Relation": [] + }, + "Thumbnail": { + "_media-type": "application/vnd.ibexa.api.Thumbnail+json", + "resource": "/placeholder", + "width": null, + "height": null, + "mimeType": "image/svg+xml" + } + } + }, + "Section": { + "_media-type": "application/vnd.ibexa.api.Section+json", + "_href": "/api/ibexa/v2/content/sections/1" + }, + "Locations": { + "_media-type": "application/vnd.ibexa.api.LocationList+json", + "_href": "/api/ibexa/v2/content/objects/109/locations" + }, + "Owner": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "mainLanguageCode": "eng-GB", + "currentVersionNo": 1, + "alwaysAvailable": true, + "isHidden": false, + "status": "DRAFT", + "ObjectStates": { + "_media-type": "application/vnd.ibexa.api.ContentObjectStates+json", + "_href": "/api/ibexa/v2/content/objects/109/objectstates" + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/objects/POST/Content.xml.example b/src/bundle/Resources/api_platform/examples/content/objects/POST/Content.xml.example new file mode 100644 index 000000000..35f5cbb16 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/POST/Content.xml.example @@ -0,0 +1,113 @@ + + + + draft article + draft article + + + + + 586 + 1 + DRAFT + 2023-05-24T06:24:46+00:00 + + 2023-05-24T06:24:46+00:00 + eng-GB + eng-GB + + + eng-GB + + + + draft article + + + + + + 481 + title + eng-GB + ezstring + draft article + + + 482 + short_title + eng-GB + ezstring + + + + 483 + author + eng-GB + ezauthor + + + + 484 + intro + eng-GB + ezrichtext + + <?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ezxhtml="http://ibexa.co/xmlns/dxp/docbook/xhtml" xmlns:ezcustom="http://ibexa.co/xmlns/dxp/docbook/custom" version="5.0-variant ezpublish-1.0"><para>draft draft</para></section> + + <?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"><p>draft draft</p></section> + + + + + 485 + body + eng-GB + ezrichtext + + <?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:ezxhtml="http://ibexa.co/xmlns/dxp/docbook/xhtml" xmlns:ezcustom="http://ibexa.co/xmlns/dxp/docbook/custom" version="5.0-variant ezpublish-1.0"><para>draft draft draft</para></section> + + <?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"><p>draft draft draft</p></section> + + + + + 486 + enable_comments + eng-GB + ezboolean + false + + + 487 + image + eng-GB + ezobjectrelation + + + + + + + + /placeholder + + + image/svg+xml + + + +
+ + + eng-GB + 1 + true + false + DRAFT + + diff --git a/src/bundle/Resources/api_platform/examples/content/objects/POST/ContentCreate.json.example b/src/bundle/Resources/api_platform/examples/content/objects/POST/ContentCreate.json.example new file mode 100644 index 000000000..97f903c01 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/POST/ContentCreate.json.example @@ -0,0 +1,49 @@ +{ + "ContentCreate": { + "ContentType": { + "_href": "/api/ibexa/v2/content/types/2" + }, + "mainLanguageCode": "eng-GB", + "LocationCreate": { + "_media-type": "application/vnd.ibexa.api.LocationCreate", + "ParentLocation": { + "_href": "/api/ibexa/v2/content/locations/1/2" + }, + "priority": "0", + "hidden": "false", + "sortField": "PATH", + "sortOrder": "ASC" + }, + "Section": { + "_href": "/api/ibexa/v2/content/sections/1" + }, + "alwaysAvailable": "true", + "fields": { + "field": [ + { + "fieldDefinitionIdentifier": "title", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezstring", + "fieldValue": "draft article" + }, + { + "fieldDefinitionIdentifier": "intro", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezrichtext", + "fieldValue": + { + "xml": "

draft draft

" + } + }, + { + "fieldDefinitionIdentifier": "body", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezrichtext", + "fieldValue": { + "xml": "

draft draft draft

" + } + } + ] + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/objects/POST/ContentCreate.xml.example b/src/bundle/Resources/api_platform/examples/content/objects/POST/ContentCreate.xml.example new file mode 100644 index 000000000..08c966645 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/POST/ContentCreate.xml.example @@ -0,0 +1,36 @@ + + + + eng-GB + + + 0 + false + PATH + ASC + +
+ true + + + + title + eng-GB + draft article + + + intro + eng-GB + +

draft draft

]]> + + + + body + eng-GB + +

draft draft draft

]]> + + + + diff --git a/src/bundle/Resources/api_platform/examples/content/objects/POST/ContentInfo.xml.example b/src/bundle/Resources/api_platform/examples/content/objects/POST/ContentInfo.xml.example new file mode 100644 index 000000000..88ae84b8c --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/POST/ContentInfo.xml.example @@ -0,0 +1,17 @@ + + + + draft article + draft article + + +
+ + + eng-GB + 1 + true + false + DRAFT + + diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/GET/Content.json.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/GET/Content.json.example new file mode 100644 index 000000000..0384cebbc --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/GET/Content.json.example @@ -0,0 +1,136 @@ +{ + "Content": { + "_media-type": "application/vnd.ibexa.api.Content+json", + "_href": "/api/ibexa/v2/content/objects/54", + "_remoteId": "9e863fbb0fb835ce050032b4f00de61d", + "_id": 54, + "ContentType": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/1" + }, + "Name": "Forms", + "TranslatedName": "Forms", + "Versions": { + "_media-type": "application/vnd.ibexa.api.VersionList+json", + "_href": "/api/ibexa/v2/content/objects/54/versions" + }, + "CurrentVersion": { + "_media-type": "application/vnd.ibexa.api.Version+json", + "_href": "/api/ibexa/v2/content/objects/54/currentversion", + "Version": { + "_media-type": "application/vnd.ibexa.api.Version+json", + "_href": "/api/ibexa/v2/content/objects/54/versions/1", + "VersionInfo": { + "id": 514, + "versionNo": 1, + "status": "PUBLISHED", + "modificationDate": "2018-09-17T06:48:13+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "creationDate": "2018-09-17T06:48:13+00:00", + "initialLanguageCode": "eng-GB", + "languageCodes": "eng-GB", + "VersionTranslationInfo": { + "_media-type": "application/vnd.ibexa.api.VersionTranslationInfo+json", + "Language": [ + { + "languageCode": "eng-GB" + } + ] + }, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Forms" + } + ] + }, + "Content": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/54" + } + }, + "Fields": { + "field": [ + { + "id": 249, + "fieldDefinitionIdentifier": "name", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezstring", + "fieldValue": "Forms" + }, + { + "id": 250, + "fieldDefinitionIdentifier": "short_name", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezstring", + "fieldValue": null + }, + { + "id": 251, + "fieldDefinitionIdentifier": "short_description", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezrichtext", + "fieldValue": { + "xml": "\n
\n", + "xhtml5edit": "\n
\n" + } + }, + { + "id": 252, + "fieldDefinitionIdentifier": "description", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezrichtext", + "fieldValue": { + "xml": "\n
\n", + "xhtml5edit": "\n
\n" + } + } + ] + }, + "Relations": { + "_media-type": "application/vnd.ibexa.api.RelationList+json", + "_href": "/api/ibexa/v2/content/objects/54/versions/1/relations", + "Relation": [] + }, + "Thumbnail": { + "_media-type": "application/vnd.ibexa.api.Thumbnail+json", + "resource": "/bundles/ezplatformadminui/img/ez-icons.svg#folder", + "width": null, + "height": null, + "mimeType": "image/svg+xml" + } + } + }, + "Section": { + "_media-type": "application/vnd.ibexa.api.Section+json", + "_href": "/api/ibexa/v2/content/sections/6" + }, + "MainLocation": { + "_media-type": "application/vnd.ibexa.api.Location+json", + "_href": "/api/ibexa/v2/content/locations/1/55" + }, + "Locations": { + "_media-type": "application/vnd.ibexa.api.LocationList+json", + "_href": "/api/ibexa/v2/content/objects/54/locations" + }, + "Owner": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "lastModificationDate": "2018-09-17T06:48:13+00:00", + "publishedDate": "2018-09-17T06:48:13+00:00", + "mainLanguageCode": "eng-GB", + "currentVersionNo": 1, + "alwaysAvailable": false, + "isHidden": false, + "status": "PUBLISHED", + "ObjectStates": { + "_media-type": "application/vnd.ibexa.api.ContentObjectStates+json", + "_href": "/api/ibexa/v2/content/objects/54/objectstates" + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/GET/Content.xml.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/GET/Content.xml.example new file mode 100644 index 000000000..bf3dcdccb --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/GET/Content.xml.example @@ -0,0 +1,93 @@ + + + + Forms + Forms + + + + + 514 + 1 + PUBLISHED + 2018-09-17T06:48:13+00:00 + + 2018-09-17T06:48:13+00:00 + eng-GB + eng-GB + + + eng-GB + + + + Forms + + + + + + 249 + name + eng-GB + ezstring + Forms + + + 250 + short_name + eng-GB + ezstring + + + + 251 + short_description + eng-GB + ezrichtext + + <?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0-variant ezpublish-1.0"/> + + <?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"/> + + + + + 252 + description + eng-GB + ezrichtext + + <?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0-variant ezpublish-1.0"/> + + <?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"/> + + + + + + + /bundles/ezplatformadminui/img/ez-icons.svg#folder + + + image/svg+xml + + + +
+ + + + 2018-09-17T06:48:13+00:00 + 2018-09-17T06:48:13+00:00 + eng-GB + 1 + false + false + PUBLISHED + + diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/GET/ContentInfo.xml.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/GET/ContentInfo.xml.example new file mode 100644 index 000000000..e69de29bb diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/PATCH/ContentInfo.xml.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/PATCH/ContentInfo.xml.example new file mode 100644 index 000000000..202e2149d --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/PATCH/ContentInfo.xml.example @@ -0,0 +1,17 @@ + + + + article1 + + +
+ + + + 2019-02-19T15:00:34+01:00 + 2019-02-19T15:00:34+01:00 + eng-GB + 1 + false + + diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/PATCH/ContentUpdate.xml.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/PATCH/ContentUpdate.xml.example new file mode 100644 index 000000000..1388ba5ab --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/PATCH/ContentUpdate.xml.example @@ -0,0 +1,9 @@ + + + eng-GB +
+ + + false + 69848aeb86164c35e5c98202eebe9e05 + diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/currentversion/COPY/Version.json.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/currentversion/COPY/Version.json.example new file mode 100644 index 000000000..434f069a2 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/currentversion/COPY/Version.json.example @@ -0,0 +1,89 @@ +{ + "Version": { + "_media-type": "application/vnd.ibexa.api.Version+json", + "_href": "/api/ibexa/v2/content/objects/107/versions/5", + "VersionInfo": { + "id": 581, + "versionNo": 5, + "status": "DRAFT", + "modificationDate": "2023-05-24T06:09:49+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "creationDate": "2023-05-24T06:09:49+00:00", + "initialLanguageCode": "eng-GB", + "languageCodes": "eng-GB", + "VersionTranslationInfo": { + "_media-type": "application/vnd.ibexa.api.VersionTranslationInfo+json", + "Language": [ + { + "languageCode": "eng-GB" + } + ] + }, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Features" + } + ] + }, + "Content": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/107" + } + }, + "Fields": { + "field": [ + { + "id": 477, + "fieldDefinitionIdentifier": "name", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezstring", + "fieldValue": "Features" + }, + { + "id": 478, + "fieldDefinitionIdentifier": "short_name", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezstring", + "fieldValue": null + }, + { + "id": 479, + "fieldDefinitionIdentifier": "short_description", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezrichtext", + "fieldValue": { + "xml": "\n
\n", + "xhtml5edit": "\n
\n" + } + }, + { + "id": 480, + "fieldDefinitionIdentifier": "description", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezrichtext", + "fieldValue": { + "xml": "\n
\n", + "xhtml5edit": "\n
\n" + } + } + ] + }, + "Relations": { + "_media-type": "application/vnd.ibexa.api.RelationList+json", + "_href": "/api/ibexa/v2/content/objects/107/versions/5/relations", + "Relation": [] + }, + "Thumbnail": { + "_media-type": "application/vnd.ibexa.api.Thumbnail+json", + "resource": "/placeholder", + "width": null, + "height": null, + "mimeType": "image/svg+xml" + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/currentversion/COPY/Version.xml.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/currentversion/COPY/Version.xml.example new file mode 100644 index 000000000..d6cb4c486 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/currentversion/COPY/Version.xml.example @@ -0,0 +1,73 @@ + + + + 580 + 4 + DRAFT + 2023-05-24T06:08:47+00:00 + + 2023-05-24T06:08:47+00:00 + eng-GB + eng-GB + + + eng-GB + + + + Features + + + + + + 477 + name + eng-GB + ezstring + Features + + + 478 + short_name + eng-GB + ezstring + + + + 479 + short_description + eng-GB + ezrichtext + + <?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0-variant ezpublish-1.0"/> + + <?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"/> + + + + + 480 + description + eng-GB + ezrichtext + + <?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0-variant ezpublish-1.0"/> + + <?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"/> + + + + + + + /placeholder + + + image/svg+xml + + diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/currentversion/GET/Version.json.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/currentversion/GET/Version.json.example new file mode 100644 index 000000000..a37da599d --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/currentversion/GET/Version.json.example @@ -0,0 +1,89 @@ +{ + "Version": { + "_media-type": "application/vnd.ibexa.api.Version+json", + "_href": "/api/ibexa/v2/content/objects/107/versions/2", + "VersionInfo": { + "id": 578, + "versionNo": 2, + "status": "PUBLISHED", + "modificationDate": "2023-05-24T05:59:09+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "creationDate": "2023-05-24T05:59:02+00:00", + "initialLanguageCode": "eng-GB", + "languageCodes": "eng-GB", + "VersionTranslationInfo": { + "_media-type": "application/vnd.ibexa.api.VersionTranslationInfo+json", + "Language": [ + { + "languageCode": "eng-GB" + } + ] + }, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Features" + } + ] + }, + "Content": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/107" + } + }, + "Fields": { + "field": [ + { + "id": 477, + "fieldDefinitionIdentifier": "name", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezstring", + "fieldValue": "Features" + }, + { + "id": 478, + "fieldDefinitionIdentifier": "short_name", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezstring", + "fieldValue": null + }, + { + "id": 479, + "fieldDefinitionIdentifier": "short_description", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezrichtext", + "fieldValue": { + "xml": "\n
\n", + "xhtml5edit": "\n
\n" + } + }, + { + "id": 480, + "fieldDefinitionIdentifier": "description", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezrichtext", + "fieldValue": { + "xml": "\n
\n", + "xhtml5edit": "\n
\n" + } + } + ] + }, + "Relations": { + "_media-type": "application/vnd.ibexa.api.RelationList+json", + "_href": "/api/ibexa/v2/content/objects/107/versions/2/relations", + "Relation": [] + }, + "Thumbnail": { + "_media-type": "application/vnd.ibexa.api.Thumbnail+json", + "resource": "/placeholder", + "width": null, + "height": null, + "mimeType": "image/svg+xml" + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/currentversion/GET/Version.xml.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/currentversion/GET/Version.xml.example new file mode 100644 index 000000000..585f91f91 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/currentversion/GET/Version.xml.example @@ -0,0 +1,73 @@ + + + + 578 + 2 + PUBLISHED + 2023-05-24T05:59:09+00:00 + + 2023-05-24T05:59:02+00:00 + eng-GB + eng-GB + + + eng-GB + + + + Features + + + + + + 477 + name + eng-GB + ezstring + Features + + + 478 + short_name + eng-GB + ezstring + + + + 479 + short_description + eng-GB + ezrichtext + + <?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0-variant ezpublish-1.0"/> + + <?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"/> + + + + + 480 + description + eng-GB + ezrichtext + + <?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0-variant ezpublish-1.0"/> + + <?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"/> + + + + + + + /placeholder + + + image/svg+xml + + diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/locations/GET/LocationList.json.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/locations/GET/LocationList.json.example new file mode 100644 index 000000000..20280fba5 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/locations/GET/LocationList.json.example @@ -0,0 +1,12 @@ +{ + "LocationList": { + "_media-type": "application/vnd.ibexa.api.LocationList+json", + "_href": "/api/ibexa/v2/content/objects/63/locations", + "Location": [ + { + "_media-type": "application/vnd.ibexa.api.Location+json", + "_href": "/api/ibexa/v2/content/locations/1/2/57/65" + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/locations/GET/LocationList.xml.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/locations/GET/LocationList.xml.example new file mode 100644 index 000000000..77e1c81c4 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/locations/GET/LocationList.xml.example @@ -0,0 +1,4 @@ + + + + diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/locations/POST/Location.json.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/locations/POST/Location.json.example new file mode 100644 index 000000000..06e2720ae --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/locations/POST/Location.json.example @@ -0,0 +1,80 @@ +{ + "Location": { + "_media-type": "application/vnd.ibexa.api.Location+json", + "_href": "/api/ibexa/v2/content/locations/1/2/59/114", + "id": 114, + "priority": 0, + "hidden": false, + "invisible": false, + "explicitlyHidden": false, + "ParentLocation": { + "_media-type": "application/vnd.ibexa.api.Location+json", + "_href": "/api/ibexa/v2/content/locations/1/2/59" + }, + "pathString": "/1/2/59/114/", + "depth": 3, + "childCount": 0, + "remoteId": "47a1e4ee082fb64e93a822dcfe3a5614", + "Children": { + "_media-type": "application/vnd.ibexa.api.LocationList+json", + "_href": "/api/ibexa/v2/content/locations/1/2/59/114/children" + }, + "Content": { + "_media-type": "application/vnd.ibexa.api.Content+json", + "_href": "/api/ibexa/v2/content/objects/59" + }, + "sortField": "PATH", + "sortOrder": "ASC", + "UrlAliases": { + "_media-type": "application/vnd.ibexa.api.UrlAliasRefList+json", + "_href": "/api/ibexa/v2/content/locations/1/2/59/114/urlaliases" + }, + "ContentInfo": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/59", + "Content": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/59", + "_remoteId": "0fe1b1543f886b0becd4d9b2c7c517d0", + "_id": 59, + "ContentType": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/2" + }, + "Name": "Art1", + "TranslatedName": "Art1", + "Versions": { + "_media-type": "application/vnd.ibexa.api.VersionList+json", + "_href": "/api/ibexa/v2/content/objects/59/versions" + }, + "CurrentVersion": { + "_media-type": "application/vnd.ibexa.api.Version+json", + "_href": "/api/ibexa/v2/content/objects/59/currentversion" + }, + "Section": { + "_media-type": "application/vnd.ibexa.api.Section+json", + "_href": "/api/ibexa/v2/content/sections/1" + }, + "Locations": { + "_media-type": "application/vnd.ibexa.api.LocationList+json", + "_href": "/api/ibexa/v2/content/objects/59/locations" + }, + "Owner": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "lastModificationDate": "2021-06-28T11:33:01+00:00", + "publishedDate": "2021-06-28T11:33:01+00:00", + "mainLanguageCode": "eng-GB", + "currentVersionNo": 1, + "alwaysAvailable": false, + "isHidden": false, + "status": "PUBLISHED", + "ObjectStates": { + "_media-type": "application/vnd.ibexa.api.ContentObjectStates+json", + "_href": "/api/ibexa/v2/content/objects/59/objectstates" + } + } + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/locations/POST/Location.xml.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/locations/POST/Location.xml.example new file mode 100644 index 000000000..99fa70128 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/locations/POST/Location.xml.example @@ -0,0 +1,38 @@ + + + 96 + 0 + false + true + false + + /1/2/42/96/ + 3 + 0 + 58133c8c75230e5debe362a28b92d27a + + + PATH + ASC + + + + + Art3 + Art3 + + +
+ + + 2021-06-28T11:34:17+00:00 + 2021-06-28T11:34:17+00:00 + eng-GB + 1 + false + false + PUBLISHED + + + + diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/locations/POST/LocationCreate.json.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/locations/POST/LocationCreate.json.example new file mode 100644 index 000000000..44d6271ad --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/locations/POST/LocationCreate.json.example @@ -0,0 +1,12 @@ +{ + "LocationCreate": { + "_media-type": "application/vnd.ibexa.api.LocationCreate", + "ParentLocation": { + "_href": "/api/ibexa/v2/content/locations/1/59" + }, + "priority": "0", + "hidden": false, + "sortField": "PATH", + "sortOrder": "ASC" + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/locations/POST/LocationCreate.xml.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/locations/POST/LocationCreate.xml.example new file mode 100644 index 000000000..9686bfc0d --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/locations/POST/LocationCreate.xml.example @@ -0,0 +1,8 @@ + + + + 0 + false + PATH + ASC + diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/objectstates/GET/ContentObjectStates.json.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/objectstates/GET/ContentObjectStates.json.example new file mode 100644 index 000000000..4e8035e60 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/objectstates/GET/ContentObjectStates.json.example @@ -0,0 +1,23 @@ +{ + "ContentObjectStates": { + "_media-type": "application/vnd.ibexa.api.ContentObjectStates+json", + "ObjectState": [ + { + "_media-type": "application/vnd.ibexa.api.ObjectState+json", + "_href": "/api/ibexa/v2/content/objectstategroups/2/objectstates/1" + }, + { + "_media-type": "application/vnd.ibexa.api.ObjectState+json", + "_href": "/api/ibexa/v2/content/objectstategroups/3/objectstates/3" + }, + { + "_media-type": "application/vnd.ibexa.api.ObjectState+json", + "_href": "/api/ibexa/v2/content/objectstategroups/7/objectstates/7" + }, + { + "_media-type": "application/vnd.ibexa.api.ObjectState+json", + "_href": "/api/ibexa/v2/content/objectstategroups/8/objectstates/8" + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/objectstates/GET/ContentObjectStates.xml.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/objectstates/GET/ContentObjectStates.xml.example new file mode 100644 index 000000000..f6533987f --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/objectstates/GET/ContentObjectStates.xml.example @@ -0,0 +1,7 @@ + + + + + + + diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/objectstates/PATCH/ContentObjectStates.request.json.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/objectstates/PATCH/ContentObjectStates.request.json.example new file mode 100644 index 000000000..6c847b4d9 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/objectstates/PATCH/ContentObjectStates.request.json.example @@ -0,0 +1,9 @@ +{ + "ContentObjectStates": { + "ObjectState": [ + { + "_href": "/api/ibexa/v2/content/objectstategroups/2/objectstates/2" + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/objectstates/PATCH/ContentObjectStates.request.xml.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/objectstates/PATCH/ContentObjectStates.request.xml.example new file mode 100644 index 000000000..086a32de7 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/objectstates/PATCH/ContentObjectStates.request.xml.example @@ -0,0 +1,4 @@ + + + + diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/objectstates/PATCH/ContentObjectStates.response.json.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/objectstates/PATCH/ContentObjectStates.response.json.example new file mode 100644 index 000000000..87c9b1709 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/objectstates/PATCH/ContentObjectStates.response.json.example @@ -0,0 +1,11 @@ +{ + "ContentObjectStates": { + "_media-type": "application\/vnd.ibexa.api.ContentObjectStates+json", + "ObjectState": [ + { + "_media-type": "application\/vnd.ibexa.api.ObjectState+json", + "_href": "\/api\/ibexa\/v2\/content\/objectstategroups\/2\/objectstates\/2" + } + ] + } +} \ No newline at end of file diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/objectstates/PATCH/ContentObjectStates.response.xml.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/objectstates/PATCH/ContentObjectStates.response.xml.example new file mode 100644 index 000000000..2cdc2305a --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/objectstates/PATCH/ContentObjectStates.response.xml.example @@ -0,0 +1,4 @@ + + + + diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/GET/VersionList.json.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/GET/VersionList.json.example new file mode 100644 index 000000000..3c042e954 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/GET/VersionList.json.example @@ -0,0 +1,125 @@ +{ + "VersionList": { + "_media-type": "application/vnd.ibexa.api.VersionList+json", + "_href": "/api/ibexa/v2/content/objects/61/versions", + "VersionItem": [ + { + "Version": { + "_media-type": "application/vnd.ibexa.api.Version+json", + "_href": "/api/ibexa/v2/content/objects/61/versions/1" + }, + "VersionInfo": { + "id": 521, + "versionNo": 1, + "status": "PUBLISHED", + "modificationDate": "2021-06-28T11:33:49+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "creationDate": "2021-06-28T11:33:31+00:00", + "initialLanguageCode": "eng-GB", + "languageCodes": "eng-GB", + "VersionTranslationInfo": { + "_media-type": "application/vnd.ibexa.api.VersionTranslationInfo+json", + "Language": [ + { + "languageCode": "eng-GB" + } + ] + }, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Art1" + } + ] + }, + "Content": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/61" + } + } + }, + { + "Version": { + "_media-type": "application/vnd.ibexa.api.Version+json", + "_href": "/api/ibexa/v2/content/objects/61/versions/2" + }, + "VersionInfo": { + "id": 580, + "versionNo": 2, + "status": "DRAFT", + "modificationDate": "2021-07-26T08:10:02+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "creationDate": "2021-07-26T08:10:02+00:00", + "initialLanguageCode": "eng-GB", + "languageCodes": "eng-GB", + "VersionTranslationInfo": { + "_media-type": "application/vnd.ibexa.api.VersionTranslationInfo+json", + "Language": [ + { + "languageCode": "eng-GB" + } + ] + }, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Art1" + } + ] + }, + "Content": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/61" + } + } + }, + { + "Version": { + "_media-type": "application/vnd.ibexa.api.Version+json", + "_href": "/api/ibexa/v2/content/objects/61/versions/3" + }, + "VersionInfo": { + "id": 581, + "versionNo": 3, + "status": "DRAFT", + "modificationDate": "2021-07-26T08:16:50+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "creationDate": "2021-07-26T08:16:50+00:00", + "initialLanguageCode": "eng-GB", + "languageCodes": "eng-GB", + "VersionTranslationInfo": { + "_media-type": "application/vnd.ibexa.api.VersionTranslationInfo+json", + "Language": [ + { + "languageCode": "eng-GB" + } + ] + }, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Art1" + } + ] + }, + "Content": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/61" + } + } + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/GET/VersionList.xml.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/GET/VersionList.xml.example new file mode 100644 index 000000000..ca94eaf9e --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/GET/VersionList.xml.example @@ -0,0 +1,69 @@ + + + + + + 521 + 1 + PUBLISHED + 2021-06-28T11:33:49+00:00 + + 2021-06-28T11:33:31+00:00 + eng-GB + eng-GB + + + eng-GB + + + + Art1 + + + + + + + + 580 + 2 + DRAFT + 2021-07-26T08:10:02+00:00 + + 2021-07-26T08:10:02+00:00 + eng-GB + eng-GB + + + eng-GB + + + + Art1 + + + + + + + + 581 + 3 + DRAFT + 2021-07-26T08:16:50+00:00 + + 2021-07-26T08:16:50+00:00 + eng-GB + eng-GB + + + eng-GB + + + + Art1 + + + + + diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/COPY/Version.json.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/COPY/Version.json.example new file mode 100644 index 000000000..580dc2315 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/COPY/Version.json.example @@ -0,0 +1,89 @@ +{ + "Version": { + "_media-type": "application/vnd.ibexa.api.Version+json", + "_href": "/api/ibexa/v2/content/objects/107/versions/8", + "VersionInfo": { + "id": 584, + "versionNo": 8, + "status": "DRAFT", + "modificationDate": "2023-05-24T06:14:07+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "creationDate": "2023-05-24T06:14:07+00:00", + "initialLanguageCode": "eng-GB", + "languageCodes": "eng-GB", + "VersionTranslationInfo": { + "_media-type": "application/vnd.ibexa.api.VersionTranslationInfo+json", + "Language": [ + { + "languageCode": "eng-GB" + } + ] + }, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Features" + } + ] + }, + "Content": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/107" + } + }, + "Fields": { + "field": [ + { + "id": 477, + "fieldDefinitionIdentifier": "name", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezstring", + "fieldValue": "Features" + }, + { + "id": 478, + "fieldDefinitionIdentifier": "short_name", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezstring", + "fieldValue": null + }, + { + "id": 479, + "fieldDefinitionIdentifier": "short_description", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezrichtext", + "fieldValue": { + "xml": "\n
\n", + "xhtml5edit": "\n
\n" + } + }, + { + "id": 480, + "fieldDefinitionIdentifier": "description", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezrichtext", + "fieldValue": { + "xml": "\n
\n", + "xhtml5edit": "\n
\n" + } + } + ] + }, + "Relations": { + "_media-type": "application/vnd.ibexa.api.RelationList+json", + "_href": "/api/ibexa/v2/content/objects/107/versions/8/relations", + "Relation": [] + }, + "Thumbnail": { + "_media-type": "application/vnd.ibexa.api.Thumbnail+json", + "resource": "/placeholder", + "width": null, + "height": null, + "mimeType": "image/svg+xml" + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/COPY/Version.xml.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/COPY/Version.xml.example new file mode 100644 index 000000000..b04721156 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/COPY/Version.xml.example @@ -0,0 +1,73 @@ + + + + 583 + 7 + DRAFT + 2023-05-24T06:13:50+00:00 + + 2023-05-24T06:13:50+00:00 + eng-GB + eng-GB + + + eng-GB + + + + Features + + + + + + 477 + name + eng-GB + ezstring + Features + + + 478 + short_name + eng-GB + ezstring + + + + 479 + short_description + eng-GB + ezrichtext + + <?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0-variant ezpublish-1.0"/> + + <?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"/> + + + + + 480 + description + eng-GB + ezrichtext + + <?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0-variant ezpublish-1.0"/> + + <?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"/> + + + + + + + /placeholder + + + image/svg+xml + + diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/GET/Version.json.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/GET/Version.json.example new file mode 100644 index 000000000..c6510ea95 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/GET/Version.json.example @@ -0,0 +1,89 @@ +{ + "Version": { + "_media-type": "application/vnd.ibexa.api.Version+json", + "_href": "/api/ibexa/v2/content/objects/107/versions/5", + "VersionInfo": { + "id": 581, + "versionNo": 5, + "status": "ARCHIVED", + "modificationDate": "2023-05-24T06:11:50+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "creationDate": "2023-05-24T06:09:49+00:00", + "initialLanguageCode": "eng-GB", + "languageCodes": "eng-GB", + "VersionTranslationInfo": { + "_media-type": "application/vnd.ibexa.api.VersionTranslationInfo+json", + "Language": [ + { + "languageCode": "eng-GB" + } + ] + }, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Features" + } + ] + }, + "Content": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/107" + } + }, + "Fields": { + "field": [ + { + "id": 477, + "fieldDefinitionIdentifier": "name", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezstring", + "fieldValue": "Features" + }, + { + "id": 478, + "fieldDefinitionIdentifier": "short_name", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezstring", + "fieldValue": null + }, + { + "id": 479, + "fieldDefinitionIdentifier": "short_description", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezrichtext", + "fieldValue": { + "xml": "\n
\n", + "xhtml5edit": "\n
\n" + } + }, + { + "id": 480, + "fieldDefinitionIdentifier": "description", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezrichtext", + "fieldValue": { + "xml": "\n
\n", + "xhtml5edit": "\n
\n" + } + } + ] + }, + "Relations": { + "_media-type": "application/vnd.ibexa.api.RelationList+json", + "_href": "/api/ibexa/v2/content/objects/107/versions/5/relations", + "Relation": [] + }, + "Thumbnail": { + "_media-type": "application/vnd.ibexa.api.Thumbnail+json", + "resource": "/placeholder", + "width": null, + "height": null, + "mimeType": "image/svg+xml" + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/GET/Version.xml.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/GET/Version.xml.example new file mode 100644 index 000000000..9286adb0c --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/GET/Version.xml.example @@ -0,0 +1,73 @@ + + + + 581 + 5 + ARCHIVED + 2023-05-24T06:11:50+00:00 + + 2023-05-24T06:09:49+00:00 + eng-GB + eng-GB + + + eng-GB + + + + Features + + + + + + 477 + name + eng-GB + ezstring + Features + + + 478 + short_name + eng-GB + ezstring + + + + 479 + short_description + eng-GB + ezrichtext + + <?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0-variant ezpublish-1.0"/> + + <?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"/> + + + + + 480 + description + eng-GB + ezrichtext + + <?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0-variant ezpublish-1.0"/> + + <?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"/> + + + + + + + /placeholder + + + image/svg+xml + + diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/PATCH/Version.xml.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/PATCH/Version.xml.example new file mode 100644 index 000000000..3bb4e3b18 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/PATCH/Version.xml.example @@ -0,0 +1,48 @@ + + + + 45 + 4 + DRAFT + 2012-02-20T12:00:00 + + 22012-02-20T12:00:00 + ger-DE + + Neuer Titel + + + + + + 1234 + title + ger-DE + Neuer Titel + + + 1235 + summary + ger-DE + Dies ist eine neuse Zusammenfassungy + + + authors + ger-DE + + + + + + + + + + + + COMMON + + + diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/PATCH/VersionUpdate.xml.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/PATCH/VersionUpdate.xml.example new file mode 100644 index 000000000..2fbff5a67 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/PATCH/VersionUpdate.xml.example @@ -0,0 +1,21 @@ + + + 2012-02-20T12:00:00 + ger-DE + + + 1234 + title + ger-DE + Neuer Titel + + + 1235 + summary + ger-DE + Dies ist eine neuse Zusammenfassungy + + + diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/GET/RelationList.json.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/GET/RelationList.json.example new file mode 100644 index 000000000..7ccd94776 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/GET/RelationList.json.example @@ -0,0 +1,21 @@ +{ + "Relations": { + "_media-type": "application/vnd.ibexa.api.RelationList+json", + "_href": "/api/ibexa/v2/content/objects/107/versions/9/relations", + "Relation": [ + { + "_media-type": "application/vnd.ibexa.api.Relation+json", + "_href": "/api/ibexa/v2/content/objects/107/versions/9/relations/7", + "SourceContent": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/107" + }, + "DestinationContent": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/52" + }, + "RelationType": "LINK" + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/GET/RelationList.xml.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/GET/RelationList.xml.example new file mode 100644 index 000000000..07934ebd3 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/GET/RelationList.xml.example @@ -0,0 +1,8 @@ + + + + + + LINK + + diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/POST/Relation.json.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/POST/Relation.json.example new file mode 100644 index 000000000..dd5981dc1 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/POST/Relation.json.example @@ -0,0 +1,15 @@ +{ + "Relation": { + "_media-type": "application/vnd.ibexa.api.Relation+json", + "_href": "/api/ibexa/v2/content/objects/59/versions/2/relations/38", + "SourceContent": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/59" + }, + "DestinationContent": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/59" + }, + "RelationType": "COMMON" + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/POST/Relation.xml.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/POST/Relation.xml.example new file mode 100644 index 000000000..da36f0d4a --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/POST/Relation.xml.example @@ -0,0 +1,6 @@ + + + + + COMMON + diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/POST/RelationCreate.json.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/POST/RelationCreate.json.example new file mode 100644 index 000000000..84e14562a --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/POST/RelationCreate.json.example @@ -0,0 +1,7 @@ +{ + "RelationCreate": { + "Destination": { + "_href": "/api/ibexa/v2/content/objects/59" + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/POST/RelationCreate.xml.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/POST/RelationCreate.xml.example new file mode 100644 index 000000000..0eed6ae84 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/POST/RelationCreate.xml.example @@ -0,0 +1,4 @@ + + + + diff --git a/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/relation_id/GET/Relation.xml.example b/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/relation_id/GET/Relation.xml.example new file mode 100644 index 000000000..4f7e851d1 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/relation_id/GET/Relation.xml.example @@ -0,0 +1,6 @@ + + + + + COMMON + diff --git a/src/bundle/Resources/api_platform/examples/content/objectstategroups/GET/ObjectStateGroupList.json.example b/src/bundle/Resources/api_platform/examples/content/objectstategroups/GET/ObjectStateGroupList.json.example new file mode 100644 index 000000000..a180f21cc --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objectstategroups/GET/ObjectStateGroupList.json.example @@ -0,0 +1,92 @@ +{ + "ObjectStateGroupList": { + "_media-type": "application/vnd.ibexa.api.ObjectStateGroupList+json", + "_href": "/api/ibexa/v2/content/objectstategroups", + "ObjectStateGroup": [ + { + "_media-type": "application/vnd.ibexa.api.ObjectStateGroup+json", + "_href": "/api/ibexa/v2/content/objectstategroups/2", + "id": 2, + "identifier": "ez_lock", + "defaultLanguageCode": "eng-GB", + "languageCodes": "eng-GB", + "ObjectStates": { + "_media-type": "application/vnd.ibexa.api.ObjectStateList+json", + "_href": "/api/ibexa/v2/content/objectstategroups/2/objectstates" + }, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Lock" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "" + } + ] + } + }, + { + "_media-type": "application/vnd.ibexa.api.ObjectStateGroup+json", + "_href": "/api/ibexa/v2/content/objectstategroups/3", + "id": 3, + "identifier": "accessibility", + "defaultLanguageCode": "eng-GB", + "languageCodes": "eng-GB", + "ObjectStates": { + "_media-type": "application/vnd.ibexa.api.ObjectStateList+json", + "_href": "/api/ibexa/v2/content/objectstategroups/3/objectstates" + }, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Accessibility" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "" + } + ] + } + }, + { + "_media-type": "application/vnd.ibexa.api.ObjectStateGroup+json", + "_href": "/api/ibexa/v2/content/objectstategroups/6", + "id": 6, + "identifier": "custom-states", + "defaultLanguageCode": "eng-GB", + "languageCodes": "eng-GB", + "ObjectStates": { + "_media-type": "application/vnd.ibexa.api.ObjectStateList+json", + "_href": "/api/ibexa/v2/content/objectstategroups/6/objectstates" + }, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Custom State" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Custom Object state" + } + ] + } + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/objectstategroups/GET/ObjectStateGroupList.xml.example b/src/bundle/Resources/api_platform/examples/content/objectstategroups/GET/ObjectStateGroupList.xml.example new file mode 100644 index 000000000..6d30c9c74 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objectstategroups/GET/ObjectStateGroupList.xml.example @@ -0,0 +1,42 @@ + + + + 2 + ez_lock + eng-GB + eng-GB + + + Lock + + + + + + + 3 + accessibility + eng-GB + eng-GB + + + Accessibility + + + + + + + 6 + custom-states + eng-GB + eng-GB + + + Custom State + + + Custom Object state + + + diff --git a/src/bundle/Resources/api_platform/examples/content/objectstategroups/POST/ObjectStateGroup.json.example b/src/bundle/Resources/api_platform/examples/content/objectstategroups/POST/ObjectStateGroup.json.example new file mode 100644 index 000000000..f18e09708 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objectstategroups/POST/ObjectStateGroup.json.example @@ -0,0 +1,30 @@ +{ + "ObjectStateGroup": { + "_media-type": "application/vnd.ibexa.api.ObjectStateGroup+json", + "_href": "/api/ibexa/v2/content/objectstategroups/7", + "id": 7, + "identifier": "custom-states", + "defaultLanguageCode": "eng-GB", + "languageCodes": "eng-GB", + "ObjectStates": { + "_media-type": "application/vnd.ibexa.api.ObjectStateList+json", + "_href": "/api/ibexa/v2/content/objectstategroups/7/objectstates" + }, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Custom State" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Custom Object state" + } + ] + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/objectstategroups/POST/ObjectStateGroup.xml.example b/src/bundle/Resources/api_platform/examples/content/objectstategroups/POST/ObjectStateGroup.xml.example new file mode 100644 index 000000000..a03639afc --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objectstategroups/POST/ObjectStateGroup.xml.example @@ -0,0 +1,14 @@ + + + 5 + custom-states + eng-GB + eng-GB + + + Custom State + + + Custom Object state + + diff --git a/src/bundle/Resources/api_platform/examples/content/objectstategroups/POST/ObjectStateGroupCreate.json.example b/src/bundle/Resources/api_platform/examples/content/objectstategroups/POST/ObjectStateGroupCreate.json.example new file mode 100644 index 000000000..3e3051b20 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objectstategroups/POST/ObjectStateGroupCreate.json.example @@ -0,0 +1,22 @@ +{ + "ObjectStateGroupCreate": { + "identifier": "custom-states", + "defaultLanguageCode": "eng-GB", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Custom State" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Custom Object state" + } + ] + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/objectstategroups/POST/ObjectStateGroupCreate.xml.example b/src/bundle/Resources/api_platform/examples/content/objectstategroups/POST/ObjectStateGroupCreate.xml.example new file mode 100644 index 000000000..e508acf72 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objectstategroups/POST/ObjectStateGroupCreate.xml.example @@ -0,0 +1,11 @@ + + + custom + eng-GB + + Custom State + + + Custom Object state + + \ No newline at end of file diff --git a/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/GET/ObjectStateGroup.json.example b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/GET/ObjectStateGroup.json.example new file mode 100644 index 000000000..f18e09708 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/GET/ObjectStateGroup.json.example @@ -0,0 +1,30 @@ +{ + "ObjectStateGroup": { + "_media-type": "application/vnd.ibexa.api.ObjectStateGroup+json", + "_href": "/api/ibexa/v2/content/objectstategroups/7", + "id": 7, + "identifier": "custom-states", + "defaultLanguageCode": "eng-GB", + "languageCodes": "eng-GB", + "ObjectStates": { + "_media-type": "application/vnd.ibexa.api.ObjectStateList+json", + "_href": "/api/ibexa/v2/content/objectstategroups/7/objectstates" + }, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Custom State" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Custom Object state" + } + ] + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/GET/ObjectStateGroup.xml.example b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/GET/ObjectStateGroup.xml.example new file mode 100644 index 000000000..c139dad0d --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/GET/ObjectStateGroup.xml.example @@ -0,0 +1,14 @@ + + + 7 + custom-states + eng-GB + eng-GB + + + Custom State + + + Custom Object state + + diff --git a/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/PATCH/ObjectStateGroup.json.example b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/PATCH/ObjectStateGroup.json.example new file mode 100644 index 000000000..3c57a7018 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/PATCH/ObjectStateGroup.json.example @@ -0,0 +1,30 @@ +{ + "ObjectStateGroup": { + "_media-type": "application/vnd.ibexa.api.ObjectStateGroup+json", + "_href": "/api/ibexa/v2/content/objectstategroups/7", + "id": 7, + "identifier": "custom-states", + "defaultLanguageCode": "eng-GB", + "languageCodes": "eng-GB", + "ObjectStates": { + "_media-type": "application/vnd.ibexa.api.ObjectStateList+json", + "_href": "/api/ibexa/v2/content/objectstategroups/7/objectstates" + }, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "New Custom State name" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Custom Object state" + } + ] + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/PATCH/ObjectStateGroup.xml.example b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/PATCH/ObjectStateGroup.xml.example new file mode 100644 index 000000000..9d0860d03 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/PATCH/ObjectStateGroup.xml.example @@ -0,0 +1,14 @@ + + + 7 + custom-states + eng-GB + eng-GB + + + New Custom State name + + + Custom Object state + + diff --git a/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/PATCH/ObjectStateGroupUpdate.json.example b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/PATCH/ObjectStateGroupUpdate.json.example new file mode 100644 index 000000000..8510b2684 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/PATCH/ObjectStateGroupUpdate.json.example @@ -0,0 +1,12 @@ +{ + "ObjectStateGroupUpdate": { + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "New Custom State name" + } + ] + } + } +} \ No newline at end of file diff --git a/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/PATCH/ObjectStateGroupUpdate.xml.example b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/PATCH/ObjectStateGroupUpdate.xml.example new file mode 100644 index 000000000..c0d7b5c7e --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/PATCH/ObjectStateGroupUpdate.xml.example @@ -0,0 +1,6 @@ + + + + New Custom State name + + diff --git a/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/GET/ObjectStateList.json.example b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/GET/ObjectStateList.json.example new file mode 100644 index 000000000..f2dc764ec --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/GET/ObjectStateList.json.example @@ -0,0 +1,66 @@ +{ + "ObjectStateList": { + "_media-type": "application/vnd.ibexa.api.ObjectStateList+json", + "_href": "/api/ibexa/v2/content/objectstategroups/2/objectstates", + "ObjectState": [ + { + "_media-type": "application/vnd.ibexa.api.ObjectState+json", + "_href": "/api/ibexa/v2/content/objectstategroups/2/objectstates/1", + "id": 1, + "identifier": "not_locked", + "priority": 0, + "ObjectStateGroup": { + "_media-type": "application/vnd.ibexa.api.ObjectStateGroup+json", + "_href": "/api/ibexa/v2/content/objectstategroups/2" + }, + "defaultLanguageCode": "eng-GB", + "languageCodes": "eng-GB", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Not locked" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "" + } + ] + } + }, + { + "_media-type": "application/vnd.ibexa.api.ObjectState+json", + "_href": "/api/ibexa/v2/content/objectstategroups/2/objectstates/2", + "id": 2, + "identifier": "locked", + "priority": 1, + "ObjectStateGroup": { + "_media-type": "application/vnd.ibexa.api.ObjectStateGroup+json", + "_href": "/api/ibexa/v2/content/objectstategroups/2" + }, + "defaultLanguageCode": "eng-GB", + "languageCodes": "eng-GB", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Locked" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "" + } + ] + } + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/GET/ObjectStateList.xml.example b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/GET/ObjectStateList.xml.example new file mode 100644 index 000000000..0f13a16a0 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/GET/ObjectStateList.xml.example @@ -0,0 +1,31 @@ + + + + 1 + not_locked + 0 + + eng-GB + eng-GB + + Not locked + + + + + + + 2 + locked + 1 + + eng-GB + eng-GB + + Locked + + + + + + diff --git a/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/POST/ObjectState.json.example b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/POST/ObjectState.json.example new file mode 100644 index 000000000..723b8c07a --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/POST/ObjectState.json.example @@ -0,0 +1,31 @@ +{ + "ObjectState": { + "_media-type": "application/vnd.ibexa.api.ObjectState+json", + "_href": "/api/ibexa/v2/content/objectstategroups/7/objectstates/7", + "id": 7, + "identifier": "new-state", + "priority": 0, + "ObjectStateGroup": { + "_media-type": "application/vnd.ibexa.api.ObjectStateGroup+json", + "_href": "/api/ibexa/v2/content/objectstategroups/7" + }, + "defaultLanguageCode": "eng-GB", + "languageCodes": "eng-GB", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "New State" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "New Object State" + } + ] + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/POST/ObjectState.xml.example b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/POST/ObjectState.xml.example new file mode 100644 index 000000000..5fc3fb7de --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/POST/ObjectState.xml.example @@ -0,0 +1,15 @@ + + + 5 + new-state + 0 + + eng-GB + eng-GB + + New State + + + New Object State + + diff --git a/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/POST/ObjectStateCreate.json.example b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/POST/ObjectStateCreate.json.example new file mode 100644 index 000000000..840517259 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/POST/ObjectStateCreate.json.example @@ -0,0 +1,24 @@ +{ + "ObjectStateCreate": { + "identifier": "new-state", + "priority": "1", + "defaultLanguageCode": "eng-GB", + "languageCodes": "eng-GB", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "New State" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "New Object State" + } + ] + } + } +} \ No newline at end of file diff --git a/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/POST/ObjectStateCreate.xml.example b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/POST/ObjectStateCreate.xml.example new file mode 100644 index 000000000..b021c96d1 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/POST/ObjectStateCreate.xml.example @@ -0,0 +1,12 @@ + + + new-state + 1 + eng-GB + + New State + + + New Object State + + diff --git a/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/object_state_id/GET/ObjectState.json.example b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/object_state_id/GET/ObjectState.json.example new file mode 100644 index 000000000..992d43639 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/object_state_id/GET/ObjectState.json.example @@ -0,0 +1,31 @@ +{ + "ObjectState": { + "_media-type": "application/vnd.ibexa.api.ObjectState+json", + "_href": "/api/ibexa/v2/content/objectstategroups/2/objectstates/2", + "id": 2, + "identifier": "locked", + "priority": 1, + "ObjectStateGroup": { + "_media-type": "application/vnd.ibexa.api.ObjectStateGroup+json", + "_href": "/api/ibexa/v2/content/objectstategroups/2" + }, + "defaultLanguageCode": "eng-GB", + "languageCodes": "eng-GB", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Locked" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "" + } + ] + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/object_state_id/GET/ObjectState.xml.example b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/object_state_id/GET/ObjectState.xml.example new file mode 100644 index 000000000..63924f793 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/object_state_id/GET/ObjectState.xml.example @@ -0,0 +1,15 @@ + + +2 +locked +1 + +eng-GB +eng-GB + + Locked + + + + + diff --git a/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/object_state_id/PATCH/ObjectState.json.example b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/object_state_id/PATCH/ObjectState.json.example new file mode 100644 index 000000000..f7e10a139 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/object_state_id/PATCH/ObjectState.json.example @@ -0,0 +1,31 @@ +{ + "ObjectState": { + "_media-type": "application/vnd.ibexa.api.ObjectState+json", + "_href": "/api/ibexa/v2/content/objectstategroups/6/objectstates/9", + "id": 9, + "identifier": "closed", + "priority": 1, + "ObjectStateGroup": { + "_media-type": "application/vnd.ibexa.api.ObjectStateGroup+json", + "_href": "/api/ibexa/v2/content/objectstategroups/6" + }, + "defaultLanguageCode": "eng-GB", + "languageCodes": "eng-GB", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "New Object State name" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "" + } + ] + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/object_state_id/PATCH/ObjectState.xml.example b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/object_state_id/PATCH/ObjectState.xml.example new file mode 100644 index 000000000..20f9c542e --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/object_state_id/PATCH/ObjectState.xml.example @@ -0,0 +1,15 @@ + + + 2 + locked + 1 + + eng-GB + eng-GB + + New Object State name + + + + + diff --git a/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/object_state_id/PATCH/ObjectStateUpdate.json.example b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/object_state_id/PATCH/ObjectStateUpdate.json.example new file mode 100644 index 000000000..519d608f2 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/object_state_id/PATCH/ObjectStateUpdate.json.example @@ -0,0 +1,12 @@ +{ + "ObjectStateUpdate": { + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "New Object State name" + } + ] + } + } +} \ No newline at end of file diff --git a/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/object_state_id/PATCH/ObjectStateUpdate.xml.example b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/object_state_id/PATCH/ObjectStateUpdate.xml.example new file mode 100644 index 000000000..8b7271316 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/object_state_id/PATCH/ObjectStateUpdate.xml.example @@ -0,0 +1,8 @@ + + + 3 + eng-GB + + New Object State name + + diff --git a/src/bundle/Resources/api_platform/examples/content/sections/GET/SectionList.json.example b/src/bundle/Resources/api_platform/examples/content/sections/GET/SectionList.json.example new file mode 100644 index 000000000..4747a2a9c --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/sections/GET/SectionList.json.example @@ -0,0 +1,50 @@ +{ + "SectionList": { + "_media-type": "application/vnd.ibexa.api.SectionList+json", + "_href": "/api/ibexa/v2/content/sections", + "Section": [ + { + "_media-type": "application/vnd.ibexa.api.Section+json", + "_href": "/api/ibexa/v2/content/sections/1", + "sectionId": 1, + "identifier": "standard", + "name": "Standard" + }, + { + "_media-type": "application/vnd.ibexa.api.Section+json", + "_href": "/api/ibexa/v2/content/sections/2", + "sectionId": 2, + "identifier": "users", + "name": "Users" + }, + { + "_media-type": "application/vnd.ibexa.api.Section+json", + "_href": "/api/ibexa/v2/content/sections/3", + "sectionId": 3, + "identifier": "media", + "name": "Media" + }, + { + "_media-type": "application/vnd.ibexa.api.Section+json", + "_href": "/api/ibexa/v2/content/sections/6", + "sectionId": 6, + "identifier": "form", + "name": "Form" + }, + { + "_media-type": "application/vnd.ibexa.api.Section+json", + "_href": "/api/ibexa/v2/content/sections/7", + "sectionId": 7, + "identifier": "template", + "name": "Template" + }, + { + "_media-type": "application/vnd.ibexa.api.Section+json", + "_href": "/api/ibexa/v2/content/sections/8", + "sectionId": 8, + "identifier": "restricted", + "name": "Restricted" + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/sections/GET/SectionList.xml.example b/src/bundle/Resources/api_platform/examples/content/sections/GET/SectionList.xml.example new file mode 100644 index 000000000..13de53b1d --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/sections/GET/SectionList.xml.example @@ -0,0 +1,33 @@ + + +
+ 1 + standard + Standard +
+
+ 2 + users + Users +
+
+ 3 + media + Media +
+
+ 6 + form + Form +
+
+ 7 + template + Template +
+
+ 8 + restricted + Restricted +
+
diff --git a/src/bundle/Resources/api_platform/examples/content/sections/POST/Section.json.example b/src/bundle/Resources/api_platform/examples/content/sections/POST/Section.json.example new file mode 100644 index 000000000..46ac7c049 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/sections/POST/Section.json.example @@ -0,0 +1,9 @@ +{ + "Section": { + "_media-type": "application/vnd.ibexa.api.Section+json", + "_href": "/api/ibexa/v2/content/sections/13", + "sectionId": 13, + "identifier": "restricted", + "name": "Restricted" + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/sections/POST/Section.xml.example b/src/bundle/Resources/api_platform/examples/content/sections/POST/Section.xml.example new file mode 100644 index 000000000..5dd9f2635 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/sections/POST/Section.xml.example @@ -0,0 +1,6 @@ + +
+ 7 + restricted + Restricted +
diff --git a/src/bundle/Resources/api_platform/examples/content/sections/POST/SectionInput.json.example b/src/bundle/Resources/api_platform/examples/content/sections/POST/SectionInput.json.example new file mode 100644 index 000000000..f4b5bcfa1 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/sections/POST/SectionInput.json.example @@ -0,0 +1,6 @@ +{ + "SectionInput": { + "identifier": "restricted", + "name": "Restricted" + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/sections/POST/SectionInput.xml.example b/src/bundle/Resources/api_platform/examples/content/sections/POST/SectionInput.xml.example new file mode 100644 index 000000000..d09d79015 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/sections/POST/SectionInput.xml.example @@ -0,0 +1,5 @@ + + + restricted + Restricted + \ No newline at end of file diff --git a/src/bundle/Resources/api_platform/examples/content/sections/section_id/GET/Section.json.example b/src/bundle/Resources/api_platform/examples/content/sections/section_id/GET/Section.json.example new file mode 100644 index 000000000..4a14d9f7c --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/sections/section_id/GET/Section.json.example @@ -0,0 +1,9 @@ +{ + "Section": { + "_media-type": "application/vnd.ibexa.api.Section+json", + "_href": "/api/ibexa/v2/content/sections/10", + "sectionId": 10, + "identifier": "design", + "name": "Design" + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/sections/section_id/GET/Section.xml.example b/src/bundle/Resources/api_platform/examples/content/sections/section_id/GET/Section.xml.example new file mode 100644 index 000000000..2f7d484de --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/sections/section_id/GET/Section.xml.example @@ -0,0 +1,6 @@ + +
+ 10 + design + Design +
diff --git a/src/bundle/Resources/api_platform/examples/content/sections/section_id/PATCH/Section.json.example b/src/bundle/Resources/api_platform/examples/content/sections/section_id/PATCH/Section.json.example new file mode 100644 index 000000000..84a448514 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/sections/section_id/PATCH/Section.json.example @@ -0,0 +1,9 @@ +{ + "Section": { + "_media-type": "application/vnd.ibexa.api.Section+json", + "_href": "/api/ibexa/v2/content/sections/7", + "sectionId": 7, + "identifier": "template", + "name": "Template" + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/sections/section_id/PATCH/Section.xml.example b/src/bundle/Resources/api_platform/examples/content/sections/section_id/PATCH/Section.xml.example new file mode 100644 index 000000000..89ba20fd7 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/sections/section_id/PATCH/Section.xml.example @@ -0,0 +1,6 @@ + +
+ 7 + template + Template +
diff --git a/src/bundle/Resources/api_platform/examples/content/sections/section_id/PATCH/SectionInput.json.example b/src/bundle/Resources/api_platform/examples/content/sections/section_id/PATCH/SectionInput.json.example new file mode 100644 index 000000000..6e93f4201 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/sections/section_id/PATCH/SectionInput.json.example @@ -0,0 +1,6 @@ +{ + "SectionInput": { + "identifier": "template", + "name": "Template" + } +} \ No newline at end of file diff --git a/src/bundle/Resources/api_platform/examples/content/sections/section_id/PATCH/SectionInput.xml.example b/src/bundle/Resources/api_platform/examples/content/sections/section_id/PATCH/SectionInput.xml.example new file mode 100644 index 000000000..1160bc416 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/sections/section_id/PATCH/SectionInput.xml.example @@ -0,0 +1,5 @@ + + + template + Template + diff --git a/src/bundle/Resources/api_platform/examples/content/trash/GET/Trash.json.example b/src/bundle/Resources/api_platform/examples/content/trash/GET/Trash.json.example new file mode 100644 index 000000000..5dd83e3ce --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/trash/GET/Trash.json.example @@ -0,0 +1,146 @@ +{ + "Trash": { + "_media-type": "application/vnd.ibexa.api.Trash+json", + "_href": "/api/ibexa/v2/content/trash", + "TrashItem": [ + { + "_media-type": "application/vnd.ibexa.api.TrashItem+json", + "_href": "/api/ibexa/v2/content/trash/87", + "id": 87, + "priority": 0, + "hidden": false, + "invisible": false, + "ParentLocation": { + "_media-type": "application/vnd.ibexa.api.Location+json", + "_href": "/api/ibexa/v2/content/locations/1/2/57" + }, + "pathString": "/1/2/57/87/", + "depth": 3, + "childCount": 0, + "remoteId": "7cc6565354858f39a794bf64aa2c2761", + "Content": { + "_media-type": "application/vnd.ibexa.api.Content+json", + "_href": "/api/ibexa/v2/content/objects/91" + }, + "sortField": "PATH", + "sortOrder": "ASC", + "ContentInfo": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/91", + "Content": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/91", + "_remoteId": "de906bef76f08700662bfaf1579871f0", + "_id": 91, + "ContentType": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/2" + }, + "Name": "test_article", + "TranslatedName": "test_article", + "Versions": { + "_media-type": "application/vnd.ibexa.api.VersionList+json", + "_href": "/api/ibexa/v2/content/objects/91/versions" + }, + "CurrentVersion": { + "_media-type": "application/vnd.ibexa.api.Version+json", + "_href": "/api/ibexa/v2/content/objects/91/currentversion" + }, + "Section": { + "_media-type": "application/vnd.ibexa.api.Section+json", + "_href": "/api/ibexa/v2/content/sections/1" + }, + "Locations": { + "_media-type": "application/vnd.ibexa.api.LocationList+json", + "_href": "/api/ibexa/v2/content/objects/91/locations" + }, + "Owner": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/11" + }, + "lastModificationDate": "2021-07-19T08:31:01+00:00", + "publishedDate": "2021-07-19T08:31:01+00:00", + "mainLanguageCode": "eng-GB", + "currentVersionNo": 1, + "alwaysAvailable": false, + "isHidden": false, + "status": "TRASHED", + "ObjectStates": { + "_media-type": "application/vnd.ibexa.api.ContentObjectStates+json", + "_href": "/api/ibexa/v2/content/objects/91/objectstates" + } + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.TrashItem+json", + "_href": "/api/ibexa/v2/content/trash/89", + "id": 89, + "priority": 0, + "hidden": false, + "invisible": false, + "ParentLocation": { + "_media-type": "application/vnd.ibexa.api.Location+json", + "_href": "/api/ibexa/v2/content/locations/1/2" + }, + "pathString": "/1/2/89/", + "depth": 2, + "childCount": 0, + "remoteId": "256c2e7d71e927bab32a901878827312", + "Content": { + "_media-type": "application/vnd.ibexa.api.Content+json", + "_href": "/api/ibexa/v2/content/objects/96" + }, + "sortField": "PATH", + "sortOrder": "ASC", + "ContentInfo": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/96", + "Content": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/96", + "_remoteId": "d5bad9eb55cfe8572adf04452a2b206e", + "_id": 96, + "ContentType": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/1" + }, + "Name": "All Articles test", + "TranslatedName": "All Articles test", + "Versions": { + "_media-type": "application/vnd.ibexa.api.VersionList+json", + "_href": "/api/ibexa/v2/content/objects/96/versions" + }, + "CurrentVersion": { + "_media-type": "application/vnd.ibexa.api.Version+json", + "_href": "/api/ibexa/v2/content/objects/96/currentversion" + }, + "Section": { + "_media-type": "application/vnd.ibexa.api.Section+json", + "_href": "/api/ibexa/v2/content/sections/1" + }, + "Locations": { + "_media-type": "application/vnd.ibexa.api.LocationList+json", + "_href": "/api/ibexa/v2/content/objects/96/locations" + }, + "Owner": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "lastModificationDate": "2021-07-19T12:43:02+00:00", + "publishedDate": "2021-07-19T12:42:47+00:00", + "mainLanguageCode": "eng-GB", + "currentVersionNo": 2, + "alwaysAvailable": true, + "isHidden": false, + "status": "TRASHED", + "ObjectStates": { + "_media-type": "application/vnd.ibexa.api.ContentObjectStates+json", + "_href": "/api/ibexa/v2/content/objects/96/objectstates" + } + } + } + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/trash/GET/Trash.xml.example b/src/bundle/Resources/api_platform/examples/content/trash/GET/Trash.xml.example new file mode 100644 index 000000000..feab5489e --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/trash/GET/Trash.xml.example @@ -0,0 +1,34 @@ + + + + 58 + 0 + false + false + + /1/2/56/58/ + 3 + 0 + 59800915ad2eb8514de0bebe84f6ccba + + PATH + ASC + + + + Folder 1 + + +
+ + + 2019-02-06T09:03:09+01:00 + 2019-02-06T09:03:09+01:00 + eng-GB + 1 + true + + + + + diff --git a/src/bundle/Resources/api_platform/examples/content/trash/trash_itemid/GET/TrashItem.json.example b/src/bundle/Resources/api_platform/examples/content/trash/trash_itemid/GET/TrashItem.json.example new file mode 100644 index 000000000..86fd0f2eb --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/trash/trash_itemid/GET/TrashItem.json.example @@ -0,0 +1,71 @@ +{ + "TrashItem": { + "_media-type": "application/vnd.ibexa.api.TrashItem+json", + "_href": "/api/ibexa/v2/content/trash/87", + "id": 87, + "priority": 0, + "hidden": false, + "invisible": false, + "ParentLocation": { + "_media-type": "application/vnd.ibexa.api.Location+json", + "_href": "/api/ibexa/v2/content/locations/1/2/57" + }, + "pathString": "/1/2/57/87/", + "depth": 3, + "childCount": 0, + "remoteId": "7cc6565354858f39a794bf64aa2c2761", + "Content": { + "_media-type": "application/vnd.ibexa.api.Content+json", + "_href": "/api/ibexa/v2/content/objects/91" + }, + "sortField": "PATH", + "sortOrder": "ASC", + "ContentInfo": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/91", + "Content": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/91", + "_remoteId": "de906bef76f08700662bfaf1579871f0", + "_id": 91, + "ContentType": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/2" + }, + "Name": "test_article", + "TranslatedName": "test_article", + "Versions": { + "_media-type": "application/vnd.ibexa.api.VersionList+json", + "_href": "/api/ibexa/v2/content/objects/91/versions" + }, + "CurrentVersion": { + "_media-type": "application/vnd.ibexa.api.Version+json", + "_href": "/api/ibexa/v2/content/objects/91/currentversion" + }, + "Section": { + "_media-type": "application/vnd.ibexa.api.Section+json", + "_href": "/api/ibexa/v2/content/sections/1" + }, + "Locations": { + "_media-type": "application/vnd.ibexa.api.LocationList+json", + "_href": "/api/ibexa/v2/content/objects/91/locations" + }, + "Owner": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/11" + }, + "lastModificationDate": "2021-07-19T08:31:01+00:00", + "publishedDate": "2021-07-19T08:31:01+00:00", + "mainLanguageCode": "eng-GB", + "currentVersionNo": 1, + "alwaysAvailable": false, + "isHidden": false, + "status": "TRASHED", + "ObjectStates": { + "_media-type": "application/vnd.ibexa.api.ContentObjectStates+json", + "_href": "/api/ibexa/v2/content/objects/91/objectstates" + } + } + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/trash/trash_itemid/GET/TrashItem.xml.example b/src/bundle/Resources/api_platform/examples/content/trash/trash_itemid/GET/TrashItem.xml.example new file mode 100644 index 000000000..1c886e140 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/trash/trash_itemid/GET/TrashItem.xml.example @@ -0,0 +1,33 @@ + + + 81 + 0 + false + false + + /1/2/42/81/ + 3 + 0 + 135e8a84b61848a67be36e9552d2724d + + PATH + ASC + + + + Folder 1 + + +
+ + + 2019-04-25T12:45:58+02:00 + 2019-04-25T12:45:58+02:00 + eng-GB + 1 + true + TRASHED + + + + diff --git a/src/bundle/Resources/api_platform/examples/content/typegroups/GET/ContentTypeGroupList.json.example b/src/bundle/Resources/api_platform/examples/content/typegroups/GET/ContentTypeGroupList.json.example new file mode 100644 index 000000000..45838cbc7 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/typegroups/GET/ContentTypeGroupList.json.example @@ -0,0 +1,68 @@ +{ + "ContentTypeGroupList": { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroupList+json", + "_href": "/api/ibexa/v2/content/typegroups", + "ContentTypeGroup": [ + { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroup+json", + "_href": "/api/ibexa/v2/content/typegroups/1", + "id": 1, + "identifier": "Content", + "created": "2002-09-05T09:08:48+00:00", + "modified": "2002-10-06T16:35:06+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Modifier": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "ContentTypes": { + "_media-type": "application/vnd.ibexa.api.ContentTypeInfoList+json", + "_href": "/api/ibexa/v2/content/typegroups/1/types" + } + }, + { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroup+json", + "_href": "/api/ibexa/v2/content/typegroups/2", + "id": 2, + "identifier": "Users", + "created": "2002-09-05T09:09:01+00:00", + "modified": "2002-10-06T16:35:13+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Modifier": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "ContentTypes": { + "_media-type": "application/vnd.ibexa.api.ContentTypeInfoList+json", + "_href": "/api/ibexa/v2/content/typegroups/2/types" + } + }, + { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroup+json", + "_href": "/api/ibexa/v2/content/typegroups/3", + "id": 3, + "identifier": "Media", + "created": "2002-09-14T13:22:23+00:00", + "modified": "2002-10-06T16:35:20+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Modifier": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "ContentTypes": { + "_media-type": "application/vnd.ibexa.api.ContentTypeInfoList+json", + "_href": "/api/ibexa/v2/content/typegroups/3/types" + } + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/typegroups/GET/ContentTypeGroupList.xml.example b/src/bundle/Resources/api_platform/examples/content/typegroups/GET/ContentTypeGroupList.xml.example new file mode 100644 index 000000000..7794b023a --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/typegroups/GET/ContentTypeGroupList.xml.example @@ -0,0 +1,30 @@ + + + + 1 + Content + 2002-09-05T11:08:48+02:00 + 2002-10-06T18:35:06+02:00 + + + + + + 2 + Users + 2002-09-05T11:09:01+02:00 + 2002-10-06T18:35:13+02:00 + + + + + + 3 + Media + 2002-09-14T15:22:23+02:00 + 2002-10-06T18:35:20+02:00 + + + + + diff --git a/src/bundle/Resources/api_platform/examples/content/typegroups/POST/ContentTypeGroup.json.example b/src/bundle/Resources/api_platform/examples/content/typegroups/POST/ContentTypeGroup.json.example new file mode 100644 index 000000000..5cd4cdbcc --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/typegroups/POST/ContentTypeGroup.json.example @@ -0,0 +1,22 @@ +{ + "ContentTypeGroup": { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroup+json", + "_href": "/api/ibexa/v2/content/typegroups/6", + "id": 6, + "identifier": "newContentTypeGroup", + "created": "2021-08-11T09:44:18+00:00", + "modified": "2021-08-11T09:44:18+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Modifier": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "ContentTypes": { + "_media-type": "application/vnd.ibexa.api.ContentTypeInfoList+json", + "_href": "/api/ibexa/v2/content/typegroups/6/types" + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/typegroups/POST/ContentTypeGroup.xml.example b/src/bundle/Resources/api_platform/examples/content/typegroups/POST/ContentTypeGroup.xml.example new file mode 100644 index 000000000..8c63d3a72 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/typegroups/POST/ContentTypeGroup.xml.example @@ -0,0 +1,10 @@ + + + 7 + newContentTypeGroup + 2012-02-31T12:45:00 + 2012-02-31T12:45:00 + + + + diff --git a/src/bundle/Resources/api_platform/examples/content/typegroups/POST/ContentTypeGroupInput.json.example b/src/bundle/Resources/api_platform/examples/content/typegroups/POST/ContentTypeGroupInput.json.example new file mode 100644 index 000000000..164105095 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/typegroups/POST/ContentTypeGroupInput.json.example @@ -0,0 +1,5 @@ +{ + "ContentTypeGroupInput": { + "identifier": "newContentTypeGroup" + } +} \ No newline at end of file diff --git a/src/bundle/Resources/api_platform/examples/content/typegroups/POST/ContentTypeGroupInput.xml.example b/src/bundle/Resources/api_platform/examples/content/typegroups/POST/ContentTypeGroupInput.xml.example new file mode 100644 index 000000000..f88b35a97 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/typegroups/POST/ContentTypeGroupInput.xml.example @@ -0,0 +1,4 @@ + + + newContentTypeGroup + diff --git a/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/GET/ContentTypeGroup.json.example b/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/GET/ContentTypeGroup.json.example new file mode 100644 index 000000000..cfcff3bb4 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/GET/ContentTypeGroup.json.example @@ -0,0 +1,1595 @@ +{ + "ContentTypeList": { + "_media-type": "application/vnd.ibexa.api.ContentTypeList+json", + "_href": "/api/ibexa/v2/content/typegroups/1/types", + "ContentType": [ + { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/2", + "id": 2, + "status": "DEFINED", + "identifier": "article", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Article" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "creationDate": "2002-06-18T09:21:38+00:00", + "modificationDate": "2021-06-28T11:31:22+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Modifier": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Groups": { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroupRefList+json", + "_href": "/api/ibexa/v2/content/types/2/groups" + }, + "Draft": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/2/draft" + }, + "remoteId": "c15b600eb9198b1924063b5a68758232", + "urlAliasSchema": "", + "nameSchema": "", + "isContainer": true, + "mainLanguageCode": "eng-GB", + "defaultAlwaysAvailable": false, + "defaultSortField": "PATH", + "defaultSortOrder": "ASC", + "FieldDefinitions": { + "_media-type": "application/vnd.ibexa.api.FieldDefinitionList+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions", + "FieldDefinition": [ + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions/1", + "id": 1, + "identifier": "title", + "fieldType": "ezstring", + "fieldGroup": "", + "position": 1, + "isTranslatable": true, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": "New article", + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Title" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": 255, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions/152", + "id": 152, + "identifier": "short_title", + "fieldType": "ezstring", + "fieldGroup": "", + "position": 2, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Short title" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": 255, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions/153", + "id": 153, + "identifier": "author", + "fieldType": "ezauthor", + "fieldGroup": "", + "position": 3, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": [], + "isSearchable": false, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Author" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": { + "defaultAuthor": 1 + }, + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions/120", + "id": 120, + "identifier": "intro", + "fieldType": "ezrichtext", + "fieldGroup": "", + "position": 4, + "isTranslatable": true, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": { + "xml": "\n
\n", + "xhtml5edit": "\n
\n" + }, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Intro" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions/121", + "id": 121, + "identifier": "body", + "fieldType": "ezrichtext", + "fieldGroup": "", + "position": 5, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "xml": "\n
\n", + "xhtml5edit": "\n
\n" + }, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Body" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions/123", + "id": 123, + "identifier": "enable_comments", + "fieldType": "ezboolean", + "fieldGroup": "", + "position": 6, + "isTranslatable": false, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": false, + "isSearchable": false, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Enable comments" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions/195", + "id": 195, + "identifier": "image", + "fieldType": "ezimageasset", + "fieldGroup": "content", + "position": 7, + "isTranslatable": false, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "destinationContentId": null, + "alternativeText": null, + "source": null + }, + "isSearchable": false, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Image" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": [] + } + ] + } + }, + { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/50", + "id": 50, + "status": "DEFINED", + "identifier": "copy_of_article_50", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Article" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "creationDate": "2021-07-14T10:30:00+00:00", + "modificationDate": "2021-07-14T10:30:00+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Modifier": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Groups": { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroupRefList+json", + "_href": "/api/ibexa/v2/content/types/50/groups" + }, + "Draft": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/50/draft" + }, + "remoteId": "fc9434492469d136ffe13377bfdcbb28", + "urlAliasSchema": "", + "nameSchema": "", + "isContainer": true, + "mainLanguageCode": "eng-GB", + "defaultAlwaysAvailable": false, + "defaultSortField": "PATH", + "defaultSortOrder": "ASC", + "FieldDefinitions": { + "_media-type": "application/vnd.ibexa.api.FieldDefinitionList+json", + "_href": "/api/ibexa/v2/content/types/50/fieldDefinitions", + "FieldDefinition": [ + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/50/fieldDefinitions/197", + "id": 197, + "identifier": "title", + "fieldType": "ezstring", + "fieldGroup": "", + "position": 1, + "isTranslatable": true, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": "New article", + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Title" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": 255, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/50/fieldDefinitions/198", + "id": 198, + "identifier": "short_title", + "fieldType": "ezstring", + "fieldGroup": "", + "position": 2, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Short title" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": 255, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/50/fieldDefinitions/199", + "id": 199, + "identifier": "author", + "fieldType": "ezauthor", + "fieldGroup": "", + "position": 3, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": [], + "isSearchable": false, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Author" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": { + "defaultAuthor": 1 + }, + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/50/fieldDefinitions/200", + "id": 200, + "identifier": "intro", + "fieldType": "ezrichtext", + "fieldGroup": "", + "position": 4, + "isTranslatable": true, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": { + "xml": "\n
\n", + "xhtml5edit": "\n
\n" + }, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Intro" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/50/fieldDefinitions/201", + "id": 201, + "identifier": "body", + "fieldType": "ezrichtext", + "fieldGroup": "", + "position": 5, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "xml": "\n
\n", + "xhtml5edit": "\n
\n" + }, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Body" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/50/fieldDefinitions/202", + "id": 202, + "identifier": "enable_comments", + "fieldType": "ezboolean", + "fieldGroup": "", + "position": 6, + "isTranslatable": false, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": false, + "isSearchable": false, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Enable comments" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/50/fieldDefinitions/203", + "id": 203, + "identifier": "image", + "fieldType": "ezimageasset", + "fieldGroup": "content", + "position": 7, + "isTranslatable": false, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "destinationContentId": null, + "alternativeText": null, + "source": null + }, + "isSearchable": false, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Image" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": [] + } + ] + } + }, + { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/44", + "id": 44, + "status": "DEFINED", + "identifier": "dog_breed", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Dog Breed" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "creationDate": "2021-06-28T11:28:00+00:00", + "modificationDate": "2021-06-28T11:29:02+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Modifier": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Groups": { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroupRefList+json", + "_href": "/api/ibexa/v2/content/types/44/groups" + }, + "Draft": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/44/draft" + }, + "remoteId": "b348c95f7c573d4d502d6b59f80e618a", + "urlAliasSchema": "", + "nameSchema": "", + "isContainer": false, + "mainLanguageCode": "eng-GB", + "defaultAlwaysAvailable": true, + "defaultSortField": "PUBLISHED", + "defaultSortOrder": "DESC", + "FieldDefinitions": { + "_media-type": "application/vnd.ibexa.api.FieldDefinitionList+json", + "_href": "/api/ibexa/v2/content/types/44/fieldDefinitions", + "FieldDefinition": [ + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/44/fieldDefinitions/190", + "id": 190, + "identifier": "name", + "fieldType": "ezstring", + "fieldGroup": "content", + "position": 1, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Name" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": null, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/44/fieldDefinitions/191", + "id": 191, + "identifier": "photo", + "fieldType": "ezimageasset", + "fieldGroup": "content", + "position": 2, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "destinationContentId": null, + "alternativeText": null, + "source": null + }, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Photo" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/44/fieldDefinitions/192", + "id": 192, + "identifier": "description", + "fieldType": "ezrichtext", + "fieldGroup": "content", + "position": 3, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "xml": "\n
\n", + "xhtml5edit": "\n
\n" + }, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Full Description" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": [] + } + ] + } + }, + { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/1", + "id": 1, + "status": "DEFINED", + "identifier": "folder", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Folder" + } + ] + }, + "descriptions": { + "value": [] + }, + "creationDate": "2002-06-18T09:21:38+00:00", + "modificationDate": "2015-11-29T21:14:32+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Modifier": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Groups": { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroupRefList+json", + "_href": "/api/ibexa/v2/content/types/1/groups" + }, + "Draft": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/1/draft" + }, + "remoteId": "a3d405b81be900468eb153d774f4f0d2", + "urlAliasSchema": null, + "nameSchema": "", + "isContainer": true, + "mainLanguageCode": "eng-GB", + "defaultAlwaysAvailable": true, + "defaultSortField": "PATH", + "defaultSortOrder": "ASC", + "FieldDefinitions": { + "_media-type": "application/vnd.ibexa.api.FieldDefinitionList+json", + "_href": "/api/ibexa/v2/content/types/1/fieldDefinitions", + "FieldDefinition": [ + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/1/fieldDefinitions/4", + "id": 4, + "identifier": "name", + "fieldType": "ezstring", + "fieldGroup": "", + "position": 1, + "isTranslatable": true, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": "Folder", + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Name" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": 255, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/1/fieldDefinitions/155", + "id": 155, + "identifier": "short_name", + "fieldType": "ezstring", + "fieldGroup": "", + "position": 2, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Short name" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": 100, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/1/fieldDefinitions/119", + "id": 119, + "identifier": "short_description", + "fieldType": "ezrichtext", + "fieldGroup": "", + "position": 3, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "xml": "\n
\n", + "xhtml5edit": "\n
\n" + }, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Short description" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/1/fieldDefinitions/156", + "id": 156, + "identifier": "description", + "fieldType": "ezrichtext", + "fieldGroup": "", + "position": 4, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "xml": "\n
\n", + "xhtml5edit": "\n
\n" + }, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Description" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": [] + } + ] + } + }, + { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/55", + "id": 55, + "status": "DEFINED", + "identifier": "folder_55", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Folder" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "creationDate": "2021-07-28T07:57:22+00:00", + "modificationDate": "2021-07-28T07:57:34+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Modifier": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Groups": { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroupRefList+json", + "_href": "/api/ibexa/v2/content/types/55/groups" + }, + "Draft": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/55/draft" + }, + "remoteId": "4eb7bc76f6d0bd1d5ded2d8936cc6afb", + "urlAliasSchema": "", + "nameSchema": "", + "isContainer": true, + "mainLanguageCode": "eng-GB", + "defaultAlwaysAvailable": true, + "defaultSortField": "PATH", + "defaultSortOrder": "ASC", + "FieldDefinitions": { + "_media-type": "application/vnd.ibexa.api.FieldDefinitionList+json", + "_href": "/api/ibexa/v2/content/types/55/fieldDefinitions", + "FieldDefinition": [ + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/55/fieldDefinitions/210", + "id": 210, + "identifier": "name", + "fieldType": "ezstring", + "fieldGroup": "", + "position": 1, + "isTranslatable": true, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": "Folder", + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Name" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": 255, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/55/fieldDefinitions/211", + "id": 211, + "identifier": "short_name", + "fieldType": "ezstring", + "fieldGroup": "", + "position": 2, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Short name" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": 100, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/55/fieldDefinitions/212", + "id": 212, + "identifier": "short_description", + "fieldType": "ezrichtext", + "fieldGroup": "", + "position": 3, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "xml": "\n
\n", + "xhtml5edit": "\n
\n" + }, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Short description" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/55/fieldDefinitions/213", + "id": 213, + "identifier": "description", + "fieldType": "ezrichtext", + "fieldGroup": "", + "position": 4, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "xml": "\n
\n", + "xhtml5edit": "\n
\n" + }, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Description" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": [] + } + ] + } + }, + { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/43", + "id": 43, + "status": "DEFINED", + "identifier": "form", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Form" + } + ] + }, + "descriptions": { + "value": [] + }, + "creationDate": "2018-09-17T06:46:13+00:00", + "modificationDate": "2018-09-17T06:47:14+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Modifier": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Groups": { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroupRefList+json", + "_href": "/api/ibexa/v2/content/types/43/groups" + }, + "Draft": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/43/draft" + }, + "remoteId": "6f7f21df775a33c1e4bbc76b48c38476", + "urlAliasSchema": "", + "nameSchema": "", + "isContainer": false, + "mainLanguageCode": "eng-GB", + "defaultAlwaysAvailable": true, + "defaultSortField": "PUBLISHED", + "defaultSortOrder": "DESC", + "FieldDefinitions": { + "_media-type": "application/vnd.ibexa.api.FieldDefinitionList+json", + "_href": "/api/ibexa/v2/content/types/43/fieldDefinitions", + "FieldDefinition": [ + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/43/fieldDefinitions/188", + "id": 188, + "identifier": "title", + "fieldType": "ezstring", + "fieldGroup": "content", + "position": 1, + "isTranslatable": true, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Title" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": null, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/43/fieldDefinitions/189", + "id": 189, + "identifier": "form", + "fieldType": "ezform", + "fieldGroup": "content", + "position": 2, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "fields": [], + "content_id": null, + "content_field_id": null, + "language_code": null + }, + "isSearchable": false, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Form" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": [] + } + ] + } + }, + { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/45", + "id": 45, + "status": "DEFINED", + "identifier": "tip", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Tip" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "creationDate": "2021-06-28T11:29:19+00:00", + "modificationDate": "2021-07-26T09:33:06+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Modifier": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Groups": { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroupRefList+json", + "_href": "/api/ibexa/v2/content/types/45/groups" + }, + "Draft": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/45/draft" + }, + "remoteId": "e6490e8a785edacd48629f2022be3125", + "urlAliasSchema": "", + "nameSchema": "<title>", + "isContainer": false, + "mainLanguageCode": "eng-GB", + "defaultAlwaysAvailable": true, + "defaultSortField": "PUBLISHED", + "defaultSortOrder": "DESC", + "FieldDefinitions": { + "_media-type": "application/vnd.ibexa.api.FieldDefinitionList+json", + "_href": "/api/ibexa/v2/content/types/45/fieldDefinitions", + "FieldDefinition": [ + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/45/fieldDefinitions/193", + "id": 193, + "identifier": "title", + "fieldType": "ezstring", + "fieldGroup": "content", + "position": 1, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Title" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": null, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/45/fieldDefinitions/194", + "id": 194, + "identifier": "body", + "fieldType": "eztext", + "fieldGroup": "content", + "position": 2, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Body" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": { + "textRows": 10 + }, + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/45/fieldDefinitions/204", + "id": 204, + "identifier": "richtext", + "fieldType": "ezrichtext", + "fieldGroup": "content", + "position": 3, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://docbook.org/ns/docbook\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"5.0-variant ezpublish-1.0\"/>\n", + "xhtml5edit": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://ibexa.co/namespaces/ezpublish5/xhtml5/edit\"/>\n" + }, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "richtext" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": [] + } + ] + } + }, + { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/42", + "id": 42, + "status": "DEFINED", + "identifier": "landing_page", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Landing page" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "" + } + ] + }, + "creationDate": "2015-07-03T12:00:26+00:00", + "modificationDate": "2015-07-03T12:00:26+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Modifier": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Groups": { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroupRefList+json", + "_href": "/api/ibexa/v2/content/types/42/groups" + }, + "Draft": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/42/draft" + }, + "remoteId": "60c03e9758465eb69d56b3afb6adf18e", + "urlAliasSchema": "", + "nameSchema": "<name>", + "isContainer": true, + "mainLanguageCode": "eng-GB", + "defaultAlwaysAvailable": true, + "defaultSortField": "PUBLISHED", + "defaultSortOrder": "DESC", + "FieldDefinitions": { + "_media-type": "application/vnd.ibexa.api.FieldDefinitionList+json", + "_href": "/api/ibexa/v2/content/types/42/fieldDefinitions", + "FieldDefinition": [ + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/42/fieldDefinitions/185", + "id": 185, + "identifier": "name", + "fieldType": "ezstring", + "fieldGroup": "content", + "position": 10, + "isTranslatable": true, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Title" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Title" + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": null, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/42/fieldDefinitions/186", + "id": 186, + "identifier": "description", + "fieldType": "ezstring", + "fieldGroup": "content", + "position": 20, + "isTranslatable": true, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Description" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Landing page description" + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": null, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/42/fieldDefinitions/187", + "id": 187, + "identifier": "page", + "fieldType": "ezlandingpage", + "fieldGroup": "content", + "position": 30, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "layout": "default", + "zones": [ + { + "id": "default_id", + "name": "default", + "blocks": [] + } + ] + }, + "isSearchable": false, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Landing page" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Landing page" + } + ] + }, + "fieldSettings": { + "availableBlocks": null, + "availableLayouts": null, + "editorMode": "page_view_mode" + }, + "validatorConfiguration": [] + } + ] + } + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/GET/ContentTypeGroup.xml.example b/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/GET/ContentTypeGroup.xml.example new file mode 100644 index 000000000..e8def2575 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/GET/ContentTypeGroup.xml.example @@ -0,0 +1,1034 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ContentTypeList media-type="application/vnd.ibexa.api.ContentTypeList+xml" href="/api/ibexa/v2/content/typegroups/1/types"> + <ContentType media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/2"> + <id>2</id> + <status>DEFINED</status> + <identifier>article</identifier> + <names> + <value languageCode="eng-GB">Article</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <creationDate>2002-06-18T09:21:38+00:00</creationDate> + <modificationDate>2021-06-28T11:31:22+00:00</modificationDate> + <Creator media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Modifier media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Groups media-type="application/vnd.ibexa.api.ContentTypeGroupRefList+xml" href="/api/ibexa/v2/content/types/2/groups"/> + <Draft media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/2/draft"/> + <remoteId>c15b600eb9198b1924063b5a68758232</remoteId> + <urlAliasSchema></urlAliasSchema> + <nameSchema><short_title|title></nameSchema> + <isContainer>true</isContainer> + <mainLanguageCode>eng-GB</mainLanguageCode> + <defaultAlwaysAvailable>false</defaultAlwaysAvailable> + <defaultSortField>PATH</defaultSortField> + <defaultSortOrder>ASC</defaultSortOrder> + <FieldDefinitions media-type="application/vnd.ibexa.api.FieldDefinitionList+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions"> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions/1"> + <id>1</id> + <identifier>title</identifier> + <fieldType>ezstring</fieldType> + <fieldGroup></fieldGroup> + <position>1</position> + <isTranslatable>true</isTranslatable> + <isRequired>true</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue>New article</defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Title</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <fieldSettings/> + <validatorConfiguration> + <value key="StringLengthValidator"> + <value key="maxStringLength">255</value> + <value key="minStringLength"/> + </value> + </validatorConfiguration> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions/152"> + <id>152</id> + <identifier>short_title</identifier> + <fieldType>ezstring</fieldType> + <fieldGroup></fieldGroup> + <position>2</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue/> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Short title</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <fieldSettings/> + <validatorConfiguration> + <value key="StringLengthValidator"> + <value key="maxStringLength">255</value> + <value key="minStringLength"/> + </value> + </validatorConfiguration> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions/153"> + <id>153</id> + <identifier>author</identifier> + <fieldType>ezauthor</fieldType> + <fieldGroup></fieldGroup> + <position>3</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue/> + <isSearchable>false</isSearchable> + <names> + <value languageCode="eng-GB">Author</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <fieldSettings> + <value key="defaultAuthor">1</value> + </fieldSettings> + <validatorConfiguration/> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions/120"> + <id>120</id> + <identifier>intro</identifier> + <fieldType>ezrichtext</fieldType> + <fieldGroup></fieldGroup> + <position>4</position> + <isTranslatable>true</isTranslatable> + <isRequired>true</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue> + <value key="xml"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0-variant ezpublish-1.0"/> +</value> + <value key="xhtml5edit"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"/> +</value> + </defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Intro</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <fieldSettings/> + <validatorConfiguration/> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions/121"> + <id>121</id> + <identifier>body</identifier> + <fieldType>ezrichtext</fieldType> + <fieldGroup></fieldGroup> + <position>5</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue> + <value key="xml"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0-variant ezpublish-1.0"/> +</value> + <value key="xhtml5edit"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"/> +</value> + </defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Body</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <fieldSettings/> + <validatorConfiguration/> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions/123"> + <id>123</id> + <identifier>enable_comments</identifier> + <fieldType>ezboolean</fieldType> + <fieldGroup></fieldGroup> + <position>6</position> + <isTranslatable>false</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue>false</defaultValue> + <isSearchable>false</isSearchable> + <names> + <value languageCode="eng-GB">Enable comments</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <fieldSettings/> + <validatorConfiguration/> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions/195"> + <id>195</id> + <identifier>image</identifier> + <fieldType>ezimageasset</fieldType> + <fieldGroup>content</fieldGroup> + <position>7</position> + <isTranslatable>false</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue> + <value key="destinationContentId"/> + <value key="alternativeText"/> + <value key="source"/> + </defaultValue> + <isSearchable>false</isSearchable> + <names> + <value languageCode="eng-GB">Image</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <fieldSettings/> + <validatorConfiguration/> + </FieldDefinition> + </FieldDefinitions> + </ContentType> + <ContentType media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/50"> + <id>50</id> + <status>DEFINED</status> + <identifier>copy_of_article_50</identifier> + <names> + <value languageCode="eng-GB">Article</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <creationDate>2021-07-14T10:30:00+00:00</creationDate> + <modificationDate>2021-07-14T10:30:00+00:00</modificationDate> + <Creator media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Modifier media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Groups media-type="application/vnd.ibexa.api.ContentTypeGroupRefList+xml" href="/api/ibexa/v2/content/types/50/groups"/> + <Draft media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/50/draft"/> + <remoteId>fc9434492469d136ffe13377bfdcbb28</remoteId> + <urlAliasSchema></urlAliasSchema> + <nameSchema><short_title|title></nameSchema> + <isContainer>true</isContainer> + <mainLanguageCode>eng-GB</mainLanguageCode> + <defaultAlwaysAvailable>false</defaultAlwaysAvailable> + <defaultSortField>PATH</defaultSortField> + <defaultSortOrder>ASC</defaultSortOrder> + <FieldDefinitions media-type="application/vnd.ibexa.api.FieldDefinitionList+xml" href="/api/ibexa/v2/content/types/50/fieldDefinitions"> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/50/fieldDefinitions/197"> + <id>197</id> + <identifier>title</identifier> + <fieldType>ezstring</fieldType> + <fieldGroup></fieldGroup> + <position>1</position> + <isTranslatable>true</isTranslatable> + <isRequired>true</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue>New article</defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Title</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <fieldSettings/> + <validatorConfiguration> + <value key="StringLengthValidator"> + <value key="maxStringLength">255</value> + <value key="minStringLength"/> + </value> + </validatorConfiguration> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/50/fieldDefinitions/198"> + <id>198</id> + <identifier>short_title</identifier> + <fieldType>ezstring</fieldType> + <fieldGroup></fieldGroup> + <position>2</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue/> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Short title</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <fieldSettings/> + <validatorConfiguration> + <value key="StringLengthValidator"> + <value key="maxStringLength">255</value> + <value key="minStringLength"/> + </value> + </validatorConfiguration> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/50/fieldDefinitions/199"> + <id>199</id> + <identifier>author</identifier> + <fieldType>ezauthor</fieldType> + <fieldGroup></fieldGroup> + <position>3</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue/> + <isSearchable>false</isSearchable> + <names> + <value languageCode="eng-GB">Author</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <fieldSettings> + <value key="defaultAuthor">1</value> + </fieldSettings> + <validatorConfiguration/> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/50/fieldDefinitions/200"> + <id>200</id> + <identifier>intro</identifier> + <fieldType>ezrichtext</fieldType> + <fieldGroup></fieldGroup> + <position>4</position> + <isTranslatable>true</isTranslatable> + <isRequired>true</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue> + <value key="xml"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0-variant ezpublish-1.0"/> +</value> + <value key="xhtml5edit"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"/> +</value> + </defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Intro</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <fieldSettings/> + <validatorConfiguration/> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/50/fieldDefinitions/201"> + <id>201</id> + <identifier>body</identifier> + <fieldType>ezrichtext</fieldType> + <fieldGroup></fieldGroup> + <position>5</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue> + <value key="xml"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0-variant ezpublish-1.0"/> +</value> + <value key="xhtml5edit"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"/> +</value> + </defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Body</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <fieldSettings/> + <validatorConfiguration/> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/50/fieldDefinitions/202"> + <id>202</id> + <identifier>enable_comments</identifier> + <fieldType>ezboolean</fieldType> + <fieldGroup></fieldGroup> + <position>6</position> + <isTranslatable>false</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue>false</defaultValue> + <isSearchable>false</isSearchable> + <names> + <value languageCode="eng-GB">Enable comments</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <fieldSettings/> + <validatorConfiguration/> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/50/fieldDefinitions/203"> + <id>203</id> + <identifier>image</identifier> + <fieldType>ezimageasset</fieldType> + <fieldGroup>content</fieldGroup> + <position>7</position> + <isTranslatable>false</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue> + <value key="destinationContentId"/> + <value key="alternativeText"/> + <value key="source"/> + </defaultValue> + <isSearchable>false</isSearchable> + <names> + <value languageCode="eng-GB">Image</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <fieldSettings/> + <validatorConfiguration/> + </FieldDefinition> + </FieldDefinitions> + </ContentType> + <ContentType media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/44"> + <id>44</id> + <status>DEFINED</status> + <identifier>dog_breed</identifier> + <names> + <value languageCode="eng-GB">Dog Breed</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <creationDate>2021-06-28T11:28:00+00:00</creationDate> + <modificationDate>2021-06-28T11:29:02+00:00</modificationDate> + <Creator media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Modifier media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Groups media-type="application/vnd.ibexa.api.ContentTypeGroupRefList+xml" href="/api/ibexa/v2/content/types/44/groups"/> + <Draft media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/44/draft"/> + <remoteId>b348c95f7c573d4d502d6b59f80e618a</remoteId> + <urlAliasSchema></urlAliasSchema> + <nameSchema><name></nameSchema> + <isContainer>false</isContainer> + <mainLanguageCode>eng-GB</mainLanguageCode> + <defaultAlwaysAvailable>true</defaultAlwaysAvailable> + <defaultSortField>PUBLISHED</defaultSortField> + <defaultSortOrder>DESC</defaultSortOrder> + <FieldDefinitions media-type="application/vnd.ibexa.api.FieldDefinitionList+xml" href="/api/ibexa/v2/content/types/44/fieldDefinitions"> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/44/fieldDefinitions/190"> + <id>190</id> + <identifier>name</identifier> + <fieldType>ezstring</fieldType> + <fieldGroup>content</fieldGroup> + <position>1</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue/> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Name</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <fieldSettings/> + <validatorConfiguration> + <value key="StringLengthValidator"> + <value key="maxStringLength"/> + <value key="minStringLength"/> + </value> + </validatorConfiguration> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/44/fieldDefinitions/191"> + <id>191</id> + <identifier>photo</identifier> + <fieldType>ezimageasset</fieldType> + <fieldGroup>content</fieldGroup> + <position>2</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue> + <value key="destinationContentId"/> + <value key="alternativeText"/> + <value key="source"/> + </defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Photo</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <fieldSettings/> + <validatorConfiguration/> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/44/fieldDefinitions/192"> + <id>192</id> + <identifier>description</identifier> + <fieldType>ezrichtext</fieldType> + <fieldGroup>content</fieldGroup> + <position>3</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue> + <value key="xml"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0-variant ezpublish-1.0"/> +</value> + <value key="xhtml5edit"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"/> +</value> + </defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Full Description</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <fieldSettings/> + <validatorConfiguration/> + </FieldDefinition> + </FieldDefinitions> + </ContentType> + <ContentType media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/1"> + <id>1</id> + <status>DEFINED</status> + <identifier>folder</identifier> + <names> + <value languageCode="eng-GB">Folder</value> + </names> + <descriptions/> + <creationDate>2002-06-18T09:21:38+00:00</creationDate> + <modificationDate>2015-11-29T21:14:32+00:00</modificationDate> + <Creator media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Modifier media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Groups media-type="application/vnd.ibexa.api.ContentTypeGroupRefList+xml" href="/api/ibexa/v2/content/types/1/groups"/> + <Draft media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/1/draft"/> + <remoteId>a3d405b81be900468eb153d774f4f0d2</remoteId> + <urlAliasSchema></urlAliasSchema> + <nameSchema><short_name|name></nameSchema> + <isContainer>true</isContainer> + <mainLanguageCode>eng-GB</mainLanguageCode> + <defaultAlwaysAvailable>true</defaultAlwaysAvailable> + <defaultSortField>PATH</defaultSortField> + <defaultSortOrder>ASC</defaultSortOrder> + <FieldDefinitions media-type="application/vnd.ibexa.api.FieldDefinitionList+xml" href="/api/ibexa/v2/content/types/1/fieldDefinitions"> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/1/fieldDefinitions/4"> + <id>4</id> + <identifier>name</identifier> + <fieldType>ezstring</fieldType> + <fieldGroup></fieldGroup> + <position>1</position> + <isTranslatable>true</isTranslatable> + <isRequired>true</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue>Folder</defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Name</value> + </names> + <descriptions/> + <fieldSettings/> + <validatorConfiguration> + <value key="StringLengthValidator"> + <value key="maxStringLength">255</value> + <value key="minStringLength"/> + </value> + </validatorConfiguration> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/1/fieldDefinitions/155"> + <id>155</id> + <identifier>short_name</identifier> + <fieldType>ezstring</fieldType> + <fieldGroup></fieldGroup> + <position>2</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue/> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Short name</value> + </names> + <descriptions/> + <fieldSettings/> + <validatorConfiguration> + <value key="StringLengthValidator"> + <value key="maxStringLength">100</value> + <value key="minStringLength"/> + </value> + </validatorConfiguration> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/1/fieldDefinitions/119"> + <id>119</id> + <identifier>short_description</identifier> + <fieldType>ezrichtext</fieldType> + <fieldGroup></fieldGroup> + <position>3</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue> + <value key="xml"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0-variant ezpublish-1.0"/> +</value> + <value key="xhtml5edit"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"/> +</value> + </defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Short description</value> + </names> + <descriptions/> + <fieldSettings/> + <validatorConfiguration/> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/1/fieldDefinitions/156"> + <id>156</id> + <identifier>description</identifier> + <fieldType>ezrichtext</fieldType> + <fieldGroup></fieldGroup> + <position>4</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue> + <value key="xml"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0-variant ezpublish-1.0"/> +</value> + <value key="xhtml5edit"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"/> +</value> + </defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Description</value> + </names> + <descriptions/> + <fieldSettings/> + <validatorConfiguration/> + </FieldDefinition> + </FieldDefinitions> + </ContentType> + <ContentType media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/55"> + <id>55</id> + <status>DEFINED</status> + <identifier>folder_55</identifier> + <names> + <value languageCode="eng-GB">Folder</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <creationDate>2021-07-28T07:57:22+00:00</creationDate> + <modificationDate>2021-07-28T07:57:34+00:00</modificationDate> + <Creator media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Modifier media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Groups media-type="application/vnd.ibexa.api.ContentTypeGroupRefList+xml" href="/api/ibexa/v2/content/types/55/groups"/> + <Draft media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/55/draft"/> + <remoteId>4eb7bc76f6d0bd1d5ded2d8936cc6afb</remoteId> + <urlAliasSchema></urlAliasSchema> + <nameSchema><short_name|name></nameSchema> + <isContainer>true</isContainer> + <mainLanguageCode>eng-GB</mainLanguageCode> + <defaultAlwaysAvailable>true</defaultAlwaysAvailable> + <defaultSortField>PATH</defaultSortField> + <defaultSortOrder>ASC</defaultSortOrder> + <FieldDefinitions media-type="application/vnd.ibexa.api.FieldDefinitionList+xml" href="/api/ibexa/v2/content/types/55/fieldDefinitions"> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/55/fieldDefinitions/210"> + <id>210</id> + <identifier>name</identifier> + <fieldType>ezstring</fieldType> + <fieldGroup></fieldGroup> + <position>1</position> + <isTranslatable>true</isTranslatable> + <isRequired>true</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue>Folder</defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Name</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <fieldSettings/> + <validatorConfiguration> + <value key="StringLengthValidator"> + <value key="maxStringLength">255</value> + <value key="minStringLength"/> + </value> + </validatorConfiguration> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/55/fieldDefinitions/211"> + <id>211</id> + <identifier>short_name</identifier> + <fieldType>ezstring</fieldType> + <fieldGroup></fieldGroup> + <position>2</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue/> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Short name</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <fieldSettings/> + <validatorConfiguration> + <value key="StringLengthValidator"> + <value key="maxStringLength">100</value> + <value key="minStringLength"/> + </value> + </validatorConfiguration> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/55/fieldDefinitions/212"> + <id>212</id> + <identifier>short_description</identifier> + <fieldType>ezrichtext</fieldType> + <fieldGroup></fieldGroup> + <position>3</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue> + <value key="xml"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0-variant ezpublish-1.0"/> +</value> + <value key="xhtml5edit"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"/> +</value> + </defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Short description</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <fieldSettings/> + <validatorConfiguration/> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/55/fieldDefinitions/213"> + <id>213</id> + <identifier>description</identifier> + <fieldType>ezrichtext</fieldType> + <fieldGroup></fieldGroup> + <position>4</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue> + <value key="xml"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0-variant ezpublish-1.0"/> +</value> + <value key="xhtml5edit"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"/> +</value> + </defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Description</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <fieldSettings/> + <validatorConfiguration/> + </FieldDefinition> + </FieldDefinitions> + </ContentType> + <ContentType media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/43"> + <id>43</id> + <status>DEFINED</status> + <identifier>form</identifier> + <names> + <value languageCode="eng-GB">Form</value> + </names> + <descriptions/> + <creationDate>2018-09-17T06:46:13+00:00</creationDate> + <modificationDate>2018-09-17T06:47:14+00:00</modificationDate> + <Creator media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Modifier media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Groups media-type="application/vnd.ibexa.api.ContentTypeGroupRefList+xml" href="/api/ibexa/v2/content/types/43/groups"/> + <Draft media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/43/draft"/> + <remoteId>6f7f21df775a33c1e4bbc76b48c38476</remoteId> + <urlAliasSchema></urlAliasSchema> + <nameSchema><title></nameSchema> + <isContainer>false</isContainer> + <mainLanguageCode>eng-GB</mainLanguageCode> + <defaultAlwaysAvailable>true</defaultAlwaysAvailable> + <defaultSortField>PUBLISHED</defaultSortField> + <defaultSortOrder>DESC</defaultSortOrder> + <FieldDefinitions media-type="application/vnd.ibexa.api.FieldDefinitionList+xml" href="/api/ibexa/v2/content/types/43/fieldDefinitions"> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/43/fieldDefinitions/188"> + <id>188</id> + <identifier>title</identifier> + <fieldType>ezstring</fieldType> + <fieldGroup>content</fieldGroup> + <position>1</position> + <isTranslatable>true</isTranslatable> + <isRequired>true</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue/> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Title</value> + </names> + <descriptions/> + <fieldSettings/> + <validatorConfiguration> + <value key="StringLengthValidator"> + <value key="maxStringLength"/> + <value key="minStringLength"/> + </value> + </validatorConfiguration> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/43/fieldDefinitions/189"> + <id>189</id> + <identifier>form</identifier> + <fieldType>ezform</fieldType> + <fieldGroup>content</fieldGroup> + <position>2</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue> + <value key="fields"/> + <value key="content_id"/> + <value key="content_field_id"/> + <value key="language_code"/> + </defaultValue> + <isSearchable>false</isSearchable> + <names> + <value languageCode="eng-GB">Form</value> + </names> + <descriptions/> + <fieldSettings/> + <validatorConfiguration/> + </FieldDefinition> + </FieldDefinitions> + </ContentType> + <ContentType media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/45"> + <id>45</id> + <status>DEFINED</status> + <identifier>tip</identifier> + <names> + <value languageCode="eng-GB">Tip</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <creationDate>2021-06-28T11:29:19+00:00</creationDate> + <modificationDate>2021-07-26T09:33:06+00:00</modificationDate> + <Creator media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Modifier media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Groups media-type="application/vnd.ibexa.api.ContentTypeGroupRefList+xml" href="/api/ibexa/v2/content/types/45/groups"/> + <Draft media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/45/draft"/> + <remoteId>e6490e8a785edacd48629f2022be3125</remoteId> + <urlAliasSchema></urlAliasSchema> + <nameSchema><title></nameSchema> + <isContainer>false</isContainer> + <mainLanguageCode>eng-GB</mainLanguageCode> + <defaultAlwaysAvailable>true</defaultAlwaysAvailable> + <defaultSortField>PUBLISHED</defaultSortField> + <defaultSortOrder>DESC</defaultSortOrder> + <FieldDefinitions media-type="application/vnd.ibexa.api.FieldDefinitionList+xml" href="/api/ibexa/v2/content/types/45/fieldDefinitions"> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/45/fieldDefinitions/193"> + <id>193</id> + <identifier>title</identifier> + <fieldType>ezstring</fieldType> + <fieldGroup>content</fieldGroup> + <position>1</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue/> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Title</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <fieldSettings/> + <validatorConfiguration> + <value key="StringLengthValidator"> + <value key="maxStringLength"/> + <value key="minStringLength"/> + </value> + </validatorConfiguration> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/45/fieldDefinitions/194"> + <id>194</id> + <identifier>body</identifier> + <fieldType>eztext</fieldType> + <fieldGroup>content</fieldGroup> + <position>2</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue/> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Body</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <fieldSettings> + <value key="textRows">10</value> + </fieldSettings> + <validatorConfiguration/> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/45/fieldDefinitions/204"> + <id>204</id> + <identifier>richtext</identifier> + <fieldType>ezrichtext</fieldType> + <fieldGroup>content</fieldGroup> + <position>3</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue> + <value key="xml"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0-variant ezpublish-1.0"/> +</value> + <value key="xhtml5edit"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"/> +</value> + </defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">richtext</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <fieldSettings/> + <validatorConfiguration/> + </FieldDefinition> + </FieldDefinitions> + </ContentType> + <ContentType media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/42"> + <id>42</id> + <status>DEFINED</status> + <identifier>landing_page</identifier> + <names> + <value languageCode="eng-GB">Landing page</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <creationDate>2015-07-03T12:00:26+00:00</creationDate> + <modificationDate>2015-07-03T12:00:26+00:00</modificationDate> + <Creator media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Modifier media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Groups media-type="application/vnd.ibexa.api.ContentTypeGroupRefList+xml" href="/api/ibexa/v2/content/types/42/groups"/> + <Draft media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/42/draft"/> + <remoteId>60c03e9758465eb69d56b3afb6adf18e</remoteId> + <urlAliasSchema></urlAliasSchema> + <nameSchema><name></nameSchema> + <isContainer>true</isContainer> + <mainLanguageCode>eng-GB</mainLanguageCode> + <defaultAlwaysAvailable>true</defaultAlwaysAvailable> + <defaultSortField>PUBLISHED</defaultSortField> + <defaultSortOrder>DESC</defaultSortOrder> + <FieldDefinitions media-type="application/vnd.ibexa.api.FieldDefinitionList+xml" href="/api/ibexa/v2/content/types/42/fieldDefinitions"> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/42/fieldDefinitions/185"> + <id>185</id> + <identifier>name</identifier> + <fieldType>ezstring</fieldType> + <fieldGroup>content</fieldGroup> + <position>10</position> + <isTranslatable>true</isTranslatable> + <isRequired>true</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue/> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Title</value> + </names> + <descriptions> + <value languageCode="eng-GB">Title</value> + </descriptions> + <fieldSettings/> + <validatorConfiguration> + <value key="StringLengthValidator"> + <value key="maxStringLength"/> + <value key="minStringLength"/> + </value> + </validatorConfiguration> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/42/fieldDefinitions/186"> + <id>186</id> + <identifier>description</identifier> + <fieldType>ezstring</fieldType> + <fieldGroup>content</fieldGroup> + <position>20</position> + <isTranslatable>true</isTranslatable> + <isRequired>true</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue/> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Description</value> + </names> + <descriptions> + <value languageCode="eng-GB">Landing page description</value> + </descriptions> + <fieldSettings/> + <validatorConfiguration> + <value key="StringLengthValidator"> + <value key="maxStringLength"/> + <value key="minStringLength"/> + </value> + </validatorConfiguration> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/42/fieldDefinitions/187"> + <id>187</id> + <identifier>page</identifier> + <fieldType>ezlandingpage</fieldType> + <fieldGroup>content</fieldGroup> + <position>30</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue> + <value key="layout">default</value> + <value key="zones"> + <value> + <value key="id">default_id</value> + <value key="name">default</value> + <value key="blocks"/> + </value> + </value> + </defaultValue> + <isSearchable>false</isSearchable> + <names> + <value languageCode="eng-GB">Landing page</value> + </names> + <descriptions> + <value languageCode="eng-GB">Landing page</value> + </descriptions> + <fieldSettings> + <value key="availableBlocks"/> + <value key="availableLayouts"/> + <value key="editorMode">page_view_mode</value> + </fieldSettings> + <validatorConfiguration/> + </FieldDefinition> + </FieldDefinitions> + </ContentType> +</ContentTypeList> diff --git a/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/PATCH/ContentTypeGroup.json.example b/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/PATCH/ContentTypeGroup.json.example new file mode 100644 index 000000000..5235bc58c --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/PATCH/ContentTypeGroup.json.example @@ -0,0 +1,22 @@ +{ + "ContentTypeGroup": { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroup+json", + "_href": "/api/ibexa/v2/content/typegroups/4", + "id": 4, + "identifier": "updatedIdentifer", + "created": "2021-08-11T09:44:18+00:00", + "modified": "2021-08-11T10:10:04+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Modifier": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "ContentTypes": { + "_media-type": "application/vnd.ibexa.api.ContentTypeInfoList+json", + "_href": "/api/ibexa/v2/content/typegroups/6/types" + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/PATCH/ContentTypeGroup.xml.example b/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/PATCH/ContentTypeGroup.xml.example new file mode 100644 index 000000000..2357f9257 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/PATCH/ContentTypeGroup.xml.example @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ContentTypeGroup media-type="application/vnd.ibexa.api.ContentTypeGroup+xml" href="/api/ibexa/v2/content/typegroups/1"> + <id>4</id> + <identifier>updatedIdentifer</identifier> + <created>2002-09-05T11:08:48+02:00</created> + <modified>2019-02-22T14:42:55+01:00</modified> + <Creator media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Modifier media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <ContentTypes media-type="application/vnd.ibexa.api.ContentTypeInfoList+xml" href="/api/ibexa/v2/content/typegroups/1/types"/> +</ContentTypeGroup> diff --git a/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/PATCH/ContentTypeGroupInput.json.example b/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/PATCH/ContentTypeGroupInput.json.example new file mode 100644 index 000000000..bf3fa9ebc --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/PATCH/ContentTypeGroupInput.json.example @@ -0,0 +1,5 @@ +{ + "ContentTypeGroupInput": { + "identifier": "updatedIdentifer" + } +} \ No newline at end of file diff --git a/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/PATCH/ContentTypeGroupInput.xml.example b/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/PATCH/ContentTypeGroupInput.xml.example new file mode 100644 index 000000000..2a79ff0f6 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/PATCH/ContentTypeGroupInput.xml.example @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ContentTypeGroupInput> + <identifier>updatedIdentifer</identifier> +</ContentTypeGroupInput> diff --git a/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/types/GET/ContentTypeInfoList.json.example b/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/types/GET/ContentTypeInfoList.json.example new file mode 100644 index 000000000..c7c2076fb --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/types/GET/ContentTypeInfoList.json.example @@ -0,0 +1,2011 @@ +{ + "ContentTypeList": { + "_media-type": "application/vnd.ibexa.api.ContentTypeList+json", + "_href": "/api/ibexa/v2/content/types", + "ContentType": [ + { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/2", + "id": 2, + "status": "DEFINED", + "identifier": "article", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Article" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "creationDate": "2002-06-18T09:21:38+00:00", + "modificationDate": "2021-06-28T11:31:22+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Modifier": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Groups": { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroupRefList+json", + "_href": "/api/ibexa/v2/content/types/2/groups" + }, + "Draft": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/2/draft" + }, + "remoteId": "c15b600eb9198b1924063b5a68758232", + "urlAliasSchema": "", + "nameSchema": "<short_title|title>", + "isContainer": true, + "mainLanguageCode": "eng-GB", + "defaultAlwaysAvailable": false, + "defaultSortField": "PATH", + "defaultSortOrder": "ASC", + "FieldDefinitions": { + "_media-type": "application/vnd.ibexa.api.FieldDefinitionList+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions", + "FieldDefinition": [ + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions/1", + "id": 1, + "identifier": "title", + "fieldType": "ezstring", + "fieldGroup": "", + "position": 1, + "isTranslatable": true, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": "New article", + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Title" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": 255, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions/152", + "id": 152, + "identifier": "short_title", + "fieldType": "ezstring", + "fieldGroup": "", + "position": 2, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Short title" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": 255, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions/153", + "id": 153, + "identifier": "author", + "fieldType": "ezauthor", + "fieldGroup": "", + "position": 3, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": [], + "isSearchable": false, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Author" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": { + "defaultAuthor": 1 + }, + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions/120", + "id": 120, + "identifier": "intro", + "fieldType": "ezrichtext", + "fieldGroup": "", + "position": 4, + "isTranslatable": true, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": { + "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://docbook.org/ns/docbook\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"5.0-variant ezpublish-1.0\"/>\n", + "xhtml5edit": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://ibexa.co/namespaces/ezpublish5/xhtml5/edit\"/>\n" + }, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Intro" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions/121", + "id": 121, + "identifier": "body", + "fieldType": "ezrichtext", + "fieldGroup": "", + "position": 5, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://docbook.org/ns/docbook\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"5.0-variant ezpublish-1.0\"/>\n", + "xhtml5edit": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://ibexa.co/namespaces/ezpublish5/xhtml5/edit\"/>\n" + }, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Body" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions/123", + "id": 123, + "identifier": "enable_comments", + "fieldType": "ezboolean", + "fieldGroup": "", + "position": 6, + "isTranslatable": false, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": false, + "isSearchable": false, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Enable comments" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions/195", + "id": 195, + "identifier": "image", + "fieldType": "ezimageasset", + "fieldGroup": "content", + "position": 7, + "isTranslatable": false, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "destinationContentId": null, + "alternativeText": null, + "source": null + }, + "isSearchable": false, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Image" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": [] + } + ] + } + }, + { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/50", + "id": 50, + "status": "DEFINED", + "identifier": "copy_of_article_50", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Article" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "creationDate": "2021-07-14T10:30:00+00:00", + "modificationDate": "2021-07-14T10:30:00+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Modifier": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Groups": { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroupRefList+json", + "_href": "/api/ibexa/v2/content/types/50/groups" + }, + "Draft": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/50/draft" + }, + "remoteId": "fc9434492469d136ffe13377bfdcbb28", + "urlAliasSchema": "", + "nameSchema": "<short_title|title>", + "isContainer": true, + "mainLanguageCode": "eng-GB", + "defaultAlwaysAvailable": false, + "defaultSortField": "PATH", + "defaultSortOrder": "ASC", + "FieldDefinitions": { + "_media-type": "application/vnd.ibexa.api.FieldDefinitionList+json", + "_href": "/api/ibexa/v2/content/types/50/fieldDefinitions", + "FieldDefinition": [ + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/50/fieldDefinitions/197", + "id": 197, + "identifier": "title", + "fieldType": "ezstring", + "fieldGroup": "", + "position": 1, + "isTranslatable": true, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": "New article", + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Title" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": 255, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/50/fieldDefinitions/198", + "id": 198, + "identifier": "short_title", + "fieldType": "ezstring", + "fieldGroup": "", + "position": 2, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Short title" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": 255, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/50/fieldDefinitions/199", + "id": 199, + "identifier": "author", + "fieldType": "ezauthor", + "fieldGroup": "", + "position": 3, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": [], + "isSearchable": false, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Author" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": { + "defaultAuthor": 1 + }, + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/50/fieldDefinitions/200", + "id": 200, + "identifier": "intro", + "fieldType": "ezrichtext", + "fieldGroup": "", + "position": 4, + "isTranslatable": true, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": { + "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://docbook.org/ns/docbook\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"5.0-variant ezpublish-1.0\"/>\n", + "xhtml5edit": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://ibexa.co/namespaces/ezpublish5/xhtml5/edit\"/>\n" + }, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Intro" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/50/fieldDefinitions/201", + "id": 201, + "identifier": "body", + "fieldType": "ezrichtext", + "fieldGroup": "", + "position": 5, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://docbook.org/ns/docbook\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"5.0-variant ezpublish-1.0\"/>\n", + "xhtml5edit": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://ibexa.co/namespaces/ezpublish5/xhtml5/edit\"/>\n" + }, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Body" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/50/fieldDefinitions/202", + "id": 202, + "identifier": "enable_comments", + "fieldType": "ezboolean", + "fieldGroup": "", + "position": 6, + "isTranslatable": false, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": false, + "isSearchable": false, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Enable comments" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/50/fieldDefinitions/203", + "id": 203, + "identifier": "image", + "fieldType": "ezimageasset", + "fieldGroup": "content", + "position": 7, + "isTranslatable": false, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "destinationContentId": null, + "alternativeText": null, + "source": null + }, + "isSearchable": false, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Image" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": [] + } + ] + } + }, + { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/44", + "id": 44, + "status": "DEFINED", + "identifier": "dog_breed", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Dog Breed" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "creationDate": "2021-06-28T11:28:00+00:00", + "modificationDate": "2021-06-28T11:29:02+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Modifier": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Groups": { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroupRefList+json", + "_href": "/api/ibexa/v2/content/types/44/groups" + }, + "Draft": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/44/draft" + }, + "remoteId": "b348c95f7c573d4d502d6b59f80e618a", + "urlAliasSchema": "", + "nameSchema": "<name>", + "isContainer": false, + "mainLanguageCode": "eng-GB", + "defaultAlwaysAvailable": true, + "defaultSortField": "PUBLISHED", + "defaultSortOrder": "DESC", + "FieldDefinitions": { + "_media-type": "application/vnd.ibexa.api.FieldDefinitionList+json", + "_href": "/api/ibexa/v2/content/types/44/fieldDefinitions", + "FieldDefinition": [ + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/44/fieldDefinitions/190", + "id": 190, + "identifier": "name", + "fieldType": "ezstring", + "fieldGroup": "content", + "position": 1, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Name" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": null, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/44/fieldDefinitions/191", + "id": 191, + "identifier": "photo", + "fieldType": "ezimageasset", + "fieldGroup": "content", + "position": 2, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "destinationContentId": null, + "alternativeText": null, + "source": null + }, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Photo" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/44/fieldDefinitions/192", + "id": 192, + "identifier": "description", + "fieldType": "ezrichtext", + "fieldGroup": "content", + "position": 3, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://docbook.org/ns/docbook\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"5.0-variant ezpublish-1.0\"/>\n", + "xhtml5edit": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://ibexa.co/namespaces/ezpublish5/xhtml5/edit\"/>\n" + }, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Full Description" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": [] + } + ] + } + }, + { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/1", + "id": 1, + "status": "DEFINED", + "identifier": "folder", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Folder" + } + ] + }, + "descriptions": { + "value": [] + }, + "creationDate": "2002-06-18T09:21:38+00:00", + "modificationDate": "2015-11-29T21:14:32+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Modifier": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Groups": { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroupRefList+json", + "_href": "/api/ibexa/v2/content/types/1/groups" + }, + "Draft": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/1/draft" + }, + "remoteId": "a3d405b81be900468eb153d774f4f0d2", + "urlAliasSchema": null, + "nameSchema": "<short_name|name>", + "isContainer": true, + "mainLanguageCode": "eng-GB", + "defaultAlwaysAvailable": true, + "defaultSortField": "PATH", + "defaultSortOrder": "ASC", + "FieldDefinitions": { + "_media-type": "application/vnd.ibexa.api.FieldDefinitionList+json", + "_href": "/api/ibexa/v2/content/types/1/fieldDefinitions", + "FieldDefinition": [ + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/1/fieldDefinitions/4", + "id": 4, + "identifier": "name", + "fieldType": "ezstring", + "fieldGroup": "", + "position": 1, + "isTranslatable": true, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": "Folder", + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Name" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": 255, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/1/fieldDefinitions/155", + "id": 155, + "identifier": "short_name", + "fieldType": "ezstring", + "fieldGroup": "", + "position": 2, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Short name" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": 100, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/1/fieldDefinitions/119", + "id": 119, + "identifier": "short_description", + "fieldType": "ezrichtext", + "fieldGroup": "", + "position": 3, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://docbook.org/ns/docbook\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"5.0-variant ezpublish-1.0\"/>\n", + "xhtml5edit": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://ibexa.co/namespaces/ezpublish5/xhtml5/edit\"/>\n" + }, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Short description" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/1/fieldDefinitions/156", + "id": 156, + "identifier": "description", + "fieldType": "ezrichtext", + "fieldGroup": "", + "position": 4, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://docbook.org/ns/docbook\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"5.0-variant ezpublish-1.0\"/>\n", + "xhtml5edit": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://ibexa.co/namespaces/ezpublish5/xhtml5/edit\"/>\n" + }, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Description" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": [] + } + ] + } + }, + { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/43", + "id": 43, + "status": "DEFINED", + "identifier": "form", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Form" + } + ] + }, + "descriptions": { + "value": [] + }, + "creationDate": "2018-09-17T06:46:13+00:00", + "modificationDate": "2018-09-17T06:47:14+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Modifier": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Groups": { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroupRefList+json", + "_href": "/api/ibexa/v2/content/types/43/groups" + }, + "Draft": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/43/draft" + }, + "remoteId": "6f7f21df775a33c1e4bbc76b48c38476", + "urlAliasSchema": "", + "nameSchema": "<title>", + "isContainer": false, + "mainLanguageCode": "eng-GB", + "defaultAlwaysAvailable": true, + "defaultSortField": "PUBLISHED", + "defaultSortOrder": "DESC", + "FieldDefinitions": { + "_media-type": "application/vnd.ibexa.api.FieldDefinitionList+json", + "_href": "/api/ibexa/v2/content/types/43/fieldDefinitions", + "FieldDefinition": [ + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/43/fieldDefinitions/188", + "id": 188, + "identifier": "title", + "fieldType": "ezstring", + "fieldGroup": "content", + "position": 1, + "isTranslatable": true, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Title" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": null, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/43/fieldDefinitions/189", + "id": 189, + "identifier": "form", + "fieldType": "ezform", + "fieldGroup": "content", + "position": 2, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "fields": [], + "content_id": null, + "content_field_id": null, + "language_code": null + }, + "isSearchable": false, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Form" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": [] + } + ] + } + }, + { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/45", + "id": 45, + "status": "DEFINED", + "identifier": "tip", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Tip" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "creationDate": "2021-06-28T11:29:19+00:00", + "modificationDate": "2021-07-26T09:33:06+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Modifier": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Groups": { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroupRefList+json", + "_href": "/api/ibexa/v2/content/types/45/groups" + }, + "Draft": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/45/draft" + }, + "remoteId": "e6490e8a785edacd48629f2022be3125", + "urlAliasSchema": "", + "nameSchema": "<title>", + "isContainer": false, + "mainLanguageCode": "eng-GB", + "defaultAlwaysAvailable": true, + "defaultSortField": "PUBLISHED", + "defaultSortOrder": "DESC", + "FieldDefinitions": { + "_media-type": "application/vnd.ibexa.api.FieldDefinitionList+json", + "_href": "/api/ibexa/v2/content/types/45/fieldDefinitions", + "FieldDefinition": [ + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/45/fieldDefinitions/193", + "id": 193, + "identifier": "title", + "fieldType": "ezstring", + "fieldGroup": "content", + "position": 1, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Title" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": null, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/45/fieldDefinitions/194", + "id": 194, + "identifier": "body", + "fieldType": "eztext", + "fieldGroup": "content", + "position": 2, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Body" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": { + "textRows": 10 + }, + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/45/fieldDefinitions/204", + "id": 204, + "identifier": "richtext", + "fieldType": "ezrichtext", + "fieldGroup": "content", + "position": 3, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://docbook.org/ns/docbook\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"5.0-variant ezpublish-1.0\"/>\n", + "xhtml5edit": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://ibexa.co/namespaces/ezpublish5/xhtml5/edit\"/>\n" + }, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "richtext" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": [] + } + ] + } + }, + { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/42", + "id": 42, + "status": "DEFINED", + "identifier": "landing_page", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Landing page" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "" + } + ] + }, + "creationDate": "2015-07-03T12:00:26+00:00", + "modificationDate": "2015-07-03T12:00:26+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Modifier": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Groups": { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroupRefList+json", + "_href": "/api/ibexa/v2/content/types/42/groups" + }, + "Draft": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/42/draft" + }, + "remoteId": "60c03e9758465eb69d56b3afb6adf18e", + "urlAliasSchema": "", + "nameSchema": "<name>", + "isContainer": true, + "mainLanguageCode": "eng-GB", + "defaultAlwaysAvailable": true, + "defaultSortField": "PUBLISHED", + "defaultSortOrder": "DESC", + "FieldDefinitions": { + "_media-type": "application/vnd.ibexa.api.FieldDefinitionList+json", + "_href": "/api/ibexa/v2/content/types/42/fieldDefinitions", + "FieldDefinition": [ + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/42/fieldDefinitions/185", + "id": 185, + "identifier": "name", + "fieldType": "ezstring", + "fieldGroup": "content", + "position": 10, + "isTranslatable": true, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Title" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Title" + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": null, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/42/fieldDefinitions/186", + "id": 186, + "identifier": "description", + "fieldType": "ezstring", + "fieldGroup": "content", + "position": 20, + "isTranslatable": true, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Description" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Landing page description" + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": null, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/42/fieldDefinitions/187", + "id": 187, + "identifier": "page", + "fieldType": "ezlandingpage", + "fieldGroup": "content", + "position": 30, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "layout": "default", + "zones": [ + { + "id": "default_id", + "name": "default", + "blocks": [] + } + ] + }, + "isSearchable": false, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Landing page" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Landing page" + } + ] + }, + "fieldSettings": { + "availableBlocks": null, + "availableLayouts": null, + "editorMode": "page_view_mode" + }, + "validatorConfiguration": [] + } + ] + } + }, + { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/4", + "id": 4, + "status": "DEFINED", + "identifier": "user", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "User" + } + ] + }, + "descriptions": { + "value": [] + }, + "creationDate": "2002-06-18T09:21:38+00:00", + "modificationDate": "2004-04-15T08:39:24+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Modifier": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Groups": { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroupRefList+json", + "_href": "/api/ibexa/v2/content/types/4/groups" + }, + "Draft": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/4/draft" + }, + "remoteId": "40faa822edc579b02c25f6bb7beec3ad", + "urlAliasSchema": null, + "nameSchema": "<first_name> <last_name>", + "isContainer": false, + "mainLanguageCode": "eng-GB", + "defaultAlwaysAvailable": true, + "defaultSortField": "PATH", + "defaultSortOrder": "ASC", + "FieldDefinitions": { + "_media-type": "application/vnd.ibexa.api.FieldDefinitionList+json", + "_href": "/api/ibexa/v2/content/types/4/fieldDefinitions", + "FieldDefinition": [ + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/4/fieldDefinitions/8", + "id": 8, + "identifier": "first_name", + "fieldType": "ezstring", + "fieldGroup": "", + "position": 1, + "isTranslatable": true, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "First name" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": 255, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/4/fieldDefinitions/9", + "id": 9, + "identifier": "last_name", + "fieldType": "ezstring", + "fieldGroup": "", + "position": 2, + "isTranslatable": true, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Last name" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": 255, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/4/fieldDefinitions/12", + "id": 12, + "identifier": "user_account", + "fieldType": "ezuser", + "fieldGroup": "", + "position": 3, + "isTranslatable": false, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": false, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "User account" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": { + "PasswordTTL": 0, + "PasswordTTLWarning": 0, + "RequireUniqueEmail": false, + "UsernamePattern": "^[^@]+$" + }, + "validatorConfiguration": { + "PasswordValueValidator": { + "requireAtLeastOneUpperCaseCharacter": true, + "requireAtLeastOneLowerCaseCharacter": true, + "requireAtLeastOneNumericCharacter": true, + "requireAtLeastOneNonAlphanumericCharacter": false, + "requireNewPassword": false, + "minLength": 10 + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/4/fieldDefinitions/179", + "id": 179, + "identifier": "signature", + "fieldType": "eztext", + "fieldGroup": "", + "position": 4, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Signature" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": { + "textRows": 10 + }, + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/4/fieldDefinitions/180", + "id": 180, + "identifier": "image", + "fieldType": "ezimage", + "fieldGroup": "", + "position": 5, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": false, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Image" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": { + "FileSizeValidator": { + "maxFileSize": 10 + } + } + } + ] + } + }, + { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/3", + "id": 3, + "status": "DEFINED", + "identifier": "user_group", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "User group" + } + ] + }, + "descriptions": { + "value": [] + }, + "creationDate": "2002-06-18T09:21:38+00:00", + "modificationDate": "2003-03-24T08:32:23+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Modifier": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Groups": { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroupRefList+json", + "_href": "/api/ibexa/v2/content/types/3/groups" + }, + "Draft": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/3/draft" + }, + "remoteId": "25b4268cdcd01921b808a0d854b877ef", + "urlAliasSchema": null, + "nameSchema": "<name>", + "isContainer": true, + "mainLanguageCode": "eng-GB", + "defaultAlwaysAvailable": true, + "defaultSortField": "PATH", + "defaultSortOrder": "ASC", + "FieldDefinitions": { + "_media-type": "application/vnd.ibexa.api.FieldDefinitionList+json", + "_href": "/api/ibexa/v2/content/types/3/fieldDefinitions", + "FieldDefinition": [ + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/3/fieldDefinitions/6", + "id": 6, + "identifier": "name", + "fieldType": "ezstring", + "fieldGroup": "", + "position": 1, + "isTranslatable": true, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Name" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": 255, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/3/fieldDefinitions/7", + "id": 7, + "identifier": "description", + "fieldType": "ezstring", + "fieldGroup": "", + "position": 2, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Description" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": 255, + "minStringLength": null + } + } + } + ] + } + }, + { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/12", + "id": 12, + "status": "DEFINED", + "identifier": "file", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "File" + } + ] + }, + "descriptions": { + "value": [] + }, + "creationDate": "2003-05-08T09:17:52+00:00", + "modificationDate": "2003-05-08T09:21:09+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Modifier": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Groups": { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroupRefList+json", + "_href": "/api/ibexa/v2/content/types/12/groups" + }, + "Draft": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/12/draft" + }, + "remoteId": "637d58bfddf164627bdfd265733280a0", + "urlAliasSchema": null, + "nameSchema": "<name>", + "isContainer": false, + "mainLanguageCode": "eng-GB", + "defaultAlwaysAvailable": true, + "defaultSortField": "PATH", + "defaultSortOrder": "ASC", + "FieldDefinitions": { + "_media-type": "application/vnd.ibexa.api.FieldDefinitionList+json", + "_href": "/api/ibexa/v2/content/types/12/fieldDefinitions", + "FieldDefinition": [ + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/12/fieldDefinitions/146", + "id": 146, + "identifier": "name", + "fieldType": "ezstring", + "fieldGroup": "", + "position": 1, + "isTranslatable": true, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": "New file", + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Name" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": null, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/12/fieldDefinitions/147", + "id": 147, + "identifier": "description", + "fieldType": "ezrichtext", + "fieldGroup": "", + "position": 2, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://docbook.org/ns/docbook\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"5.0-variant ezpublish-1.0\"/>\n", + "xhtml5edit": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://ibexa.co/namespaces/ezpublish5/xhtml5/edit\"/>\n" + }, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Description" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/12/fieldDefinitions/148", + "id": 148, + "identifier": "file", + "fieldType": "ezbinaryfile", + "fieldGroup": "", + "position": 3, + "isTranslatable": true, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": false, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "File" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": { + "FileSizeValidator": { + "maxFileSize": null + } + } + } + ] + } + }, + { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/5", + "id": 5, + "status": "DEFINED", + "identifier": "image", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Image" + } + ] + }, + "descriptions": { + "value": [] + }, + "creationDate": "2002-09-08T11:36:32+00:00", + "modificationDate": "2003-03-24T08:33:04+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Modifier": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Groups": { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroupRefList+json", + "_href": "/api/ibexa/v2/content/types/5/groups" + }, + "Draft": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/5/draft" + }, + "remoteId": "f6df12aa74e36230eb675f364fccd25a", + "urlAliasSchema": null, + "nameSchema": "<name>", + "isContainer": false, + "mainLanguageCode": "eng-GB", + "defaultAlwaysAvailable": true, + "defaultSortField": "PATH", + "defaultSortOrder": "ASC", + "FieldDefinitions": { + "_media-type": "application/vnd.ibexa.api.FieldDefinitionList+json", + "_href": "/api/ibexa/v2/content/types/5/fieldDefinitions", + "FieldDefinition": [ + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/5/fieldDefinitions/116", + "id": 116, + "identifier": "name", + "fieldType": "ezstring", + "fieldGroup": "", + "position": 1, + "isTranslatable": true, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Name" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": 150, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/5/fieldDefinitions/117", + "id": 117, + "identifier": "caption", + "fieldType": "ezrichtext", + "fieldGroup": "", + "position": 2, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://docbook.org/ns/docbook\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"5.0-variant ezpublish-1.0\"/>\n", + "xhtml5edit": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://ibexa.co/namespaces/ezpublish5/xhtml5/edit\"/>\n" + }, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Caption" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/5/fieldDefinitions/118", + "id": 118, + "identifier": "image", + "fieldType": "ezimage", + "fieldGroup": "", + "position": 3, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": false, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Image" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": { + "FileSizeValidator": { + "maxFileSize": 10 + } + } + } + ] + } + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/types/GET/ContentTypeInfoList.xml.example b/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/types/GET/ContentTypeInfoList.xml.example new file mode 100644 index 000000000..097f475b1 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/types/GET/ContentTypeInfoList.xml.example @@ -0,0 +1,49 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ContentTypeInfoList media-type="application/vnd.ibexa.api.ContentTypeInfoList+xml" href="/api/ibexa/v2/content/typegroups/1/types"> + <ContentTypeInfo media-type="application/vnd.ibexa.api.ContentTypeInfo+xml" href="/api/ibexa/v2/content/types/2"> + <id>2</id> + <status>DEFINED</status> + <identifier>article</identifier> + <names> + <value languageCode="eng-GB">Article</value> + </names> + <descriptions/> + <creationDate>2002-06-18T11:21:38+02:00</creationDate> + <modificationDate>2004-04-20T11:56:29+02:00</modificationDate> + <Creator media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Modifier media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Groups media-type="application/vnd.ibexa.api.ContentTypeGroupRefList+xml" href="/api/ibexa/v2/content/types/2/groups"/> + <Draft media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/2/draft"/> + <remoteId>c15b600eb9198b1924063b5a68758232</remoteId> + <urlAliasSchema></urlAliasSchema> + <nameSchema><short_title|title></nameSchema> + <isContainer>true</isContainer> + <mainLanguageCode>eng-GB</mainLanguageCode> + <defaultAlwaysAvailable>false</defaultAlwaysAvailable> + <defaultSortField>PATH</defaultSortField> + <defaultSortOrder>ASC</defaultSortOrder> + </ContentTypeInfo> + <ContentTypeInfo media-type="application/vnd.ibexa.api.ContentTypeInfo+xml" href="/api/ibexa/v2/content/types/1"> + <id>1</id> + <status>DEFINED</status> + <identifier>folder</identifier> + <names> + <value languageCode="eng-GB">Folder</value> + </names> + <descriptions/> + <creationDate>2002-06-18T11:21:38+02:00</creationDate> + <modificationDate>2015-11-29T22:14:32+01:00</modificationDate> + <Creator media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Modifier media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Groups media-type="application/vnd.ibexa.api.ContentTypeGroupRefList+xml" href="/api/ibexa/v2/content/types/1/groups"/> + <Draft media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/1/draft"/> + <remoteId>a3d405b81be900468eb153d774f4f0d2</remoteId> + <urlAliasSchema></urlAliasSchema> + <nameSchema><short_name|name></nameSchema> + <isContainer>true</isContainer> + <mainLanguageCode>eng-GB</mainLanguageCode> + <defaultAlwaysAvailable>true</defaultAlwaysAvailable> + <defaultSortField>PATH</defaultSortField> + <defaultSortOrder>ASC</defaultSortOrder> + </ContentTypeInfo> +</ContentTypeInfoList> diff --git a/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/types/GET/ContentTypeList.xml.example b/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/types/GET/ContentTypeList.xml.example new file mode 100644 index 000000000..b33671c66 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/types/GET/ContentTypeList.xml.example @@ -0,0 +1,184 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ContentTypeList media-type="application/vnd.ibexa.api.ContentTypeList+xml" href="/api/ibexa/v2/content/typegroups/1/types"> + <ContentType media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/2"> + <id>2</id> + <status>DEFINED</status> + <identifier>article</identifier> + <names> + <value languageCode="eng-GB">Article</value> + </names> + <descriptions/> + <creationDate>2002-06-18T11:21:38+02:00</creationDate> + <modificationDate>2004-04-20T11:56:29+02:00</modificationDate> + <Creator media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Modifier media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Groups media-type="application/vnd.ibexa.api.ContentTypeGroupRefList+xml" href="/api/ibexa/v2/content/types/2/groups"/> + <Draft media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/2/draft"/> + <remoteId>c15b600eb9198b1924063b5a68758232</remoteId> + <urlAliasSchema></urlAliasSchema> + <nameSchema><short_title|title></nameSchema> + <isContainer>true</isContainer> + <mainLanguageCode>eng-GB</mainLanguageCode> + <defaultAlwaysAvailable>false</defaultAlwaysAvailable> + <defaultSortField>PATH</defaultSortField> + <defaultSortOrder>ASC</defaultSortOrder> + <FieldDefinitions media-type="application/vnd.ibexa.api.FieldDefinitionList+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions"> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions/1"> + <id>1</id> + <identifier>title</identifier> + <fieldType>ezstring</fieldType> + <fieldGroup></fieldGroup> + <position>1</position> + <isTranslatable>true</isTranslatable> + <isRequired>true</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue>New article</defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Title</value> + </names> + <descriptions/> + <fieldSettings/> + <validatorConfiguration> + <value key="StringLengthValidator"> + <value key="maxStringLength">255</value> + <value key="minStringLength"/></value> + </validatorConfiguration> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions/152"> + <id>152</id> + <identifier>short_title</identifier> + <fieldType>ezstring</fieldType> + <fieldGroup></fieldGroup> + <position>2</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue/> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Short title</value> + </names> + <descriptions/> + <fieldSettings/> + <validatorConfiguration> + <value key="StringLengthValidator"> + <value key="maxStringLength">255</value> + <value key="minStringLength"/></value> + </validatorConfiguration> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions/153"> + <id>153</id> + <identifier>author</identifier> + <fieldType>ezauthor</fieldType> + <fieldGroup></fieldGroup> + <position>3</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue/> + <isSearchable>false</isSearchable> + <names> + <value languageCode="eng-GB">Author</value> + </names> + <descriptions/> + <fieldSettings> + <value key="defaultAuthor">1</value> + </fieldSettings> + <validatorConfiguration/> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions/120"> + <id>120</id> + <identifier>intro</identifier> + <fieldType>ezrichtext</fieldType> + <fieldGroup></fieldGroup> + <position>4</position> + <isTranslatable>true</isTranslatable> + <isRequired>true</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue> + <value key="xml"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0-variant ezpublish-1.0"/> +</value> + <value key="xhtml5edit"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"/> +</value> + </defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Intro</value> + </names> + <descriptions/> + <fieldSettings/> + <validatorConfiguration/> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions/121"> + <id>121</id> + <identifier>body</identifier> + <fieldType>ezrichtext</fieldType> + <fieldGroup></fieldGroup> + <position>5</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue> + <value key="xml"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0-variant ezpublish-1.0"/> +</value> + <value key="xhtml5edit"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"/> +</value> + </defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Body</value> + </names> + <descriptions/> + <fieldSettings/> + <validatorConfiguration/> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions/123"> + <id>123</id> + <identifier>enable_comments</identifier> + <fieldType>ezboolean</fieldType> + <fieldGroup></fieldGroup> + <position>6</position> + <isTranslatable>false</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue>false</defaultValue> + <isSearchable>false</isSearchable> + <names> + <value languageCode="eng-GB">Enable comments</value> + </names> + <descriptions/> + <fieldSettings/> + <validatorConfiguration/> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions/154"> + <id>154</id> + <identifier>image</identifier> + <fieldType>ezobjectrelation</fieldType> + <fieldGroup></fieldGroup> + <position>7</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue> + <value key="destinationContentId"/> + </defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Image</value> + </names> + <descriptions/> + <fieldSettings> + <value key="selectionMethod">SELECTION_BROWSE</value> + <value key="selectionRoot"></value> + <value key="selectionContentTypes"/> + </fieldSettings> + <validatorConfiguration/> + </FieldDefinition> + </FieldDefinitions> + </ContentType> +</ContentTypeList> diff --git a/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/types/POST/ContentType.xml.example b/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/types/POST/ContentType.xml.example new file mode 100644 index 000000000..beac49c71 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/types/POST/ContentType.xml.example @@ -0,0 +1,52 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ContentType media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/20/draft"> + <id>20</id> + <status>DRAFT</status> + <identifier>newContentType</identifier> + <names> + <value languageCode="eng-GB">New content type</value> + </names> + <descriptions> + <value languageCode="eng-GB">This is a description</value> + </descriptions> + <creationDate>2019-02-26T09:39:58+01:00</creationDate> + <modificationDate>2019-02-26T09:39:58+01:00</modificationDate> + <Creator media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Modifier media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Groups media-type="application/vnd.ibexa.api.ContentTypeGroupRefList+xml" href="/api/ibexa/v2/content/types/20/groups"/> + <Draft media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/20/draft"/> + <remoteId>remoteId-qwert548</remoteId> + <urlAliasSchema><title></urlAliasSchema> + <nameSchema><title></nameSchema> + <isContainer>true</isContainer> + <mainLanguageCode>eng-GB</mainLanguageCode> + <defaultAlwaysAvailable>true</defaultAlwaysAvailable> + <defaultSortField>PATH</defaultSortField> + <defaultSortOrder>ASC</defaultSortOrder> + <FieldDefinitions media-type="application/vnd.ibexa.api.FieldDefinitionList+xml" href="/api/ibexa/v2/content/types/20/draft/fieldDefinitions"> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/20/draft/fieldDefinitions/223"> + <id>223</id> + <identifier>title</identifier> + <fieldType>ezstring</fieldType> + <fieldGroup>content</fieldGroup> + <position>1</position> + <isTranslatable>true</isTranslatable> + <isRequired>true</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue>New Title</defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Title</value> + </names> + <descriptions> + <value languageCode="eng-GB">This is the title</value> + </descriptions> + <fieldSettings/> + <validatorConfiguration> + <value key="StringLengthValidator"> + <value key="minStringLength">0</value> + <value key="maxStringLength"/></value> + </validatorConfiguration> + </FieldDefinition> + </FieldDefinitions> +</ContentType> diff --git a/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/types/POST/ContentTypeCreate.json.example b/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/types/POST/ContentTypeCreate.json.example new file mode 100644 index 000000000..175bf7100 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/types/POST/ContentTypeCreate.json.example @@ -0,0 +1,86 @@ +{ + "ContentTypeCreate": { + "identifier": "new_content_type", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "New content type" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "This is a description" + } + ] + }, + "remoteId": "remoteId-qwerty548", + "urlAliasSchema": "<title>", + "nameSchema": "<title>", + "isContainer": true, + "mainLanguageCode": "eng-GB", + "defaultAlwaysAvailable": true, + "defaultSortField": "PATH", + "defaultSortOrder": "ASC", + "FieldDefinitions": { + "FieldDefinition": [ + { + "identifier": "title", + "fieldType": "ezstring", + "fieldGroup": "content", + "position": 1, + "isTranslatable": true, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": "New Title", + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Title" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "This is the title" + } + ] + } + }, + { + "identifier": "summary", + "fieldType": "ezrichtext", + "fieldGroup": "content", + "position": 2, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Summary" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "This is the summary" + } + ] + } + } + ] + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/types/POST/ContentTypeCreate.xml.example b/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/types/POST/ContentTypeCreate.xml.example new file mode 100644 index 000000000..261e7a475 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/types/POST/ContentTypeCreate.xml.example @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ContentTypeCreate> + <identifier>newContentType</identifier> + <names> + <value languageCode="eng-US">New content type</value> + </names> + <descriptions> + <value languageCode="eng-US">This is a description</value> + </descriptions> + <remoteId>remoteId-qwert548</remoteId> + <urlAliasSchema><title></urlAliasSchema> + <nameSchema><title></nameSchema> + <isContainer>true</isContainer> + <mainLanguageCode>eng-US</mainLanguageCode> + <defaultAlwaysAvailable>true</defaultAlwaysAvailable> + <defaultSortField>PATH</defaultSortField> + <defaultSortOrder>ASC</defaultSortOrder> + <FieldDefinitions> + <FieldDefinition> + <identifier>title</identifier> + <fieldType>ezstring</fieldType> + <fieldGroup>content</fieldGroup> + <position>1</position> + <isTranslatable>true</isTranslatable> + <isRequired>true</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue>New Title</defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-US">Title</value> + </names> + <descriptions> + <value languageCode="eng-US">This is the title</value> + </descriptions> + </FieldDefinition> + <FieldDefinition> + <identifier>summary</identifier> + <fieldType>ezxmltext</fieldType> + <fieldGroup>content</fieldGroup> + <position>2</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue> + <value key="xml"><?xml version="1.0" encoding="utf-8"?><section/></value> + </defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-US">Summary</value> + </names> + <descriptions> + <value languageCode="eng-US">This is the summary</value> + </descriptions> + </FieldDefinition> + </FieldDefinitions> +</ContentTypeCreate> diff --git a/src/bundle/Resources/api_platform/examples/content/types/GET/ContentTypeInfoList.json.example b/src/bundle/Resources/api_platform/examples/content/types/GET/ContentTypeInfoList.json.example new file mode 100644 index 000000000..31c1f62d1 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/types/GET/ContentTypeInfoList.json.example @@ -0,0 +1,733 @@ +{ + "ContentTypeList": { + "_media-type": "application/vnd.ibexa.api.ContentTypeList+json", + "_href": "/api/ibexa/v2/content/typegroups/1/types", + "ContentType": [ + { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/2", + "id": 2, + "status": "DEFINED", + "identifier": "article", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Article" + } + ] + }, + "descriptions": { + "value": [] + }, + "creationDate": "2002-06-18T09:21:38+00:00", + "modificationDate": "2004-04-20T09:56:29+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Modifier": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Groups": { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroupRefList+json", + "_href": "/api/ibexa/v2/content/types/2/groups" + }, + "Draft": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/2/draft" + }, + "remoteId": "c15b600eb9198b1924063b5a68758232", + "urlAliasSchema": null, + "nameSchema": "<short_title|title>", + "isContainer": true, + "mainLanguageCode": "eng-GB", + "defaultAlwaysAvailable": false, + "defaultSortField": "PATH", + "defaultSortOrder": "ASC", + "FieldDefinitions": { + "_media-type": "application/vnd.ibexa.api.FieldDefinitionList+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions", + "FieldDefinition": [ + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions/1", + "id": 1, + "identifier": "title", + "fieldType": "ezstring", + "fieldGroup": "", + "position": 1, + "isTranslatable": true, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": "New article", + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Title" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": 255, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions/152", + "id": 152, + "identifier": "short_title", + "fieldType": "ezstring", + "fieldGroup": "", + "position": 2, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Short title" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": 255, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions/153", + "id": 153, + "identifier": "author", + "fieldType": "ezauthor", + "fieldGroup": "", + "position": 3, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": [], + "isSearchable": false, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Author" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": { + "defaultAuthor": 1 + }, + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions/120", + "id": 120, + "identifier": "intro", + "fieldType": "ezrichtext", + "fieldGroup": "", + "position": 4, + "isTranslatable": true, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": { + "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://docbook.org/ns/docbook\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"5.0-variant ezpublish-1.0\"/>\n", + "xhtml5edit": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://ibexa.co/namespaces/ezpublish5/xhtml5/edit\"/>\n" + }, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Intro" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions/121", + "id": 121, + "identifier": "body", + "fieldType": "ezrichtext", + "fieldGroup": "", + "position": 5, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://docbook.org/ns/docbook\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"5.0-variant ezpublish-1.0\"/>\n", + "xhtml5edit": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://ibexa.co/namespaces/ezpublish5/xhtml5/edit\"/>\n" + }, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Body" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions/123", + "id": 123, + "identifier": "enable_comments", + "fieldType": "ezboolean", + "fieldGroup": "", + "position": 6, + "isTranslatable": false, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": false, + "isSearchable": false, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Enable comments" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions/154", + "id": 154, + "identifier": "image", + "fieldType": "ezobjectrelation", + "fieldGroup": "", + "position": 7, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "destinationContentId": null + }, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Image" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": { + "selectionMethod": "SELECTION_BROWSE", + "selectionRoot": "", + "selectionContentTypes": [] + }, + "validatorConfiguration": [] + } + ] + } + }, + { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/1", + "id": 1, + "status": "DEFINED", + "identifier": "folder", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Folder" + } + ] + }, + "descriptions": { + "value": [] + }, + "creationDate": "2002-06-18T09:21:38+00:00", + "modificationDate": "2015-11-29T21:14:32+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Modifier": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Groups": { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroupRefList+json", + "_href": "/api/ibexa/v2/content/types/1/groups" + }, + "Draft": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/1/draft" + }, + "remoteId": "a3d405b81be900468eb153d774f4f0d2", + "urlAliasSchema": null, + "nameSchema": "<short_name|name>", + "isContainer": true, + "mainLanguageCode": "eng-GB", + "defaultAlwaysAvailable": true, + "defaultSortField": "PATH", + "defaultSortOrder": "ASC", + "FieldDefinitions": { + "_media-type": "application/vnd.ibexa.api.FieldDefinitionList+json", + "_href": "/api/ibexa/v2/content/types/1/fieldDefinitions", + "FieldDefinition": [ + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/1/fieldDefinitions/4", + "id": 4, + "identifier": "name", + "fieldType": "ezstring", + "fieldGroup": "", + "position": 1, + "isTranslatable": true, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": "Folder", + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Name" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": 255, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/1/fieldDefinitions/155", + "id": 155, + "identifier": "short_name", + "fieldType": "ezstring", + "fieldGroup": "", + "position": 2, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Short name" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": 100, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/1/fieldDefinitions/119", + "id": 119, + "identifier": "short_description", + "fieldType": "ezrichtext", + "fieldGroup": "", + "position": 3, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://docbook.org/ns/docbook\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"5.0-variant ezpublish-1.0\"/>\n", + "xhtml5edit": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://ibexa.co/namespaces/ezpublish5/xhtml5/edit\"/>\n" + }, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Short description" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/1/fieldDefinitions/156", + "id": 156, + "identifier": "description", + "fieldType": "ezrichtext", + "fieldGroup": "", + "position": 4, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://docbook.org/ns/docbook\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"5.0-variant ezpublish-1.0\"/>\n", + "xhtml5edit": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://ibexa.co/namespaces/ezpublish5/xhtml5/edit\"/>\n" + }, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Description" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": [] + } + ] + } + }, + { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/43", + "id": 43, + "status": "DEFINED", + "identifier": "form", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Form" + } + ] + }, + "descriptions": { + "value": [] + }, + "creationDate": "2018-09-17T06:46:13+00:00", + "modificationDate": "2018-09-17T06:47:14+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Modifier": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Groups": { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroupRefList+json", + "_href": "/api/ibexa/v2/content/types/43/groups" + }, + "Draft": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/43/draft" + }, + "remoteId": "6f7f21df775a33c1e4bbc76b48c38476", + "urlAliasSchema": "", + "nameSchema": "<title>", + "isContainer": false, + "mainLanguageCode": "eng-GB", + "defaultAlwaysAvailable": true, + "defaultSortField": "PUBLISHED", + "defaultSortOrder": "DESC", + "FieldDefinitions": { + "_media-type": "application/vnd.ibexa.api.FieldDefinitionList+json", + "_href": "/api/ibexa/v2/content/types/43/fieldDefinitions", + "FieldDefinition": [ + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/43/fieldDefinitions/188", + "id": 188, + "identifier": "title", + "fieldType": "ezstring", + "fieldGroup": "content", + "position": 1, + "isTranslatable": true, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Title" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": null, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/43/fieldDefinitions/189", + "id": 189, + "identifier": "form", + "fieldType": "ezform", + "fieldGroup": "content", + "position": 2, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "fields": [], + "content_id": null, + "content_field_id": null, + "language_code": null + }, + "isSearchable": false, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Form" + } + ] + }, + "descriptions": { + "value": [] + }, + "fieldSettings": [], + "validatorConfiguration": [] + } + ] + } + }, + { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/42", + "id": 42, + "status": "DEFINED", + "identifier": "landing_page", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Landing page" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "" + } + ] + }, + "creationDate": "2015-07-03T12:00:26+00:00", + "modificationDate": "2015-07-03T12:00:26+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Modifier": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Groups": { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroupRefList+json", + "_href": "/api/ibexa/v2/content/types/42/groups" + }, + "Draft": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/42/draft" + }, + "remoteId": "60c03e9758465eb69d56b3afb6adf18e", + "urlAliasSchema": "", + "nameSchema": "<name>", + "isContainer": true, + "mainLanguageCode": "eng-GB", + "defaultAlwaysAvailable": true, + "defaultSortField": "PUBLISHED", + "defaultSortOrder": "DESC", + "FieldDefinitions": { + "_media-type": "application/vnd.ibexa.api.FieldDefinitionList+json", + "_href": "/api/ibexa/v2/content/types/42/fieldDefinitions", + "FieldDefinition": [ + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/42/fieldDefinitions/185", + "id": 185, + "identifier": "name", + "fieldType": "ezstring", + "fieldGroup": "content", + "position": 10, + "isTranslatable": true, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Title" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Title" + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": null, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/42/fieldDefinitions/186", + "id": 186, + "identifier": "description", + "fieldType": "ezstring", + "fieldGroup": "content", + "position": 20, + "isTranslatable": true, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Description" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Landing page description" + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": null, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/42/fieldDefinitions/187", + "id": 187, + "identifier": "page", + "fieldType": "ezlandingpage", + "fieldGroup": "content", + "position": 30, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "layout": "default", + "zones": [ + { + "id": "default_id", + "name": "default", + "blocks": [] + } + ] + }, + "isSearchable": false, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Landing page" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Landing page" + } + ] + }, + "fieldSettings": { + "availableBlocks": null, + "availableLayouts": null, + "editorMode": "page_view_mode" + }, + "validatorConfiguration": [] + } + ] + } + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/types/GET/ContentTypeInfoList.xml.example b/src/bundle/Resources/api_platform/examples/content/types/GET/ContentTypeInfoList.xml.example new file mode 100644 index 000000000..918783beb --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/types/GET/ContentTypeInfoList.xml.example @@ -0,0 +1,480 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ContentTypeList media-type="application/vnd.ibexa.api.ContentTypeList+xml" href="/api/ibexa/v2/content/typegroups/1/types"> + <ContentType media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/2"> + <id>2</id> + <status>DEFINED</status> + <identifier>article</identifier> + <names> + <value languageCode="eng-GB">Article</value> + </names> + <descriptions/> + <creationDate>2002-06-18T09:21:38+00:00</creationDate> + <modificationDate>2004-04-20T09:56:29+00:00</modificationDate> + <Creator media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Modifier media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Groups media-type="application/vnd.ibexa.api.ContentTypeGroupRefList+xml" href="/api/ibexa/v2/content/types/2/groups"/> + <Draft media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/2/draft"/> + <remoteId>c15b600eb9198b1924063b5a68758232</remoteId> + <urlAliasSchema></urlAliasSchema> + <nameSchema><short_title|title></nameSchema> + <isContainer>true</isContainer> + <mainLanguageCode>eng-GB</mainLanguageCode> + <defaultAlwaysAvailable>false</defaultAlwaysAvailable> + <defaultSortField>PATH</defaultSortField> + <defaultSortOrder>ASC</defaultSortOrder> + <FieldDefinitions media-type="application/vnd.ibexa.api.FieldDefinitionList+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions"> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions/1"> + <id>1</id> + <identifier>title</identifier> + <fieldType>ezstring</fieldType> + <fieldGroup></fieldGroup> + <position>1</position> + <isTranslatable>true</isTranslatable> + <isRequired>true</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue>New article</defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Title</value> + </names> + <descriptions/> + <fieldSettings/> + <validatorConfiguration> + <value key="StringLengthValidator"> + <value key="maxStringLength">255</value> + <value key="minStringLength"/></value> + </validatorConfiguration> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions/152"> + <id>152</id> + <identifier>short_title</identifier> + <fieldType>ezstring</fieldType> + <fieldGroup></fieldGroup> + <position>2</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue/> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Short title</value> + </names> + <descriptions/> + <fieldSettings/> + <validatorConfiguration> + <value key="StringLengthValidator"> + <value key="maxStringLength">255</value> + <value key="minStringLength"/></value> + </validatorConfiguration> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions/153"> + <id>153</id> + <identifier>author</identifier> + <fieldType>ezauthor</fieldType> + <fieldGroup></fieldGroup> + <position>3</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue/> + <isSearchable>false</isSearchable> + <names> + <value languageCode="eng-GB">Author</value> + </names> + <descriptions/> + <fieldSettings> + <value key="defaultAuthor">1</value> + </fieldSettings> + <validatorConfiguration/> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions/120"> + <id>120</id> + <identifier>intro</identifier> + <fieldType>ezrichtext</fieldType> + <fieldGroup></fieldGroup> + <position>4</position> + <isTranslatable>true</isTranslatable> + <isRequired>true</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue> + <value key="xml"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0-variant ezpublish-1.0"/> +</value> + <value key="xhtml5edit"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"/> +</value> + </defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Intro</value> + </names> + <descriptions/> + <fieldSettings/> + <validatorConfiguration/> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions/121"> + <id>121</id> + <identifier>body</identifier> + <fieldType>ezrichtext</fieldType> + <fieldGroup></fieldGroup> + <position>5</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue> + <value key="xml"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0-variant ezpublish-1.0"/> +</value> + <value key="xhtml5edit"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"/> +</value> + </defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Body</value> + </names> + <descriptions/> + <fieldSettings/> + <validatorConfiguration/> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions/123"> + <id>123</id> + <identifier>enable_comments</identifier> + <fieldType>ezboolean</fieldType> + <fieldGroup></fieldGroup> + <position>6</position> + <isTranslatable>false</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue>false</defaultValue> + <isSearchable>false</isSearchable> + <names> + <value languageCode="eng-GB">Enable comments</value> + </names> + <descriptions/> + <fieldSettings/> + <validatorConfiguration/> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions/154"> + <id>154</id> + <identifier>image</identifier> + <fieldType>ezobjectrelation</fieldType> + <fieldGroup></fieldGroup> + <position>7</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue> + <value key="destinationContentId"/> + </defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Image</value> + </names> + <descriptions/> + <fieldSettings> + <value key="selectionMethod">SELECTION_BROWSE</value> + <value key="selectionRoot"></value> + <value key="selectionContentTypes"/> + </fieldSettings> + <validatorConfiguration/> + </FieldDefinition> + </FieldDefinitions> + </ContentType> + <ContentType media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/1"> + <id>1</id> + <status>DEFINED</status> + <identifier>folder</identifier> + <names> + <value languageCode="eng-GB">Folder</value> + </names> + <descriptions/> + <creationDate>2002-06-18T09:21:38+00:00</creationDate> + <modificationDate>2015-11-29T21:14:32+00:00</modificationDate> + <Creator media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Modifier media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Groups media-type="application/vnd.ibexa.api.ContentTypeGroupRefList+xml" href="/api/ibexa/v2/content/types/1/groups"/> + <Draft media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/1/draft"/> + <remoteId>a3d405b81be900468eb153d774f4f0d2</remoteId> + <urlAliasSchema></urlAliasSchema> + <nameSchema><short_name|name></nameSchema> + <isContainer>true</isContainer> + <mainLanguageCode>eng-GB</mainLanguageCode> + <defaultAlwaysAvailable>true</defaultAlwaysAvailable> + <defaultSortField>PATH</defaultSortField> + <defaultSortOrder>ASC</defaultSortOrder> + <FieldDefinitions media-type="application/vnd.ibexa.api.FieldDefinitionList+xml" href="/api/ibexa/v2/content/types/1/fieldDefinitions"> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/1/fieldDefinitions/4"> + <id>4</id> + <identifier>name</identifier> + <fieldType>ezstring</fieldType> + <fieldGroup></fieldGroup> + <position>1</position> + <isTranslatable>true</isTranslatable> + <isRequired>true</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue>Folder</defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Name</value> + </names> + <descriptions/> + <fieldSettings/> + <validatorConfiguration> + <value key="StringLengthValidator"> + <value key="maxStringLength">255</value> + <value key="minStringLength"/></value> + </validatorConfiguration> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/1/fieldDefinitions/155"> + <id>155</id> + <identifier>short_name</identifier> + <fieldType>ezstring</fieldType> + <fieldGroup></fieldGroup> + <position>2</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue/> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Short name</value> + </names> + <descriptions/> + <fieldSettings/> + <validatorConfiguration> + <value key="StringLengthValidator"> + <value key="maxStringLength">100</value> + <value key="minStringLength"/></value> + </validatorConfiguration> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/1/fieldDefinitions/119"> + <id>119</id> + <identifier>short_description</identifier> + <fieldType>ezrichtext</fieldType> + <fieldGroup></fieldGroup> + <position>3</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue> + <value key="xml"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0-variant ezpublish-1.0"/> +</value> + <value key="xhtml5edit"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"/> +</value> + </defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Short description</value> + </names> + <descriptions/> + <fieldSettings/> + <validatorConfiguration/> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/1/fieldDefinitions/156"> + <id>156</id> + <identifier>description</identifier> + <fieldType>ezrichtext</fieldType> + <fieldGroup></fieldGroup> + <position>4</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue> + <value key="xml"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0-variant ezpublish-1.0"/> +</value> + <value key="xhtml5edit"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"/> +</value> + </defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Description</value> + </names> + <descriptions/> + <fieldSettings/> + <validatorConfiguration/> + </FieldDefinition> + </FieldDefinitions> + </ContentType> + <ContentType media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/43"> + <id>43</id> + <status>DEFINED</status> + <identifier>form</identifier> + <names> + <value languageCode="eng-GB">Form</value> + </names> + <descriptions/> + <creationDate>2018-09-17T06:46:13+00:00</creationDate> + <modificationDate>2018-09-17T06:47:14+00:00</modificationDate> + <Creator media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Modifier media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Groups media-type="application/vnd.ibexa.api.ContentTypeGroupRefList+xml" href="/api/ibexa/v2/content/types/43/groups"/> + <Draft media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/43/draft"/> + <remoteId>6f7f21df775a33c1e4bbc76b48c38476</remoteId> + <urlAliasSchema></urlAliasSchema> + <nameSchema><title></nameSchema> + <isContainer>false</isContainer> + <mainLanguageCode>eng-GB</mainLanguageCode> + <defaultAlwaysAvailable>true</defaultAlwaysAvailable> + <defaultSortField>PUBLISHED</defaultSortField> + <defaultSortOrder>DESC</defaultSortOrder> + <FieldDefinitions media-type="application/vnd.ibexa.api.FieldDefinitionList+xml" href="/api/ibexa/v2/content/types/43/fieldDefinitions"> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/43/fieldDefinitions/188"> + <id>188</id> + <identifier>title</identifier> + <fieldType>ezstring</fieldType> + <fieldGroup>content</fieldGroup> + <position>1</position> + <isTranslatable>true</isTranslatable> + <isRequired>true</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue/> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Title</value> + </names> + <descriptions/> + <fieldSettings/> + <validatorConfiguration> + <value key="StringLengthValidator"> + <value key="maxStringLength"/> + <value key="minStringLength"/></value> + </validatorConfiguration> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/43/fieldDefinitions/189"> + <id>189</id> + <identifier>form</identifier> + <fieldType>ezform</fieldType> + <fieldGroup>content</fieldGroup> + <position>2</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue> + <value key="fields"/> + <value key="content_id"/> + <value key="content_field_id"/> + <value key="language_code"/> + </defaultValue> + <isSearchable>false</isSearchable> + <names> + <value languageCode="eng-GB">Form</value> + </names> + <descriptions/> + <fieldSettings/> + <validatorConfiguration/> + </FieldDefinition> + </FieldDefinitions> + </ContentType> + <ContentType media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/42"> + <id>42</id> + <status>DEFINED</status> + <identifier>landing_page</identifier> + <names> + <value languageCode="eng-GB">Landing page</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <creationDate>2015-07-03T12:00:26+00:00</creationDate> + <modificationDate>2015-07-03T12:00:26+00:00</modificationDate> + <Creator media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Modifier media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Groups media-type="application/vnd.ibexa.api.ContentTypeGroupRefList+xml" href="/api/ibexa/v2/content/types/42/groups"/> + <Draft media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/42/draft"/> + <remoteId>60c03e9758465eb69d56b3afb6adf18e</remoteId> + <urlAliasSchema></urlAliasSchema> + <nameSchema><name></nameSchema> + <isContainer>true</isContainer> + <mainLanguageCode>eng-GB</mainLanguageCode> + <defaultAlwaysAvailable>true</defaultAlwaysAvailable> + <defaultSortField>PUBLISHED</defaultSortField> + <defaultSortOrder>DESC</defaultSortOrder> + <FieldDefinitions media-type="application/vnd.ibexa.api.FieldDefinitionList+xml" href="/api/ibexa/v2/content/types/42/fieldDefinitions"> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/42/fieldDefinitions/185"> + <id>185</id> + <identifier>name</identifier> + <fieldType>ezstring</fieldType> + <fieldGroup>content</fieldGroup> + <position>10</position> + <isTranslatable>true</isTranslatable> + <isRequired>true</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue/> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Title</value> + </names> + <descriptions> + <value languageCode="eng-GB">Title</value> + </descriptions> + <fieldSettings/> + <validatorConfiguration> + <value key="StringLengthValidator"> + <value key="maxStringLength"/> + <value key="minStringLength"/></value> + </validatorConfiguration> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/42/fieldDefinitions/186"> + <id>186</id> + <identifier>description</identifier> + <fieldType>ezstring</fieldType> + <fieldGroup>content</fieldGroup> + <position>20</position> + <isTranslatable>true</isTranslatable> + <isRequired>true</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue/> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Description</value> + </names> + <descriptions> + <value languageCode="eng-GB">Landing page description</value> + </descriptions> + <fieldSettings/> + <validatorConfiguration> + <value key="StringLengthValidator"> + <value key="maxStringLength"/> + <value key="minStringLength"/></value> + </validatorConfiguration> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/42/fieldDefinitions/187"> + <id>187</id> + <identifier>page</identifier> + <fieldType>ezlandingpage</fieldType> + <fieldGroup>content</fieldGroup> + <position>30</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue> + <value key="layout">default</value> + <value key="zones"> + <value> + <value key="id">default_id</value> + <value key="name">default</value> + <value key="blocks"/></value> + </value> + </defaultValue> + <isSearchable>false</isSearchable> + <names> + <value languageCode="eng-GB">Landing page</value> + </names> + <descriptions> + <value languageCode="eng-GB">Landing page</value> + </descriptions> + <fieldSettings> + <value key="availableBlocks"/> + <value key="availableLayouts"/> + <value key="editorMode">page_view_mode</value> + </fieldSettings> + <validatorConfiguration/> + </FieldDefinition> + </FieldDefinitions> + </ContentType> +</ContentTypeList> diff --git a/src/bundle/Resources/api_platform/examples/content/types/content_type_id/GET/ContentType.json.example b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/GET/ContentType.json.example new file mode 100644 index 000000000..67593935b --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/GET/ContentType.json.example @@ -0,0 +1,303 @@ +{ + "ContentType": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/2", + "id": 2, + "status": "DEFINED", + "identifier": "article", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Article" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "creationDate": "2002-06-18T09:21:38+00:00", + "modificationDate": "2021-06-28T11:31:22+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Modifier": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Groups": { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroupRefList+json", + "_href": "/api/ibexa/v2/content/types/2/groups" + }, + "Draft": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/2/draft" + }, + "remoteId": "c15b600eb9198b1924063b5a68758232", + "urlAliasSchema": "", + "nameSchema": "<short_title|title>", + "isContainer": true, + "mainLanguageCode": "eng-GB", + "defaultAlwaysAvailable": false, + "defaultSortField": "PATH", + "defaultSortOrder": "ASC", + "FieldDefinitions": { + "_media-type": "application/vnd.ibexa.api.FieldDefinitionList+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions", + "FieldDefinition": [ + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions/1", + "id": 1, + "identifier": "title", + "fieldType": "ezstring", + "fieldGroup": "", + "position": 1, + "isTranslatable": true, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": "New article", + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Title" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": 255, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions/152", + "id": 152, + "identifier": "short_title", + "fieldType": "ezstring", + "fieldGroup": "", + "position": 2, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": null, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Short title" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": { + "StringLengthValidator": { + "maxStringLength": 255, + "minStringLength": null + } + } + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions/153", + "id": 153, + "identifier": "author", + "fieldType": "ezauthor", + "fieldGroup": "", + "position": 3, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": [], + "isSearchable": false, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Author" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": { + "defaultAuthor": 1 + }, + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions/120", + "id": 120, + "identifier": "intro", + "fieldType": "ezrichtext", + "fieldGroup": "", + "position": 4, + "isTranslatable": true, + "isRequired": true, + "isInfoCollector": false, + "defaultValue": { + "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://docbook.org/ns/docbook\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"5.0-variant ezpublish-1.0\"/>\n", + "xhtml5edit": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://ibexa.co/namespaces/ezpublish5/xhtml5/edit\"/>\n" + }, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Intro" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions/121", + "id": 121, + "identifier": "body", + "fieldType": "ezrichtext", + "fieldGroup": "", + "position": 5, + "isTranslatable": true, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "xml": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://docbook.org/ns/docbook\" xmlns:xlink=\"http://www.w3.org/1999/xlink\" version=\"5.0-variant ezpublish-1.0\"/>\n", + "xhtml5edit": "<?xml version=\"1.0\" encoding=\"UTF-8\"?>\n<section xmlns=\"http://ibexa.co/namespaces/ezpublish5/xhtml5/edit\"/>\n" + }, + "isSearchable": true, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Body" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions/123", + "id": 123, + "identifier": "enable_comments", + "fieldType": "ezboolean", + "fieldGroup": "", + "position": 6, + "isTranslatable": false, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": false, + "isSearchable": false, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Enable comments" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": [] + }, + { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions/195", + "id": 195, + "identifier": "image", + "fieldType": "ezimageasset", + "fieldGroup": "content", + "position": 7, + "isTranslatable": false, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "destinationContentId": null, + "alternativeText": null, + "source": null + }, + "isSearchable": false, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Image" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": [] + } + ] + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/types/content_type_id/GET/ContentType.xml.example b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/GET/ContentType.xml.example new file mode 100644 index 000000000..59ea81432 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/GET/ContentType.xml.example @@ -0,0 +1,182 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ContentType media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/2"> + <id>2</id> + <status>DEFINED</status> + <identifier>article</identifier> + <names> + <value languageCode="eng-GB">Article</value> + </names> + <descriptions/> + <creationDate>2002-06-18T11:21:38+02:00</creationDate> + <modificationDate>2004-04-20T11:56:29+02:00</modificationDate> + <Creator media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Modifier media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Groups media-type="application/vnd.ibexa.api.ContentTypeGroupRefList+xml" href="/api/ibexa/v2/content/types/2/groups"/> + <Draft media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/2/draft"/> + <remoteId>c15b600eb9198b1924063b5a68758232</remoteId> + <urlAliasSchema></urlAliasSchema> + <nameSchema><short_title|title></nameSchema> + <isContainer>true</isContainer> + <mainLanguageCode>eng-GB</mainLanguageCode> + <defaultAlwaysAvailable>false</defaultAlwaysAvailable> + <defaultSortField>PATH</defaultSortField> + <defaultSortOrder>ASC</defaultSortOrder> + <FieldDefinitions media-type="application/vnd.ibexa.api.FieldDefinitionList+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions"> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions/1"> + <id>1</id> + <identifier>title</identifier> + <fieldType>ezstring</fieldType> + <fieldGroup></fieldGroup> + <position>1</position> + <isTranslatable>true</isTranslatable> + <isRequired>true</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue>New article</defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Title</value> + </names> + <descriptions/> + <fieldSettings/> + <validatorConfiguration> + <value key="StringLengthValidator"> + <value key="maxStringLength">255</value> + <value key="minStringLength"/></value> + </validatorConfiguration> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions/152"> + <id>152</id> + <identifier>short_title</identifier> + <fieldType>ezstring</fieldType> + <fieldGroup></fieldGroup> + <position>2</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue/> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Short title</value> + </names> + <descriptions/> + <fieldSettings/> + <validatorConfiguration> + <value key="StringLengthValidator"> + <value key="maxStringLength">255</value> + <value key="minStringLength"/></value> + </validatorConfiguration> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions/153"> + <id>153</id> + <identifier>author</identifier> + <fieldType>ezauthor</fieldType> + <fieldGroup></fieldGroup> + <position>3</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue/> + <isSearchable>false</isSearchable> + <names> + <value languageCode="eng-GB">Author</value> + </names> + <descriptions/> + <fieldSettings> + <value key="defaultAuthor">1</value> + </fieldSettings> + <validatorConfiguration/> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions/120"> + <id>120</id> + <identifier>intro</identifier> + <fieldType>ezrichtext</fieldType> + <fieldGroup></fieldGroup> + <position>4</position> + <isTranslatable>true</isTranslatable> + <isRequired>true</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue> + <value key="xml"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0-variant ezpublish-1.0"/> +</value> + <value key="xhtml5edit"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"/> +</value> + </defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Intro</value> + </names> + <descriptions/> + <fieldSettings/> + <validatorConfiguration/> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions/121"> + <id>121</id> + <identifier>body</identifier> + <fieldType>ezrichtext</fieldType> + <fieldGroup></fieldGroup> + <position>5</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue> + <value key="xml"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://docbook.org/ns/docbook" xmlns:xlink="http://www.w3.org/1999/xlink" version="5.0-variant ezpublish-1.0"/> +</value> + <value key="xhtml5edit"><?xml version="1.0" encoding="UTF-8"?> +<section xmlns="http://ibexa.co/namespaces/ezpublish5/xhtml5/edit"/> +</value> + </defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Body</value> + </names> + <descriptions/> + <fieldSettings/> + <validatorConfiguration/> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions/123"> + <id>123</id> + <identifier>enable_comments</identifier> + <fieldType>ezboolean</fieldType> + <fieldGroup></fieldGroup> + <position>6</position> + <isTranslatable>false</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue>false</defaultValue> + <isSearchable>false</isSearchable> + <names> + <value languageCode="eng-GB">Enable comments</value> + </names> + <descriptions/> + <fieldSettings/> + <validatorConfiguration/> + </FieldDefinition> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions/154"> + <id>154</id> + <identifier>image</identifier> + <fieldType>ezobjectrelation</fieldType> + <fieldGroup></fieldGroup> + <position>7</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue> + <value key="destinationContentId"/> + </defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Image</value> + </names> + <descriptions/> + <fieldSettings> + <value key="selectionMethod">SELECTION_BROWSE</value> + <value key="selectionRoot"></value> + <value key="selectionContentTypes"/> + </fieldSettings> + <validatorConfiguration/> + </FieldDefinition> + </FieldDefinitions> +</ContentType> diff --git a/src/bundle/Resources/api_platform/examples/content/types/content_type_id/POST/ContentTypeInfo.json.example b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/POST/ContentTypeInfo.json.example new file mode 100644 index 000000000..6abf1d5bd --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/POST/ContentTypeInfo.json.example @@ -0,0 +1,46 @@ +{ + "ContentTypeInfo": { + "_media-type": "application/vnd.ibexa.api.ContentTypeInfo+json", + "_href": "/api/ibexa/v2/content/types/1/draft", + "id": 1, + "status": "DRAFT", + "identifier": "folder", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Folder" + } + ] + }, + "descriptions": { + "value": [] + }, + "creationDate": "2002-06-18T09:21:38+00:00", + "modificationDate": "2021-08-11T11:17:58+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Modifier": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Groups": { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroupRefList+json", + "_href": "/api/ibexa/v2/content/types/1/groups" + }, + "Draft": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/1/draft" + }, + "remoteId": "a3d405b81be900468eb153d774f4f0d2", + "urlAliasSchema": null, + "nameSchema": "<short_name|name>", + "isContainer": true, + "mainLanguageCode": "eng-GB", + "defaultAlwaysAvailable": true, + "defaultSortField": "PATH", + "defaultSortOrder": "ASC" + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/types/content_type_id/POST/ContentTypeInfo.xml.example b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/POST/ContentTypeInfo.xml.example new file mode 100644 index 000000000..ce2a73a08 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/POST/ContentTypeInfo.xml.example @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ContentTypeInfo media-type="application/vnd.ibexa.api.ContentTypeInfo+xml" href="/api/ibexa/v2/content/types/3/draft"> + <id>3</id> + <status>DRAFT</status> + <identifier>user_group</identifier> + <names> + <value languageCode="eng-GB">User group</value> + </names> + <descriptions/> + <creationDate>2002-06-18T11:21:38+02:00</creationDate> + <modificationDate>2019-02-25T14:41:53+01:00</modificationDate> + <Creator media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Modifier media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Groups media-type="application/vnd.ibexa.api.ContentTypeGroupRefList+xml" href="/api/ibexa/v2/content/types/3/groups"/> + <Draft media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/3/draft"/> + <remoteId>25b4268cdcd01921b808a0d854b877ef</remoteId> + <urlAliasSchema></urlAliasSchema> + <nameSchema><name></nameSchema> + <isContainer>true</isContainer> + <mainLanguageCode>eng-GB</mainLanguageCode> + <defaultAlwaysAvailable>true</defaultAlwaysAvailable> + <defaultSortField>PATH</defaultSortField> + <defaultSortOrder>ASC</defaultSortOrder> +</ContentTypeInfo> diff --git a/src/bundle/Resources/api_platform/examples/content/types/content_type_id/POST/ContentTypeUpdate.json.example b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/POST/ContentTypeUpdate.json.example new file mode 100644 index 000000000..bd7dd507e --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/POST/ContentTypeUpdate.json.example @@ -0,0 +1,6 @@ +{ + "ContentTypeUpdate": { + "_media-type": "application/vnd.ibexa.api.ContentTypeUpdate", + "defaultAlwaysAvailable": "true" + } +} \ No newline at end of file diff --git a/src/bundle/Resources/api_platform/examples/content/types/content_type_id/POST/ContentTypeUpdate.xml.example b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/POST/ContentTypeUpdate.xml.example new file mode 100644 index 000000000..9e9d31ba7 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/POST/ContentTypeUpdate.xml.example @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ContentTypeUpdate> + <defaultAlwaysAvailable>true</defaultAlwaysAvailable> +</ContentTypeUpdate> diff --git a/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/PATCH/ContentTypeInfo.json.example b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/PATCH/ContentTypeInfo.json.example new file mode 100644 index 000000000..6b12d0c7b --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/PATCH/ContentTypeInfo.json.example @@ -0,0 +1,51 @@ +{ + "ContentTypeInfo": { + "_media-type": "application/vnd.ibexa.api.ContentTypeInfo+json", + "_href": "/api/ibexa/v2/content/types/2/draft", + "id": 2, + "status": "DRAFT", + "identifier": "article", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Updated content type name" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "This is an updated content type description" + } + ] + }, + "creationDate": "2002-06-18T09:21:38+00:00", + "modificationDate": "2021-08-11T11:58:24+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Modifier": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "Groups": { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroupRefList+json", + "_href": "/api/ibexa/v2/content/types/2/groups" + }, + "Draft": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/2/draft" + }, + "remoteId": "c15b600eb9198b1924063b5a68758232", + "urlAliasSchema": null, + "nameSchema": "<short_title|title>", + "isContainer": true, + "mainLanguageCode": "eng-GB", + "defaultAlwaysAvailable": true, + "defaultSortField": "PATH", + "defaultSortOrder": "ASC" + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/PATCH/ContentTypeInfo.xml.example b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/PATCH/ContentTypeInfo.xml.example new file mode 100644 index 000000000..a96fbd1d8 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/PATCH/ContentTypeInfo.xml.example @@ -0,0 +1,26 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ContentTypeInfo media-type="application/vnd.ibexa.api.ContentTypeInfo+xml" href="/api/ibexa/v2/content/types/14/draft"> + <id>14</id> + <status>DRAFT</status> + <identifier>new_content_type</identifier> + <names> + <value languageCode="eng-GB">Updated content type name</value> + </names> + <descriptions> + <value languageCode="eng-GB">This is an updated content type description</value> + </descriptions> + <creationDate>2019-02-06T10:56:36+01:00</creationDate> + <modificationDate>2019-02-25T12:15:51+01:00</modificationDate> + <Creator media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Modifier media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Groups media-type="application/vnd.ibexa.api.ContentTypeGroupRefList+xml" href="/api/ibexa/v2/content/types/14/groups"/> + <Draft media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/14/draft"/> + <remoteId>d7ae816f22fe929e67a359a2ef6e7cde</remoteId> + <urlAliasSchema></urlAliasSchema> + <nameSchema><short_title|title></nameSchema> + <isContainer>true</isContainer> + <mainLanguageCode>eng-GB</mainLanguageCode> + <defaultAlwaysAvailable>false</defaultAlwaysAvailable> + <defaultSortField>PATH</defaultSortField> + <defaultSortOrder>ASC</defaultSortOrder> +</ContentTypeInfo> diff --git a/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/PATCH/ContentTypeUpdate.json.example b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/PATCH/ContentTypeUpdate.json.example new file mode 100644 index 000000000..8e9377267 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/PATCH/ContentTypeUpdate.json.example @@ -0,0 +1,21 @@ +{ + "ContentTypeUpdate": { + "_media-type": "application/vnd.ibexa.api.ContentTypeUpdate", + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Updated content type name" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "This is an updated content type description" + } + ] + } + } +} \ No newline at end of file diff --git a/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/PATCH/ContentTypeUpdate.xml.example b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/PATCH/ContentTypeUpdate.xml.example new file mode 100644 index 000000000..675fdf951 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/PATCH/ContentTypeUpdate.xml.example @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ContentTypeUpdate> + <names> + <value languageCode="eng-GB">Updated content type name</value> + </names> + <descriptions> + <value languageCode="eng-GB">This is an updated content type description</value> + </descriptions> +</ContentTypeUpdate> diff --git a/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/PUBLISH/ContentType.xml.example b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/PUBLISH/ContentType.xml.example new file mode 100644 index 000000000..2edf26ace --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/PUBLISH/ContentType.xml.example @@ -0,0 +1,50 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ContentType media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/14"> + <id>14</id> + <status>DEFINED</status> + <identifier>copy_of_article_14</identifier> + <names> + <value languageCode="eng-GB">Updated content type name</value> + </names> + <descriptions> + <value languageCode="eng-GB">This is an updated content type description</value> + </descriptions> + <creationDate>2019-02-06T10:56:36+01:00</creationDate> + <modificationDate>2019-02-25T12:15:51+01:00</modificationDate> + <Creator media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Modifier media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <Groups media-type="application/vnd.ibexa.api.ContentTypeGroupRefList+xml" href="/api/ibexa/v2/content/types/14/groups"/> + <Draft media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/14/draft"/> + <remoteId>d7ae816f22fe929e67a359a2ef6e7cde</remoteId> + <urlAliasSchema></urlAliasSchema> + <nameSchema><short_title|title></nameSchema> + <isContainer>true</isContainer> + <mainLanguageCode>eng-GB</mainLanguageCode> + <defaultAlwaysAvailable>false</defaultAlwaysAvailable> + <defaultSortField>PATH</defaultSortField> + <defaultSortOrder>ASC</defaultSortOrder> + <FieldDefinitions media-type="application/vnd.ibexa.api.FieldDefinitionList+xml" href="/api/ibexa/v2/content/types/14/fieldDefinitions"> + <FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/14/fieldDefinitions/188"> + <id>188</id> + <identifier>title</identifier> + <fieldType>ezstring</fieldType> + <fieldGroup></fieldGroup> + <position>1</position> + <isTranslatable>true</isTranslatable> + <isRequired>true</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue>New article</defaultValue> + <isSearchable>true</isSearchable> + <names> + <value languageCode="eng-GB">Title</value> + </names> + <descriptions/> + <fieldSettings/> + <validatorConfiguration> + <value key="StringLengthValidator"> + <value key="maxStringLength">255</value> + <value key="minStringLength"/></value> + </validatorConfiguration> + </FieldDefinition> + </FieldDefinitions> +</ContentType> diff --git a/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/field_definitions/POST/FieldDefinition.xml.example b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/field_definitions/POST/FieldDefinition.xml.example new file mode 100644 index 000000000..e994eb0f5 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/field_definitions/POST/FieldDefinition.xml.example @@ -0,0 +1,22 @@ +<?xml version="1.0" encoding="UTF-8"?> +<FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/14/draft/fieldDefinitions/221"> + <id>221</id> + <identifier>name2</identifier> + <fieldType>ezstring</fieldType> + <fieldGroup></fieldGroup> + <position>0</position> + <isTranslatable>true</isTranslatable> + <isRequired>true</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue/> + <isSearchable>true</isSearchable> + <names/> + <descriptions/> + <fieldSettings/> + <validatorConfiguration> + <value key="StringLengthValidator"> + <value key="maxStringLength">32</value> + <value key="minStringLength">8</value> + </value> + </validatorConfiguration> +</FieldDefinition> diff --git a/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/field_definitions/POST/FieldDefinitionCreate.xml.example b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/field_definitions/POST/FieldDefinitionCreate.xml.example new file mode 100644 index 000000000..3282099a8 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/field_definitions/POST/FieldDefinitionCreate.xml.example @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<FieldDefinitionCreate> + <identifier>name</identifier> + <fieldType>ezstring</fieldType> + <isRequired>true</isRequired> + <validatorConfiguration> + <value key="StringLengthValidator"> + <value key="maxStringLength">32</value> + <value key="minStringLength">8</value> + </value> +</validatorConfiguration> +</FieldDefinitionCreate> diff --git a/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/field_definitions/field_definition_id/GET/FieldDefinition.json.example b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/field_definitions/field_definition_id/GET/FieldDefinition.json.example new file mode 100644 index 000000000..df7975cd9 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/field_definitions/field_definition_id/GET/FieldDefinition.json.example @@ -0,0 +1,38 @@ +{ + "FieldDefinition": { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions/195", + "id": 195, + "identifier": "image", + "fieldType": "ezimageasset", + "fieldGroup": "content", + "position": 7, + "isTranslatable": false, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "destinationContentId": null, + "alternativeText": null, + "source": null + }, + "isSearchable": false, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Image" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": [] + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/field_definitions/field_definition_id/GET/FieldDefinition.xml.example b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/field_definitions/field_definition_id/GET/FieldDefinition.xml.example new file mode 100644 index 000000000..f61269499 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/field_definitions/field_definition_id/GET/FieldDefinition.xml.example @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions/195"> + <id>195</id> + <identifier>image</identifier> + <fieldType>ezimageasset</fieldType> + <fieldGroup>content</fieldGroup> + <position>7</position> + <isTranslatable>false</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue> + <value key="destinationContentId"/> + <value key="alternativeText"/> + <value key="source"/> + </defaultValue> + <isSearchable>false</isSearchable> + <names> + <value languageCode="eng-GB">Image</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <fieldSettings/> + <validatorConfiguration/> +</FieldDefinition> diff --git a/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/field_definitions/field_definition_id/PATCH/FieldDefinition.xml.example b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/field_definitions/field_definition_id/PATCH/FieldDefinition.xml.example new file mode 100644 index 000000000..a941520fe --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/field_definitions/field_definition_id/PATCH/FieldDefinition.xml.example @@ -0,0 +1,21 @@ +<?xml version="1.0" encoding="UTF-8"?> +<FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/15/draft/fieldDefinitions/197"> + <id>197</id> + <identifier>author</identifier> + <fieldType>ezauthor</fieldType> + <fieldGroup>new_field_group</fieldGroup> + <position>10</position> + <isTranslatable>true</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue/> + <isSearchable>false</isSearchable> + <names> + <value languageCode="eng-GB">Author</value> + </names> + <descriptions/> + <fieldSettings> + <value key="defaultAuthor">1</value> + </fieldSettings> + <validatorConfiguration/> +</FieldDefinition> diff --git a/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/field_definitions/field_definition_id/PATCH/FieldDefinitionUpdate.xml.example b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/field_definitions/field_definition_id/PATCH/FieldDefinitionUpdate.xml.example new file mode 100644 index 000000000..c1f333a86 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/draft/field_definitions/field_definition_id/PATCH/FieldDefinitionUpdate.xml.example @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<FieldDefinitionUpdate> + <fieldGroup>new_field_group</fieldGroup> + <position>10</position> +</FieldDefinitionUpdate> diff --git a/src/bundle/Resources/api_platform/examples/content/types/content_type_id/field_definition_id/GET/FieldDefinition.json.example b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/field_definition_id/GET/FieldDefinition.json.example new file mode 100644 index 000000000..df7975cd9 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/field_definition_id/GET/FieldDefinition.json.example @@ -0,0 +1,38 @@ +{ + "FieldDefinition": { + "_media-type": "application/vnd.ibexa.api.FieldDefinition+json", + "_href": "/api/ibexa/v2/content/types/2/fieldDefinitions/195", + "id": 195, + "identifier": "image", + "fieldType": "ezimageasset", + "fieldGroup": "content", + "position": 7, + "isTranslatable": false, + "isRequired": false, + "isInfoCollector": false, + "defaultValue": { + "destinationContentId": null, + "alternativeText": null, + "source": null + }, + "isSearchable": false, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Image" + } + ] + }, + "descriptions": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": null + } + ] + }, + "fieldSettings": [], + "validatorConfiguration": [] + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/types/content_type_id/field_definition_id/GET/FieldDefinition.xml.example b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/field_definition_id/GET/FieldDefinition.xml.example new file mode 100644 index 000000000..f61269499 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/field_definition_id/GET/FieldDefinition.xml.example @@ -0,0 +1,25 @@ +<?xml version="1.0" encoding="UTF-8"?> +<FieldDefinition media-type="application/vnd.ibexa.api.FieldDefinition+xml" href="/api/ibexa/v2/content/types/2/fieldDefinitions/195"> + <id>195</id> + <identifier>image</identifier> + <fieldType>ezimageasset</fieldType> + <fieldGroup>content</fieldGroup> + <position>7</position> + <isTranslatable>false</isTranslatable> + <isRequired>false</isRequired> + <isInfoCollector>false</isInfoCollector> + <defaultValue> + <value key="destinationContentId"/> + <value key="alternativeText"/> + <value key="source"/> + </defaultValue> + <isSearchable>false</isSearchable> + <names> + <value languageCode="eng-GB">Image</value> + </names> + <descriptions> + <value languageCode="eng-GB"></value> + </descriptions> + <fieldSettings/> + <validatorConfiguration/> +</FieldDefinition> diff --git a/src/bundle/Resources/api_platform/examples/content/types/content_type_id/groups/GET/ContentTypeGroupRefList.json.example b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/groups/GET/ContentTypeGroupRefList.json.example new file mode 100644 index 000000000..44c021757 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/groups/GET/ContentTypeGroupRefList.json.example @@ -0,0 +1,12 @@ +{ + "ContentTypeGroupRefList": { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroupRefList+json", + "_href": "/api/ibexa/v2/content/typegroups/2/types", + "ContentTypeGroupRef": [ + { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroup+json", + "_href": "/api/ibexa/v2/content/typegroups/1" + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/types/content_type_id/groups/GET/ContentTypeGroupRefList.xml.example b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/groups/GET/ContentTypeGroupRefList.xml.example new file mode 100644 index 000000000..5f6bef747 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/groups/GET/ContentTypeGroupRefList.xml.example @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ContentTypeGroupRefList media-type="application/vnd.ibexa.api.ContentTypeGroupRefList+xml" href="/api/ibexa/v2/content/typegroups/2/types"> + <ContentTypeGroupRef media-type="application/vnd.ibexa.api.ContentTypeGroup+xml" href="/api/ibexa/v2/content/typegroups/1"/> +</ContentTypeGroupRefList> diff --git a/src/bundle/Resources/api_platform/examples/content/types/content_type_id/groups/POST/ContentTypeGroupRefList.xml.example b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/groups/POST/ContentTypeGroupRefList.xml.example new file mode 100644 index 000000000..b14ad38b7 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/groups/POST/ContentTypeGroupRefList.xml.example @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ContentTypeGroupRefList media-type="application/vnd.ibexa.api.ContentTypeGroupRefList+xml" href="/api/ibexa/v2/content/typegroups/15/types"> + <ContentTypeGroupRef media-type="application/vnd.ibexa.api.ContentTypeGroup+xml" href="/api/ibexa/v2/content/typegroups/1"> + <unlink href="/api/ibexa/v2/content/types/15/groups/1" method="DELETE"/> + </ContentTypeGroupRef> + <ContentTypeGroupRef media-type="application/vnd.ibexa.api.ContentTypeGroup+xml" href="/api/ibexa/v2/content/typegroups/3"> + <unlink href="/api/ibexa/v2/content/types/15/groups/3" method="DELETE"/> + </ContentTypeGroupRef> + <ContentTypeGroupRef media-type="application/vnd.ibexa.api.ContentTypeGroup+xml" href="/api/ibexa/v2/content/typegroups/2"> + <unlink href="/api/ibexa/v2/content/types/15/groups/2" method="DELETE"/> + </ContentTypeGroupRef> +</ContentTypeGroupRefList> diff --git a/src/bundle/Resources/api_platform/examples/content/types/content_type_id/groups/id/DELETE/ContentTypeGroupRefList.json.example b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/groups/id/DELETE/ContentTypeGroupRefList.json.example new file mode 100644 index 000000000..74fbb967f --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/groups/id/DELETE/ContentTypeGroupRefList.json.example @@ -0,0 +1,24 @@ +{ + "ContentTypeGroupRefList": { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroupRefList+json", + "_href": "/api/ibexa/v2/content/typegroups/2/types", + "ContentTypeGroupRef": [ + { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroup+json", + "_href": "/api/ibexa/v2/content/typegroups/1", + "unlink": { + "_href": "/api/ibexa/v2/content/types/2/groups/1", + "_method": "DELETE" + } + }, + { + "_media-type": "application/vnd.ibexa.api.ContentTypeGroup+json", + "_href": "/api/ibexa/v2/content/typegroups/2", + "unlink": { + "_href": "/api/ibexa/v2/content/types/2/groups/2", + "_method": "DELETE" + } + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/types/content_type_id/groups/id/DELETE/ContentTypeGroupRefList.xml.example b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/groups/id/DELETE/ContentTypeGroupRefList.xml.example new file mode 100644 index 000000000..cd216a5ed --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/types/content_type_id/groups/id/DELETE/ContentTypeGroupRefList.xml.example @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ContentTypeGroupRefList media-type="application/vnd.ibexa.api.ContentTypeGroupRefList+xml" href="/api/ibexa/v2/content/typegroups/15/types"> + <ContentTypeGroupRef media-type="application/vnd.ibexa.api.ContentTypeGroup+xml" href="/api/ibexa/v2/content/typegroups/1"> + <unlink href="/api/ibexa/v2/content/types/15/groups/1" method="DELETE"/> + </ContentTypeGroupRef> + <ContentTypeGroupRef media-type="application/vnd.ibexa.api.ContentTypeGroup+xml" href="/api/ibexa/v2/content/typegroups/2"> + <unlink href="/api/ibexa/v2/content/types/15/groups/2" method="DELETE"/> + </ContentTypeGroupRef> +</ContentTypeGroupRefList> diff --git a/src/bundle/Resources/api_platform/examples/content/urlaliases/GET/UrlAliasRefList.json.example b/src/bundle/Resources/api_platform/examples/content/urlaliases/GET/UrlAliasRefList.json.example new file mode 100644 index 000000000..40008fd0f --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/urlaliases/GET/UrlAliasRefList.json.example @@ -0,0 +1,12 @@ +{ + "UrlAliasRefList": { + "_media-type": "application/vnd.ibexa.api.UrlAliasRefList+json", + "_href": "/api/ibexa/v2/content/urlaliases", + "UrlAlias": [ + { + "_media-type": "application/vnd.ibexa.api.UrlAlias+json", + "_href": "/api/ibexa/v2/content/urlaliases/0-2cecdff5f90b8595d76b68c417b09f36" + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/urlaliases/GET/UrlAliasRefList.xml.example b/src/bundle/Resources/api_platform/examples/content/urlaliases/GET/UrlAliasRefList.xml.example new file mode 100644 index 000000000..2c7e90a83 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/urlaliases/GET/UrlAliasRefList.xml.example @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<UrlAliasRefList media-type="application/vnd.ibexa.api.UrlAliasRefList+xml" href="/api/ibexa/v2/content/urlaliases"> + <UrlAlias media-type="application/vnd.ibexa.api.UrlAlias+xml" href="/api/ibexa/v2/content/urlaliases/0-2cecdff5f90b8595d76b68c417b09f36" /> +</UrlAliasRefList> diff --git a/src/bundle/Resources/api_platform/examples/content/urlaliases/POST/UrlAlias.json.example b/src/bundle/Resources/api_platform/examples/content/urlaliases/POST/UrlAlias.json.example new file mode 100644 index 000000000..078382871 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/urlaliases/POST/UrlAlias.json.example @@ -0,0 +1,15 @@ +{ + "UrlAlias": { + "_media-type": "application/vnd.ibexa.api.UrlAlias+json", + "_href": "/api/ibexa/v2/content/urlaliases/0-f530173ad554787c1fe30dc929d98360", + "_id": "0-f530173ad554787c1fe30dc929d98360", + "_type": "RESOURCE", + "resource": "content/view/full", + "path": "/example-global", + "languageCodes": "eng-GB", + "alwaysAvailable": true, + "isHistory": false, + "forward": true, + "custom": true + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/urlaliases/POST/UrlAlias.xml.example b/src/bundle/Resources/api_platform/examples/content/urlaliases/POST/UrlAlias.xml.example new file mode 100644 index 000000000..2eca610bc --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/urlaliases/POST/UrlAlias.xml.example @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<UrlAlias media-type="application/vnd.ibexa.api.UrlAlias+xml" href="/api/ibexa/v2/content/urlaliases/0-deca3dadca45c3dff7861274b8e67ed7" id="0-deca3dadca45c3dff7861274b8e67ed7" type="LOCATION"> + <location media-type="application/vnd.ibexa.api.Location+xml" href="/api/ibexa/v2/content/locations/59"/> + <path>/example-urlalias</path> + <languageCodes>eng-GB</languageCodes> + <alwaysAvailable>true</alwaysAvailable> + <isHistory>false</isHistory> + <forward>true</forward> + <custom>true</custom> +</UrlAlias> diff --git a/src/bundle/Resources/api_platform/examples/content/urlaliases/POST/UrlAliasCreate.json.example b/src/bundle/Resources/api_platform/examples/content/urlaliases/POST/UrlAliasCreate.json.example new file mode 100644 index 000000000..0eb520514 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/urlaliases/POST/UrlAliasCreate.json.example @@ -0,0 +1,10 @@ +{ + "UrlAliasCreate": { + "_type": "GLOBAL", + "resource": "module:content/view/full", + "path": "example-global", + "languageCode": "eng-GB", + "alwaysAvailable": "true", + "forward": "true" + } +} \ No newline at end of file diff --git a/src/bundle/Resources/api_platform/examples/content/urlaliases/POST/UrlAliasCreate.xml.example b/src/bundle/Resources/api_platform/examples/content/urlaliases/POST/UrlAliasCreate.xml.example new file mode 100644 index 000000000..218ab60ec --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/urlaliases/POST/UrlAliasCreate.xml.example @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<UrlAliasCreate type="LOCATION"> + <location href='/api/ibexa/v2/content/locations/1/2/59' /> + <path>example-global</path> + <languageCode>eng-GB</languageCode> + <alwaysAvailable>true</alwaysAvailable> + <forward>true</forward> +</UrlAliasCreate> diff --git a/src/bundle/Resources/api_platform/examples/content/urlaliases/url_alias_id/GET/UrlAlias.json.example b/src/bundle/Resources/api_platform/examples/content/urlaliases/url_alias_id/GET/UrlAlias.json.example new file mode 100644 index 000000000..9fe37c238 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/urlaliases/url_alias_id/GET/UrlAlias.json.example @@ -0,0 +1,15 @@ +{ + "UrlAlias": { + "_media-type": "application/vnd.ibexa.api.UrlAlias+json", + "_href": "/api/ibexa/v2/content/urlaliases/0-2cecdff5f90b8595d76b68c417b09f36", + "_id": "0-2cecdff5f90b8595d76b68c417b09f36", + "_type": "RESOURCE", + "resource": "content/view/full", + "path": "/example-global", + "languageCodes": "eng-GB", + "alwaysAvailable": true, + "isHistory": false, + "forward": true, + "custom": true + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/urlaliases/url_alias_id/GET/UrlAlias.xml.example b/src/bundle/Resources/api_platform/examples/content/urlaliases/url_alias_id/GET/UrlAlias.xml.example new file mode 100644 index 000000000..565b070ef --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/urlaliases/url_alias_id/GET/UrlAlias.xml.example @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<UrlAlias media-type="application/vnd.ibexa.api.UrlAlias+xml" href="/api/ibexa/v2/content/urlaliases/0-2cecdff5f90b8595d76b68c417b09f36" id="0-2cecdff5f90b8595d76b68c417b09f36" type="RESOURCE"> + <resource>content/view/full</resource> + <path>/example-global</path> + <languageCodes>eng-GB</languageCodes> + <alwaysAvailable>true</alwaysAvailable> + <isHistory>false</isHistory> + <forward>true</forward> + <custom>true</custom> +</UrlAlias> diff --git a/src/bundle/Resources/api_platform/examples/content/urlwildcards/GET/UrlWildcardList.json.example b/src/bundle/Resources/api_platform/examples/content/urlwildcards/GET/UrlWildcardList.json.example new file mode 100644 index 000000000..c8e1bbefc --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/urlwildcards/GET/UrlWildcardList.json.example @@ -0,0 +1,16 @@ +{ + "UrlWildcardList": { + "_media-type": "application/vnd.ibexa.api.UrlWildcardList+json", + "_href": "/api/ibexa/v2/content/urlwildcards", + "UrlWildcard": [ + { + "_media-type": "application/vnd.ibexa.api.UrlWildcard+json", + "_href": "/api/ibexa/v2/content/urlwildcards/1", + "_id": 1, + "sourceUrl": "/api/ibexa/v2/content/location/2", + "destinationUrl": "/api/ibexa/v2/content/location/59", + "forward": true + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/urlwildcards/GET/UrlWildcardList.xml.example b/src/bundle/Resources/api_platform/examples/content/urlwildcards/GET/UrlWildcardList.xml.example new file mode 100644 index 000000000..6ca3442d9 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/urlwildcards/GET/UrlWildcardList.xml.example @@ -0,0 +1,8 @@ +<?xml version="1.0" encoding="UTF-8"?> +<UrlWildcardList media-type="application/vnd.ibexa.api.UrlWildcardList+xml" href="/api/ibexa/v2/content/urlwildcards"> + <UrlWildcard media-type="application/vnd.ibexa.api.UrlWildcard+xml" href="/api/ibexa/v2/content/urlwildcards/1" id="1"> + <sourceUrl>/api/ibexa/v2/content/location/2</sourceUrl> + <destinationUrl>/api/ibexa/v2/content/location/59</destinationUrl> + <forward>true</forward> + </UrlWildcard> +</UrlWildcardList> diff --git a/src/bundle/Resources/api_platform/examples/content/urlwildcards/POST/UrlWildcard.json.example b/src/bundle/Resources/api_platform/examples/content/urlwildcards/POST/UrlWildcard.json.example new file mode 100644 index 000000000..1bef2daff --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/urlwildcards/POST/UrlWildcard.json.example @@ -0,0 +1,10 @@ +{ + "UrlWildcard": { + "_media-type": "application/vnd.ibexa.api.UrlWildcard+json", + "_href": "/api/ibexa/v2/content/urlwildcards/6", + "_id": 6, + "sourceUrl": "/api/ibexa/v2/content/location/2", + "destinationUrl": "/api/ibexa/v2/content/location/59", + "forward": true + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/urlwildcards/POST/UrlWildcard.xml.example b/src/bundle/Resources/api_platform/examples/content/urlwildcards/POST/UrlWildcard.xml.example new file mode 100644 index 000000000..34e7bee41 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/urlwildcards/POST/UrlWildcard.xml.example @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<UrlWildcard media-type="application/vnd.ibexa.api.UrlWildcard+xml" href="/api/ibexa/v2/content/urlwildcards/1" id="1"> + <sourceUrl>/api/ibexa/v2/content/location/2</sourceUrl> + <destinationUrl>/api/ibexa/v2/content/location/59</destinationUrl> + <forward>true</forward> +</UrlWildcard> diff --git a/src/bundle/Resources/api_platform/examples/content/urlwildcards/POST/UrlWildcardCreate.json.example b/src/bundle/Resources/api_platform/examples/content/urlwildcards/POST/UrlWildcardCreate.json.example new file mode 100644 index 000000000..0bc4c24da --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/urlwildcards/POST/UrlWildcardCreate.json.example @@ -0,0 +1,7 @@ +{ + "URLWildcardCreate": { + "sourceUrl": "/api/ibexa/v2/content/location/2", + "destinationUrl": "/api/ibexa/v2/content/location/59", + "forward": true + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/urlwildcards/POST/UrlWildcardCreate.xml.example b/src/bundle/Resources/api_platform/examples/content/urlwildcards/POST/UrlWildcardCreate.xml.example new file mode 100644 index 000000000..a77f9f13f --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/urlwildcards/POST/UrlWildcardCreate.xml.example @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> + <UrlWildcardCreate> + <sourceUrl>/api/ibexa/v2/content/location/2</sourceUrl> + <destinationUrl>/api/ibexa/v2/content/location/59</destinationUrl> + <forward>true</forward> +</UrlWildcardCreate> diff --git a/src/bundle/Resources/api_platform/examples/content/urlwildcards/wildcard_id/GET/UrlWildcard.json.example b/src/bundle/Resources/api_platform/examples/content/urlwildcards/wildcard_id/GET/UrlWildcard.json.example new file mode 100644 index 000000000..f51ac49b1 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/urlwildcards/wildcard_id/GET/UrlWildcard.json.example @@ -0,0 +1,10 @@ +{ + "UrlWildcard": { + "_media-type": "application/vnd.ibexa.api.UrlWildcard+json", + "_href": "/api/ibexa/v2/content/urlwildcards/4", + "_id": 4, + "sourceUrl": "/api/ibexa/v2/content/location/2", + "destinationUrl": "/api/ibexa/v2/content/location/59", + "forward": true + } +} diff --git a/src/bundle/Resources/api_platform/examples/content/urlwildcards/wildcard_id/GET/UrlWildcard.xml.example b/src/bundle/Resources/api_platform/examples/content/urlwildcards/wildcard_id/GET/UrlWildcard.xml.example new file mode 100644 index 000000000..b4830abe8 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/content/urlwildcards/wildcard_id/GET/UrlWildcard.xml.example @@ -0,0 +1,6 @@ +<?xml version="1.0" encoding="UTF-8"?> +<UrlWildcard media-type="application/vnd.ibexa.api.UrlWildcard+xml" href="/api/ibexa/v2/content/urlwildcards/4" id="4"> + <sourceUrl>/api/ibexa/v2/content/location/2</sourceUrl> + <destinationUrl>/api/ibexa/v2/content/location/59</destinationUrl> + <forward>true</forward> +</UrlWildcard> diff --git a/src/bundle/Resources/api_platform/examples/services/countries/GET/CountriesList.xml.example b/src/bundle/Resources/api_platform/examples/services/countries/GET/CountriesList.xml.example new file mode 100644 index 000000000..374c6aa36 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/services/countries/GET/CountriesList.xml.example @@ -0,0 +1,1479 @@ +<?xml version="1.0" encoding="UTF-8"?> +<CountryList media-type="application/vnd.ibexa.api.CountryList+xml"> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="AF"> + <name>Afghanistan</name> + <Alpha2>AF</Alpha2> + <Alpha3>AFG</Alpha3> + <IDC>93</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="AX"> + <name>Åland</name> + <Alpha2>AX</Alpha2> + <Alpha3>ALA</Alpha3> + <IDC>358</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="AL"> + <name>Albania</name> + <Alpha2>AL</Alpha2> + <Alpha3>ALB</Alpha3> + <IDC>355</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="DZ"> + <name>Algeria</name> + <Alpha2>DZ</Alpha2> + <Alpha3>DZA</Alpha3> + <IDC>213</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="AS"> + <name>American Samoa</name> + <Alpha2>AS</Alpha2> + <Alpha3>ASM</Alpha3> + <IDC>1684</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="AD"> + <name>Andorra</name> + <Alpha2>AD</Alpha2> + <Alpha3>AND</Alpha3> + <IDC>376</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="AO"> + <name>Angola</name> + <Alpha2>AO</Alpha2> + <Alpha3>AGO</Alpha3> + <IDC>244</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="AI"> + <name>Anguilla</name> + <Alpha2>AI</Alpha2> + <Alpha3>AIA</Alpha3> + <IDC>1264</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="AQ"> + <name>Antarctica</name> + <Alpha2>AQ</Alpha2> + <Alpha3>ATA</Alpha3> + <IDC>672</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="AG"> + <name>Antigua and Barbuda</name> + <Alpha2>AG</Alpha2> + <Alpha3>ATG</Alpha3> + <IDC>1268</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="AR"> + <name>Argentina</name> + <Alpha2>AR</Alpha2> + <Alpha3>ARG</Alpha3> + <IDC>54</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="AM"> + <name>Armenia</name> + <Alpha2>AM</Alpha2> + <Alpha3>ARM</Alpha3> + <IDC>374</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="AW"> + <name>Aruba</name> + <Alpha2>AW</Alpha2> + <Alpha3>ABW</Alpha3> + <IDC>297</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="AU"> + <name>Australia</name> + <Alpha2>AU</Alpha2> + <Alpha3>AUS</Alpha3> + <IDC>61</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="AT"> + <name>Austria</name> + <Alpha2>AT</Alpha2> + <Alpha3>AUT</Alpha3> + <IDC>43</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="AZ"> + <name>Azerbaijan</name> + <Alpha2>AZ</Alpha2> + <Alpha3>AZE</Alpha3> + <IDC>994</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="BS"> + <name>Bahamas</name> + <Alpha2>BS</Alpha2> + <Alpha3>BHS</Alpha3> + <IDC>1242</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="BH"> + <name>Bahrain</name> + <Alpha2>BH</Alpha2> + <Alpha3>BHR</Alpha3> + <IDC>973</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="BD"> + <name>Bangladesh</name> + <Alpha2>BD</Alpha2> + <Alpha3>BGD</Alpha3> + <IDC>880</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="BB"> + <name>Barbados</name> + <Alpha2>BB</Alpha2> + <Alpha3>BRB</Alpha3> + <IDC>1246</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="BY"> + <name>Belarus</name> + <Alpha2>BY</Alpha2> + <Alpha3>BLR</Alpha3> + <IDC>375</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="BE"> + <name>Belgium</name> + <Alpha2>BE</Alpha2> + <Alpha3>BEL</Alpha3> + <IDC>32</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="BZ"> + <name>Belize</name> + <Alpha2>BZ</Alpha2> + <Alpha3>BLZ</Alpha3> + <IDC>501</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="BJ"> + <name>Benin</name> + <Alpha2>BJ</Alpha2> + <Alpha3>BEN</Alpha3> + <IDC>229</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="BM"> + <name>Bermuda</name> + <Alpha2>BM</Alpha2> + <Alpha3>BMU</Alpha3> + <IDC>1441</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="BT"> + <name>Bhutan</name> + <Alpha2>BT</Alpha2> + <Alpha3>BTN</Alpha3> + <IDC>975</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="BO"> + <name>Bolivia</name> + <Alpha2>BO</Alpha2> + <Alpha3>BOL</Alpha3> + <IDC>591</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="BA"> + <name>Bosnia and Herzegovina</name> + <Alpha2>BA</Alpha2> + <Alpha3>BIH</Alpha3> + <IDC>387</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="BW"> + <name>Botswana</name> + <Alpha2>BW</Alpha2> + <Alpha3>BWA</Alpha3> + <IDC>267</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="BV"> + <name>Bouvet Island</name> + <Alpha2>BV</Alpha2> + <Alpha3>BVT</Alpha3> + <IDC>47</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="BR"> + <name>Brazil</name> + <Alpha2>BR</Alpha2> + <Alpha3>BRA</Alpha3> + <IDC>55</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="IO"> + <name>British Indian Ocean Territory</name> + <Alpha2>IO</Alpha2> + <Alpha3>IOT</Alpha3> + <IDC>246</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="BN"> + <name>Brunei Darussalam</name> + <Alpha2>BN</Alpha2> + <Alpha3>BRN</Alpha3> + <IDC>673</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="BG"> + <name>Bulgaria</name> + <Alpha2>BG</Alpha2> + <Alpha3>BGR</Alpha3> + <IDC>359</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="BF"> + <name>Burkina Faso</name> + <Alpha2>BF</Alpha2> + <Alpha3>BFA</Alpha3> + <IDC>226</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="BI"> + <name>Burundi</name> + <Alpha2>BI</Alpha2> + <Alpha3>BDI</Alpha3> + <IDC>257</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="KH"> + <name>Cambodia</name> + <Alpha2>KH</Alpha2> + <Alpha3>KHM</Alpha3> + <IDC>855</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="CM"> + <name>Cameroon</name> + <Alpha2>CM</Alpha2> + <Alpha3>CMR</Alpha3> + <IDC>237</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="CA"> + <name>Canada</name> + <Alpha2>CA</Alpha2> + <Alpha3>CAN</Alpha3> + <IDC>1</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="CV"> + <name>Cape Verde</name> + <Alpha2>CV</Alpha2> + <Alpha3>CPV</Alpha3> + <IDC>238</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="KY"> + <name>Cayman Islands</name> + <Alpha2>KY</Alpha2> + <Alpha3>CYM</Alpha3> + <IDC>1345</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="CF"> + <name>Central African Republic</name> + <Alpha2>CF</Alpha2> + <Alpha3>CAF</Alpha3> + <IDC>236</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="TD"> + <name>Chad</name> + <Alpha2>TD</Alpha2> + <Alpha3>TCD</Alpha3> + <IDC>235</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="CL"> + <name>Chile</name> + <Alpha2>CL</Alpha2> + <Alpha3>CHL</Alpha3> + <IDC>56</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="CN"> + <name>China</name> + <Alpha2>CN</Alpha2> + <Alpha3>CHN</Alpha3> + <IDC>86</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="CX"> + <name>Christmas Island</name> + <Alpha2>CX</Alpha2> + <Alpha3>CXR</Alpha3> + <IDC>61</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="CC"> + <name>Cocos (Keeling) Islands</name> + <Alpha2>CC</Alpha2> + <Alpha3>CCK</Alpha3> + <IDC>61</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="CO"> + <name>Colombia</name> + <Alpha2>CO</Alpha2> + <Alpha3>COL</Alpha3> + <IDC>57</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="KM"> + <name>Comoros</name> + <Alpha2>KM</Alpha2> + <Alpha3>COM</Alpha3> + <IDC>269</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="CG"> + <name>Congo</name> + <Alpha2>CG</Alpha2> + <Alpha3>COG</Alpha3> + <IDC>242</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="CD"> + <name>Congo, The Democratic Republic Of The</name> + <Alpha2>CD</Alpha2> + <Alpha3>COD</Alpha3> + <IDC>243</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="CK"> + <name>Cook Islands</name> + <Alpha2>CK</Alpha2> + <Alpha3>COK</Alpha3> + <IDC>682</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="CR"> + <name>Costa Rica</name> + <Alpha2>CR</Alpha2> + <Alpha3>CRI</Alpha3> + <IDC>506</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="CI"> + <name>Côte d'Ivoire</name> + <Alpha2>CI</Alpha2> + <Alpha3>CIV</Alpha3> + <IDC>225</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="HR"> + <name>Croatia</name> + <Alpha2>HR</Alpha2> + <Alpha3>HRV</Alpha3> + <IDC>385</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="CU"> + <name>Cuba</name> + <Alpha2>CU</Alpha2> + <Alpha3>CUB</Alpha3> + <IDC>53</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="CY"> + <name>Cyprus</name> + <Alpha2>CY</Alpha2> + <Alpha3>CYP</Alpha3> + <IDC>357</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="CZ"> + <name>Czech Republic</name> + <Alpha2>CZ</Alpha2> + <Alpha3>CZE</Alpha3> + <IDC>420</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="DK"> + <name>Denmark</name> + <Alpha2>DK</Alpha2> + <Alpha3>DNK</Alpha3> + <IDC>45</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="DJ"> + <name>Djibouti</name> + <Alpha2>DJ</Alpha2> + <Alpha3>DJI</Alpha3> + <IDC>253</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="DM"> + <name>Dominica</name> + <Alpha2>DM</Alpha2> + <Alpha3>DMA</Alpha3> + <IDC>1767</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="DO"> + <name>Dominican Republic</name> + <Alpha2>DO</Alpha2> + <Alpha3>DOM</Alpha3> + <IDC>1809</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="EC"> + <name>Ecuador</name> + <Alpha2>EC</Alpha2> + <Alpha3>ECU</Alpha3> + <IDC>593</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="EG"> + <name>Egypt</name> + <Alpha2>EG</Alpha2> + <Alpha3>EGY</Alpha3> + <IDC>20</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="SV"> + <name>El Salvador</name> + <Alpha2>SV</Alpha2> + <Alpha3>SLV</Alpha3> + <IDC>503</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="GQ"> + <name>Equatorial Guinea</name> + <Alpha2>GQ</Alpha2> + <Alpha3>GNQ</Alpha3> + <IDC>240</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="ER"> + <name>Eritrea</name> + <Alpha2>ER</Alpha2> + <Alpha3>ERI</Alpha3> + <IDC>291</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="EE"> + <name>Estonia</name> + <Alpha2>EE</Alpha2> + <Alpha3>EST</Alpha3> + <IDC>372</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="ET"> + <name>Ethiopia</name> + <Alpha2>ET</Alpha2> + <Alpha3>ETH</Alpha3> + <IDC>251</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="FK"> + <name>Falkland Islands (Malvinas)</name> + <Alpha2>FK</Alpha2> + <Alpha3>FLK</Alpha3> + <IDC>500</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="FO"> + <name>Faroe Islands</name> + <Alpha2>FO</Alpha2> + <Alpha3>FRO</Alpha3> + <IDC>298</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="FJ"> + <name>Fiji</name> + <Alpha2>FJ</Alpha2> + <Alpha3>FJI</Alpha3> + <IDC>679</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="FI"> + <name>Finland</name> + <Alpha2>FI</Alpha2> + <Alpha3>FIN</Alpha3> + <IDC>358</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="FR"> + <name>France</name> + <Alpha2>FR</Alpha2> + <Alpha3>FRA</Alpha3> + <IDC>33</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="GF"> + <name>French Guiana</name> + <Alpha2>GF</Alpha2> + <Alpha3>GUF</Alpha3> + <IDC>594</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="PF"> + <name>French Polynesia</name> + <Alpha2>PF</Alpha2> + <Alpha3>PYF</Alpha3> + <IDC>689</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="TF"> + <name>French Southern Territories</name> + <Alpha2>TF</Alpha2> + <Alpha3>ATF</Alpha3> + <IDC>0</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="GA"> + <name>Gabon</name> + <Alpha2>GA</Alpha2> + <Alpha3>GAB</Alpha3> + <IDC>241</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="GM"> + <name>Gambia</name> + <Alpha2>GM</Alpha2> + <Alpha3>GMB</Alpha3> + <IDC>220</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="GE"> + <name>Georgia</name> + <Alpha2>GE</Alpha2> + <Alpha3>GEO</Alpha3> + <IDC>995</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="DE"> + <name>Germany</name> + <Alpha2>DE</Alpha2> + <Alpha3>DEU</Alpha3> + <IDC>49</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="GH"> + <name>Ghana</name> + <Alpha2>GH</Alpha2> + <Alpha3>GHA</Alpha3> + <IDC>233</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="GI"> + <name>Gibraltar</name> + <Alpha2>GI</Alpha2> + <Alpha3>GIB</Alpha3> + <IDC>350</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="GR"> + <name>Greece</name> + <Alpha2>GR</Alpha2> + <Alpha3>GRC</Alpha3> + <IDC>30</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="GL"> + <name>Greenland</name> + <Alpha2>GL</Alpha2> + <Alpha3>GRL</Alpha3> + <IDC>299</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="GD"> + <name>Grenada</name> + <Alpha2>GD</Alpha2> + <Alpha3>GRD</Alpha3> + <IDC>1473</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="GP"> + <name>Guadeloupe</name> + <Alpha2>GP</Alpha2> + <Alpha3>GLP</Alpha3> + <IDC>590</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="GU"> + <name>Guam</name> + <Alpha2>GU</Alpha2> + <Alpha3>GUM</Alpha3> + <IDC>1671</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="GT"> + <name>Guatemala</name> + <Alpha2>GT</Alpha2> + <Alpha3>GTM</Alpha3> + <IDC>502</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="GG"> + <name>Guernsey</name> + <Alpha2>GG</Alpha2> + <Alpha3>GGY</Alpha3> + <IDC>44</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="GN"> + <name>Guinea</name> + <Alpha2>GN</Alpha2> + <Alpha3>GIN</Alpha3> + <IDC>224</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="GW"> + <name>Guinea-Bissau</name> + <Alpha2>GW</Alpha2> + <Alpha3>GNB</Alpha3> + <IDC>245</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="GY"> + <name>Guyana</name> + <Alpha2>GY</Alpha2> + <Alpha3>GUY</Alpha3> + <IDC>592</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="HT"> + <name>Haiti</name> + <Alpha2>HT</Alpha2> + <Alpha3>HTI</Alpha3> + <IDC>509</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="HM"> + <name>Heard Island and McDonald Islands</name> + <Alpha2>HM</Alpha2> + <Alpha3>HMD</Alpha3> + <IDC>672</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="HN"> + <name>Honduras</name> + <Alpha2>HN</Alpha2> + <Alpha3>HND</Alpha3> + <IDC>504</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="HK"> + <name>Hong Kong</name> + <Alpha2>HK</Alpha2> + <Alpha3>HKG</Alpha3> + <IDC>852</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="HU"> + <name>Hungary</name> + <Alpha2>HU</Alpha2> + <Alpha3>HUN</Alpha3> + <IDC>36</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="IS"> + <name>Iceland</name> + <Alpha2>IS</Alpha2> + <Alpha3>ISL</Alpha3> + <IDC>354</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="IN"> + <name>India</name> + <Alpha2>IN</Alpha2> + <Alpha3>IND</Alpha3> + <IDC>91</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="ID"> + <name>Indonesia</name> + <Alpha2>ID</Alpha2> + <Alpha3>IDN</Alpha3> + <IDC>62</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="IR"> + <name>Iran, Islamic Republic of</name> + <Alpha2>IR</Alpha2> + <Alpha3>IRN</Alpha3> + <IDC>98</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="IQ"> + <name>Iraq</name> + <Alpha2>IQ</Alpha2> + <Alpha3>IRQ</Alpha3> + <IDC>964</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="IE"> + <name>Ireland</name> + <Alpha2>IE</Alpha2> + <Alpha3>IRL</Alpha3> + <IDC>353</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="IM"> + <name>Isle of Man</name> + <Alpha2>IM</Alpha2> + <Alpha3>IMN</Alpha3> + <IDC>44</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="IL"> + <name>Israel</name> + <Alpha2>IL</Alpha2> + <Alpha3>ISR</Alpha3> + <IDC>972</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="IT"> + <name>Italy</name> + <Alpha2>IT</Alpha2> + <Alpha3>ITA</Alpha3> + <IDC>39</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="JM"> + <name>Jamaica</name> + <Alpha2>JM</Alpha2> + <Alpha3>JAM</Alpha3> + <IDC>1876</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="JP"> + <name>Japan</name> + <Alpha2>JP</Alpha2> + <Alpha3>JPN</Alpha3> + <IDC>81</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="JE"> + <name>Jersey</name> + <Alpha2>JE</Alpha2> + <Alpha3>JEY</Alpha3> + <IDC>44</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="JO"> + <name>Jordan</name> + <Alpha2>JO</Alpha2> + <Alpha3>JOR</Alpha3> + <IDC>962</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="KZ"> + <name>Kazakhstan</name> + <Alpha2>KZ</Alpha2> + <Alpha3>KAZ</Alpha3> + <IDC>7</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="KE"> + <name>Kenya</name> + <Alpha2>KE</Alpha2> + <Alpha3>KEN</Alpha3> + <IDC>254</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="KI"> + <name>Kiribati</name> + <Alpha2>KI</Alpha2> + <Alpha3>KIR</Alpha3> + <IDC>686</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="KP"> + <name>Korea, Democratic People's Republic of</name> + <Alpha2>KP</Alpha2> + <Alpha3>PRK</Alpha3> + <IDC>850</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="KR"> + <name>Korea, Republic of</name> + <Alpha2>KR</Alpha2> + <Alpha3>KOR</Alpha3> + <IDC>82</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="KW"> + <name>Kuwait</name> + <Alpha2>KW</Alpha2> + <Alpha3>KWT</Alpha3> + <IDC>965</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="KG"> + <name>Kyrgyzstan</name> + <Alpha2>KG</Alpha2> + <Alpha3>KGZ</Alpha3> + <IDC>996</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="LA"> + <name>Lao People's Democratic Republic</name> + <Alpha2>LA</Alpha2> + <Alpha3>LAO</Alpha3> + <IDC>856</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="LV"> + <name>Latvia</name> + <Alpha2>LV</Alpha2> + <Alpha3>LVA</Alpha3> + <IDC>371</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="LB"> + <name>Lebanon</name> + <Alpha2>LB</Alpha2> + <Alpha3>LBN</Alpha3> + <IDC>961</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="LS"> + <name>Lesotho</name> + <Alpha2>LS</Alpha2> + <Alpha3>LSO</Alpha3> + <IDC>266</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="LR"> + <name>Liberia</name> + <Alpha2>LR</Alpha2> + <Alpha3>LBR</Alpha3> + <IDC>231</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="LY"> + <name>Libyan Arab Jamahiriya</name> + <Alpha2>LY</Alpha2> + <Alpha3>LBY</Alpha3> + <IDC>218</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="LI"> + <name>Liechtenstein</name> + <Alpha2>LI</Alpha2> + <Alpha3>LIE</Alpha3> + <IDC>423</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="LT"> + <name>Lithuania</name> + <Alpha2>LT</Alpha2> + <Alpha3>LTU</Alpha3> + <IDC>370</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="LU"> + <name>Luxembourg</name> + <Alpha2>LU</Alpha2> + <Alpha3>LUX</Alpha3> + <IDC>352</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="MO"> + <name>Macau</name> + <Alpha2>MO</Alpha2> + <Alpha3>MAC</Alpha3> + <IDC>853</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="MK"> + <name>Macedonia, The Former Yugoslav Republic of</name> + <Alpha2>MK</Alpha2> + <Alpha3>MKD</Alpha3> + <IDC>389</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="MG"> + <name>Madagascar</name> + <Alpha2>MG</Alpha2> + <Alpha3>MDG</Alpha3> + <IDC>261</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="MW"> + <name>Malawi</name> + <Alpha2>MW</Alpha2> + <Alpha3>MWI</Alpha3> + <IDC>265</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="MY"> + <name>Malaysia</name> + <Alpha2>MY</Alpha2> + <Alpha3>MYS</Alpha3> + <IDC>60</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="MV"> + <name>Maldives</name> + <Alpha2>MV</Alpha2> + <Alpha3>MDV</Alpha3> + <IDC>960</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="ML"> + <name>Mali</name> + <Alpha2>ML</Alpha2> + <Alpha3>MLI</Alpha3> + <IDC>223</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="MT"> + <name>Malta</name> + <Alpha2>MT</Alpha2> + <Alpha3>MLT</Alpha3> + <IDC>356</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="MH"> + <name>Marshall Islands</name> + <Alpha2>MH</Alpha2> + <Alpha3>MHL</Alpha3> + <IDC>692</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="MQ"> + <name>Martinique</name> + <Alpha2>MQ</Alpha2> + <Alpha3>MTQ</Alpha3> + <IDC>596</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="MR"> + <name>Mauritania</name> + <Alpha2>MR</Alpha2> + <Alpha3>MRT</Alpha3> + <IDC>222</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="MU"> + <name>Mauritius</name> + <Alpha2>MU</Alpha2> + <Alpha3>MUS</Alpha3> + <IDC>230</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="YT"> + <name>Mayotte</name> + <Alpha2>YT</Alpha2> + <Alpha3>MYT</Alpha3> + <IDC>262</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="MX"> + <name>Mexico</name> + <Alpha2>MX</Alpha2> + <Alpha3>MEX</Alpha3> + <IDC>52</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="FM"> + <name>Micronesia, Federated States of</name> + <Alpha2>FM</Alpha2> + <Alpha3>FSM</Alpha3> + <IDC>691</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="MD"> + <name>Moldova, Republic of</name> + <Alpha2>MD</Alpha2> + <Alpha3>MDA</Alpha3> + <IDC>373</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="MC"> + <name>Monaco</name> + <Alpha2>MC</Alpha2> + <Alpha3>MCO</Alpha3> + <IDC>377</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="MN"> + <name>Mongolia</name> + <Alpha2>MN</Alpha2> + <Alpha3>MNG</Alpha3> + <IDC>976</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="ME"> + <name>Montenegro</name> + <Alpha2>ME</Alpha2> + <Alpha3>MNE</Alpha3> + <IDC>382</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="MS"> + <name>Montserrat</name> + <Alpha2>MS</Alpha2> + <Alpha3>MSR</Alpha3> + <IDC>1664</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="MA"> + <name>Morocco</name> + <Alpha2>MA</Alpha2> + <Alpha3>MAR</Alpha3> + <IDC>212</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="MZ"> + <name>Mozambique</name> + <Alpha2>MZ</Alpha2> + <Alpha3>MOZ</Alpha3> + <IDC>258</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="MM"> + <name>Myanmar</name> + <Alpha2>MM</Alpha2> + <Alpha3>MMR</Alpha3> + <IDC>95</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="NA"> + <name>Namibia</name> + <Alpha2>NA</Alpha2> + <Alpha3>NAM</Alpha3> + <IDC>264</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="NR"> + <name>Nauru</name> + <Alpha2>NR</Alpha2> + <Alpha3>NRU</Alpha3> + <IDC>674</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="NP"> + <name>Nepal</name> + <Alpha2>NP</Alpha2> + <Alpha3>NPL</Alpha3> + <IDC>977</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="NL"> + <name>Netherlands</name> + <Alpha2>NL</Alpha2> + <Alpha3>NLD</Alpha3> + <IDC>31</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="AN"> + <name>Netherlands Antilles</name> + <Alpha2>AN</Alpha2> + <Alpha3>ANT</Alpha3> + <IDC>599</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="NC"> + <name>New Caledonia</name> + <Alpha2>NC</Alpha2> + <Alpha3>NCL</Alpha3> + <IDC>687</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="NZ"> + <name>New Zealand</name> + <Alpha2>NZ</Alpha2> + <Alpha3>NZL</Alpha3> + <IDC>64</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="NI"> + <name>Nicaragua</name> + <Alpha2>NI</Alpha2> + <Alpha3>NIC</Alpha3> + <IDC>505</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="NE"> + <name>Niger</name> + <Alpha2>NE</Alpha2> + <Alpha3>NER</Alpha3> + <IDC>227</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="NG"> + <name>Nigeria</name> + <Alpha2>NG</Alpha2> + <Alpha3>NGA</Alpha3> + <IDC>234</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="NU"> + <name>Niue</name> + <Alpha2>NU</Alpha2> + <Alpha3>NIU</Alpha3> + <IDC>683</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="NF"> + <name>Norfolk Island</name> + <Alpha2>NF</Alpha2> + <Alpha3>NFK</Alpha3> + <IDC>6723</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="MP"> + <name>Northern Mariana Islands</name> + <Alpha2>MP</Alpha2> + <Alpha3>MNP</Alpha3> + <IDC>1670</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="NO"> + <name>Norway</name> + <Alpha2>NO</Alpha2> + <Alpha3>NOR</Alpha3> + <IDC>47</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="OM"> + <name>Oman</name> + <Alpha2>OM</Alpha2> + <Alpha3>OMN</Alpha3> + <IDC>968</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="PK"> + <name>Pakistan</name> + <Alpha2>PK</Alpha2> + <Alpha3>PAK</Alpha3> + <IDC>92</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="PW"> + <name>Palau</name> + <Alpha2>PW</Alpha2> + <Alpha3>PLW</Alpha3> + <IDC>680</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="PS"> + <name>Palestinian Territory, Occupied</name> + <Alpha2>PS</Alpha2> + <Alpha3>PSE</Alpha3> + <IDC>970</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="PA"> + <name>Panama</name> + <Alpha2>PA</Alpha2> + <Alpha3>PAN</Alpha3> + <IDC>507</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="PG"> + <name>Papua New Guinea</name> + <Alpha2>PG</Alpha2> + <Alpha3>PNG</Alpha3> + <IDC>675</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="PY"> + <name>Paraguay</name> + <Alpha2>PY</Alpha2> + <Alpha3>PRY</Alpha3> + <IDC>595</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="PE"> + <name>Peru</name> + <Alpha2>PE</Alpha2> + <Alpha3>PER</Alpha3> + <IDC>51</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="PH"> + <name>Philippines</name> + <Alpha2>PH</Alpha2> + <Alpha3>PHL</Alpha3> + <IDC>63</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="PN"> + <name>Pitcairn</name> + <Alpha2>PN</Alpha2> + <Alpha3>PCN</Alpha3> + <IDC>64</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="PL"> + <name>Poland</name> + <Alpha2>PL</Alpha2> + <Alpha3>POL</Alpha3> + <IDC>48</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="PT"> + <name>Portugal</name> + <Alpha2>PT</Alpha2> + <Alpha3>PRT</Alpha3> + <IDC>351</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="PR"> + <name>Puerto Rico</name> + <Alpha2>PR</Alpha2> + <Alpha3>PRI</Alpha3> + <IDC>1787</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="QA"> + <name>Qatar</name> + <Alpha2>QA</Alpha2> + <Alpha3>QAT</Alpha3> + <IDC>974</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="RE"> + <name>Reunion</name> + <Alpha2>RE</Alpha2> + <Alpha3>REU</Alpha3> + <IDC>262</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="RO"> + <name>Romania</name> + <Alpha2>RO</Alpha2> + <Alpha3>ROU</Alpha3> + <IDC>40</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="RU"> + <name>Russian Federation</name> + <Alpha2>RU</Alpha2> + <Alpha3>RUS</Alpha3> + <IDC>7</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="RW"> + <name>Rwanda</name> + <Alpha2>RW</Alpha2> + <Alpha3>RWA</Alpha3> + <IDC>250</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="BL"> + <name>Saint Barthélemy</name> + <Alpha2>BL</Alpha2> + <Alpha3>BLM</Alpha3> + <IDC>590</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="SH"> + <name>Saint Helena</name> + <Alpha2>SH</Alpha2> + <Alpha3>SHN</Alpha3> + <IDC>290</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="KN"> + <name>Saint Kitts and Nevis</name> + <Alpha2>KN</Alpha2> + <Alpha3>KNA</Alpha3> + <IDC>1869</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="LC"> + <name>Saint Lucia</name> + <Alpha2>LC</Alpha2> + <Alpha3>LCA</Alpha3> + <IDC>1758</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="MF"> + <name>Saint Martin</name> + <Alpha2>MF</Alpha2> + <Alpha3>MAF</Alpha3> + <IDC>590</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="PM"> + <name>Saint Pierre and Miquelon</name> + <Alpha2>PM</Alpha2> + <Alpha3>SPM</Alpha3> + <IDC>508</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="VC"> + <name>Saint Vincent and The Grenadines</name> + <Alpha2>VC</Alpha2> + <Alpha3>VCT</Alpha3> + <IDC>1784</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="WS"> + <name>Samoa</name> + <Alpha2>WS</Alpha2> + <Alpha3>WSM</Alpha3> + <IDC>685</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="SM"> + <name>San Marino</name> + <Alpha2>SM</Alpha2> + <Alpha3>SMR</Alpha3> + <IDC>378</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="ST"> + <name>Sao Tome and Principe</name> + <Alpha2>ST</Alpha2> + <Alpha3>STP</Alpha3> + <IDC>239</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="SA"> + <name>Saudi Arabia</name> + <Alpha2>SA</Alpha2> + <Alpha3>SAU</Alpha3> + <IDC>966</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="SN"> + <name>Senegal</name> + <Alpha2>SN</Alpha2> + <Alpha3>SEN</Alpha3> + <IDC>221</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="RS"> + <name>Serbia</name> + <Alpha2>RS</Alpha2> + <Alpha3>SRB</Alpha3> + <IDC>381</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="SC"> + <name>Seychelles</name> + <Alpha2>SC</Alpha2> + <Alpha3>SYC</Alpha3> + <IDC>248</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="SL"> + <name>Sierra Leone</name> + <Alpha2>SL</Alpha2> + <Alpha3>SLE</Alpha3> + <IDC>232</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="SG"> + <name>Singapore</name> + <Alpha2>SG</Alpha2> + <Alpha3>SGP</Alpha3> + <IDC>65</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="SK"> + <name>Slovakia</name> + <Alpha2>SK</Alpha2> + <Alpha3>SVK</Alpha3> + <IDC>421</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="SI"> + <name>Slovenia</name> + <Alpha2>SI</Alpha2> + <Alpha3>SVN</Alpha3> + <IDC>386</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="SB"> + <name>Solomon Islands</name> + <Alpha2>SB</Alpha2> + <Alpha3>SLB</Alpha3> + <IDC>677</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="SO"> + <name>Somalia</name> + <Alpha2>SO</Alpha2> + <Alpha3>SOM</Alpha3> + <IDC>252</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="ZA"> + <name>South Africa</name> + <Alpha2>ZA</Alpha2> + <Alpha3>ZAF</Alpha3> + <IDC>27</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="GS"> + <name>South Georgia and The South Sandwich Islands</name> + <Alpha2>GS</Alpha2> + <Alpha3>SGS</Alpha3> + <IDC>500</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="ES"> + <name>Spain</name> + <Alpha2>ES</Alpha2> + <Alpha3>ESP</Alpha3> + <IDC>34</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="LK"> + <name>Sri Lanka</name> + <Alpha2>LK</Alpha2> + <Alpha3>LKA</Alpha3> + <IDC>94</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="SD"> + <name>Sudan</name> + <Alpha2>SD</Alpha2> + <Alpha3>SDN</Alpha3> + <IDC>249</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="SR"> + <name>Suriname</name> + <Alpha2>SR</Alpha2> + <Alpha3>SUR</Alpha3> + <IDC>597</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="SJ"> + <name>Svalbard and Jan Mayen</name> + <Alpha2>SJ</Alpha2> + <Alpha3>SJM</Alpha3> + <IDC>47</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="SZ"> + <name>Swaziland</name> + <Alpha2>SZ</Alpha2> + <Alpha3>SWZ</Alpha3> + <IDC>268</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="SE"> + <name>Sweden</name> + <Alpha2>SE</Alpha2> + <Alpha3>SWE</Alpha3> + <IDC>46</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="CH"> + <name>Switzerland</name> + <Alpha2>CH</Alpha2> + <Alpha3>CHE</Alpha3> + <IDC>41</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="SY"> + <name>Syrian Arab Republic</name> + <Alpha2>SY</Alpha2> + <Alpha3>SYR</Alpha3> + <IDC>963</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="TW"> + <name>Taiwan</name> + <Alpha2>TW</Alpha2> + <Alpha3>TWN</Alpha3> + <IDC>886</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="TJ"> + <name>Tajikistan</name> + <Alpha2>TJ</Alpha2> + <Alpha3>TJK</Alpha3> + <IDC>992</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="TZ"> + <name>Tanzania, United Republic of</name> + <Alpha2>TZ</Alpha2> + <Alpha3>TZA</Alpha3> + <IDC>255</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="TH"> + <name>Thailand</name> + <Alpha2>TH</Alpha2> + <Alpha3>THA</Alpha3> + <IDC>66</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="TL"> + <name>Timor-Leste</name> + <Alpha2>TL</Alpha2> + <Alpha3>TLS</Alpha3> + <IDC>670</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="TG"> + <name>Togo</name> + <Alpha2>TG</Alpha2> + <Alpha3>TGO</Alpha3> + <IDC>228</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="TK"> + <name>Tokelau</name> + <Alpha2>TK</Alpha2> + <Alpha3>TKL</Alpha3> + <IDC>690</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="TO"> + <name>Tonga</name> + <Alpha2>TO</Alpha2> + <Alpha3>TON</Alpha3> + <IDC>676</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="TT"> + <name>Trinidad and Tobago</name> + <Alpha2>TT</Alpha2> + <Alpha3>TTO</Alpha3> + <IDC>1868</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="TN"> + <name>Tunisia</name> + <Alpha2>TN</Alpha2> + <Alpha3>TUN</Alpha3> + <IDC>216</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="TR"> + <name>Turkey</name> + <Alpha2>TR</Alpha2> + <Alpha3>TUR</Alpha3> + <IDC>90</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="TM"> + <name>Turkmenistan</name> + <Alpha2>TM</Alpha2> + <Alpha3>TKM</Alpha3> + <IDC>993</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="TC"> + <name>Turks and Caicos Islands</name> + <Alpha2>TC</Alpha2> + <Alpha3>TCA</Alpha3> + <IDC>1649</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="TV"> + <name>Tuvalu</name> + <Alpha2>TV</Alpha2> + <Alpha3>TUV</Alpha3> + <IDC>688</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="UG"> + <name>Uganda</name> + <Alpha2>UG</Alpha2> + <Alpha3>UGA</Alpha3> + <IDC>256</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="UA"> + <name>Ukraine</name> + <Alpha2>UA</Alpha2> + <Alpha3>UKR</Alpha3> + <IDC>380</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="AE"> + <name>United Arab Emirates</name> + <Alpha2>AE</Alpha2> + <Alpha3>ARE</Alpha3> + <IDC>971</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="GB"> + <name>United Kingdom</name> + <Alpha2>GB</Alpha2> + <Alpha3>GBR</Alpha3> + <IDC>44</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="UM"> + <name>United States Minor Outlying Islands</name> + <Alpha2>UM</Alpha2> + <Alpha3>UMI</Alpha3> + <IDC>1</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="US"> + <name>United States of America</name> + <Alpha2>US</Alpha2> + <Alpha3>USA</Alpha3> + <IDC>1</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="UY"> + <name>Uruguay</name> + <Alpha2>UY</Alpha2> + <Alpha3>URY</Alpha3> + <IDC>598</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="UZ"> + <name>Uzbekistan</name> + <Alpha2>UZ</Alpha2> + <Alpha3>UZB</Alpha3> + <IDC>998</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="VU"> + <name>Vanuatu</name> + <Alpha2>VU</Alpha2> + <Alpha3>VUT</Alpha3> + <IDC>678</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="VA"> + <name>Holy See (Vatican City State)</name> + <Alpha2>VA</Alpha2> + <Alpha3>VAT</Alpha3> + <IDC>3906</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="VE"> + <name>Venezuela</name> + <Alpha2>VE</Alpha2> + <Alpha3>VEN</Alpha3> + <IDC>58</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="VN"> + <name>Viet Nam</name> + <Alpha2>VN</Alpha2> + <Alpha3>VNM</Alpha3> + <IDC>84</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="VG"> + <name>Virgin Islands, British</name> + <Alpha2>VG</Alpha2> + <Alpha3>VGB</Alpha3> + <IDC>1284</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="VI"> + <name>Virgin Islands, U.S.</name> + <Alpha2>VI</Alpha2> + <Alpha3>VIR</Alpha3> + <IDC>1340</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="WF"> + <name>Wallis and Futuna</name> + <Alpha2>WF</Alpha2> + <Alpha3>WLF</Alpha3> + <IDC>681</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="EH"> + <name>Western Sahara</name> + <Alpha2>EH</Alpha2> + <Alpha3>ESH</Alpha3> + <IDC>212</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="YE"> + <name>Yemen</name> + <Alpha2>YE</Alpha2> + <Alpha3>YEM</Alpha3> + <IDC>967</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="ZM"> + <name>Zambia</name> + <Alpha2>ZM</Alpha2> + <Alpha3>ZMB</Alpha3> + <IDC>260</IDC> + </Country> + <Country media-type="application/vnd.ibexa.api.Country+xml" id="ZW"> + <name>Zimbabwe</name> + <Alpha2>ZW</Alpha2> + <Alpha3>ZWE</Alpha3> + <IDC>263</IDC> + </Country> +</CountryList> diff --git a/src/bundle/Resources/api_platform/examples/user/groups/GET/UserGroupList.json.example b/src/bundle/Resources/api_platform/examples/user/groups/GET/UserGroupList.json.example new file mode 100644 index 000000000..afe640263 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/groups/GET/UserGroupList.json.example @@ -0,0 +1,156 @@ +{ + "UserGroupList": { + "_media-type": "application/vnd.ibexa.api.UserGroupList+json", + "_href": "/api/ibexa/v2/user/groups", + "UserGroup": [ + { + "_media-type": "application/vnd.ibexa.api.UserGroup+json", + "_href": "/api/ibexa/v2/user/groups/1/5/13/15", + "_id": 14, + "_remoteId": "1bb4fe25487f05527efa8bfd394cecc7", + "ContentType": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/4" + }, + "name": "Administrator User", + "Versions": { + "_media-type": "application/vnd.ibexa.api.VersionList+json", + "_href": "/api/ibexa/v2/content/objects/14/versions" + }, + "Section": { + "_media-type": "application/vnd.ibexa.api.Section+json", + "_href": "/api/ibexa/v2/content/sections/2" + }, + "MainLocation": { + "_media-type": "application/vnd.ibexa.api.Location+json", + "_href": "/api/ibexa/v2/content/locations/1/5/13/15" + }, + "Locations": { + "_media-type": "application/vnd.ibexa.api.LocationList+json", + "_href": "/api/ibexa/v2/content/objects/14/locations" + }, + "Owner": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "publishDate": "2002-10-06T16:13:50+00:00", + "lastModificationDate": "2011-03-25T14:07:04+00:00", + "mainLanguageCode": "eng-GB", + "alwaysAvailable": true, + "Version": { + "_media-type": "application/vnd.ibexa.api.Version+json", + "_href": "/api/ibexa/v2/content/objects/14/versions/3", + "VersionInfo": { + "id": 499, + "versionNo": 3, + "status": "PUBLISHED", + "modificationDate": "2011-03-25T14:07:04+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "creationDate": "2011-03-25T14:03:03+00:00", + "initialLanguageCode": "eng-GB", + "languageCodes": "eng-GB", + "VersionTranslationInfo": { + "_media-type": "application/vnd.ibexa.api.VersionTranslationInfo+json", + "Language": [ + { + "languageCode": "eng-GB" + } + ] + }, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Administrator User" + } + ] + }, + "Content": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/14" + } + }, + "Fields": { + "field": [ + { + "id": 28, + "fieldDefinitionIdentifier": "first_name", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezstring", + "fieldValue": "Administrator" + }, + { + "id": 29, + "fieldDefinitionIdentifier": "last_name", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezstring", + "fieldValue": "User" + }, + { + "id": 30, + "fieldDefinitionIdentifier": "user_account", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezuser", + "fieldValue": { + "hasStoredLogin": true, + "contentId": 14, + "login": "admin", + "email": "admin@link.invalid", + "passwordUpdatedAt": null, + "enabled": true, + "maxLogin": 10, + "plainPassword": null + } + }, + { + "id": 178, + "fieldDefinitionIdentifier": "signature", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "eztext", + "fieldValue": null + }, + { + "id": 180, + "fieldDefinitionIdentifier": "image", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezimage", + "fieldValue": null + } + ] + }, + "Relations": { + "_media-type": "application/vnd.ibexa.api.RelationList+json", + "_href": "/api/ibexa/v2/content/objects/14/versions/3/relations", + "Relation": [] + }, + "Thumbnail": { + "_media-type": "application/vnd.ibexa.api.Thumbnail+json", + "resource": "/bundles/ezplatformadminui/img/ez-icons.svg#user", + "width": null, + "height": null, + "mimeType": "image/svg+xml" + } + }, + "ParentUserGroup": { + "_media-type": "application/vnd.ibexa.api.UserGroup+json", + "_href": "/api/ibexa/v2/user/groups/1/5/13" + }, + "Subgroups": { + "_media-type": "application/vnd.ibexa.api.UserGroupList+json", + "_href": "/api/ibexa/v2/user/groups/1/5/13/15/subgroups" + }, + "Users": { + "_media-type": "application/vnd.ibexa.api.UserList+json", + "_href": "/api/ibexa/v2/user/groups/1/5/13/15/users" + }, + "Roles": { + "_media-type": "application/vnd.ibexa.api.RoleAssignmentList+json", + "_href": "/api/ibexa/v2/user/groups/1/5/13/15/roles" + } + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/groups/GET/UserGroupList.xml.example b/src/bundle/Resources/api_platform/examples/user/groups/GET/UserGroupList.xml.example new file mode 100644 index 000000000..a6ea1d93f --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/groups/GET/UserGroupList.xml.example @@ -0,0 +1,94 @@ +<?xml version="1.0" encoding="UTF-8"?> +<UserGroupList media-type="application/vnd.ibexa.api.UserGroupList+xml" href="/api/ibexa/v2/user/groups"> + <UserGroup media-type="application/vnd.ibexa.api.UserGroup+xml" href="/api/ibexa/v2/user/groups/1/5/13/15" id="14" remoteId="1bb4fe25487f05527efa8bfd394cecc7"> + <ContentType media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/4"/> + <name>Administrator User</name> + <Versions media-type="application/vnd.ibexa.api.VersionList+xml" href="/api/ibexa/v2/content/objects/14/versions"/> + <Section media-type="application/vnd.ibexa.api.Section+xml" href="/api/ibexa/v2/content/sections/2"/> + <MainLocation media-type="application/vnd.ibexa.api.Location+xml" href="/api/ibexa/v2/content/locations/1/5/13/15"/> + <Locations media-type="application/vnd.ibexa.api.LocationList+xml" href="/api/ibexa/v2/content/objects/14/locations"/> + <Owner media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <publishDate>2002-10-06T16:13:50+00:00</publishDate> + <lastModificationDate>2011-03-25T14:07:04+00:00</lastModificationDate> + <mainLanguageCode>eng-GB</mainLanguageCode> + <alwaysAvailable>true</alwaysAvailable> + <Version media-type="application/vnd.ibexa.api.Version+xml" href="/api/ibexa/v2/content/objects/14/versions/3"> + <VersionInfo> + <id>499</id> + <versionNo>3</versionNo> + <status>PUBLISHED</status> + <modificationDate>2011-03-25T14:07:04+00:00</modificationDate> + <Creator media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <creationDate>2011-03-25T14:03:03+00:00</creationDate> + <initialLanguageCode>eng-GB</initialLanguageCode> + <languageCodes>eng-GB</languageCodes> + <VersionTranslationInfo media-type="application/vnd.ibexa.api.VersionTranslationInfo+xml"> + <Language> + <languageCode>eng-GB</languageCode> + </Language> + </VersionTranslationInfo> + <names> + <value languageCode="eng-GB">Administrator User</value> + </names> + <Content media-type="application/vnd.ibexa.api.ContentInfo+xml" href="/api/ibexa/v2/content/objects/14"/> + </VersionInfo> + <Fields> + <field> + <id>28</id> + <fieldDefinitionIdentifier>first_name</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldTypeIdentifier>ezstring</fieldTypeIdentifier> + <fieldValue>Administrator</fieldValue> + </field> + <field> + <id>29</id> + <fieldDefinitionIdentifier>last_name</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldTypeIdentifier>ezstring</fieldTypeIdentifier> + <fieldValue>User</fieldValue> + </field> + <field> + <id>30</id> + <fieldDefinitionIdentifier>user_account</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldTypeIdentifier>ezuser</fieldTypeIdentifier> + <fieldValue> + <value key="hasStoredLogin">true</value> + <value key="contentId">14</value> + <value key="login">admin</value> + <value key="email">admin@link.invalid</value> + <value key="passwordUpdatedAt"/> + <value key="enabled">true</value> + <value key="maxLogin">10</value> + <value key="plainPassword"/> + </fieldValue> + </field> + <field> + <id>178</id> + <fieldDefinitionIdentifier>signature</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldTypeIdentifier>eztext</fieldTypeIdentifier> + <fieldValue/> + </field> + <field> + <id>180</id> + <fieldDefinitionIdentifier>image</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldTypeIdentifier>ezimage</fieldTypeIdentifier> + <fieldValue/> + </field> + </Fields> + <Relations media-type="application/vnd.ibexa.api.RelationList+xml" href="/api/ibexa/v2/content/objects/14/versions/3/relations"/> + <Thumbnail media-type="application/vnd.ibexa.api.Thumbnail+xml"> + <resource>/bundles/ezplatformadminui/img/ez-icons.svg#user</resource> + <width></width> + <height></height> + <mimeType>image/svg+xml</mimeType> + </Thumbnail> + </Version> + <ParentUserGroup media-type="application/vnd.ibexa.api.UserGroup+xml" href="/api/ibexa/v2/user/groups/1/5/13"/> + <Subgroups media-type="application/vnd.ibexa.api.UserGroupList+xml" href="/api/ibexa/v2/user/groups/1/5/13/15/subgroups"/> + <Users media-type="application/vnd.ibexa.api.UserList+xml" href="/api/ibexa/v2/user/groups/1/5/13/15/users"/> + <Roles media-type="application/vnd.ibexa.api.RoleAssignmentList+xml" href="/api/ibexa/v2/user/groups/1/5/13/15/roles"/> + </UserGroup> +</UserGroupList> diff --git a/src/bundle/Resources/api_platform/examples/user/groups/id/subgroups/GET/UserGroupRefList.json.example b/src/bundle/Resources/api_platform/examples/user/groups/id/subgroups/GET/UserGroupRefList.json.example new file mode 100644 index 000000000..56b569809 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/groups/id/subgroups/GET/UserGroupRefList.json.example @@ -0,0 +1,12 @@ +{ + "UserGroupRefList": { + "_media-type": "application/vnd.ibexa.api.UserGroupRefList+json", + "_href": "/api/ibexa/v2/user/groups/13/subgroups", + "UserGroup": [ + { + "_media-type": "application/vnd.ibexa.api.UserGroup+json", + "_href": "/api/ibexa/v2/user/groups/1/5/13/112" + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/groups/id/subgroups/GET/UserGroupRefList.xml.example b/src/bundle/Resources/api_platform/examples/user/groups/id/subgroups/GET/UserGroupRefList.xml.example new file mode 100644 index 000000000..2ec89ff11 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/groups/id/subgroups/GET/UserGroupRefList.xml.example @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<UserGroupRefList media-type="application/vnd.ibexa.api.UserGroupRefList+xml" href="/api/ibexa/v2/user/groups/13/subgroups"> + <UserGroup media-type="application/vnd.ibexa.api.UserGroup+xml" href="/api/ibexa/v2/user/groups/1/5/13/112"/> +</UserGroupRefList> diff --git a/src/bundle/Resources/api_platform/examples/user/groups/id/users/GET/UserRefList.json.example b/src/bundle/Resources/api_platform/examples/user/groups/id/users/GET/UserRefList.json.example new file mode 100644 index 000000000..1df6338d7 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/groups/id/users/GET/UserRefList.json.example @@ -0,0 +1,16 @@ +{ + "UserRefList": { + "_media-type": "application/vnd.ibexa.api.UserRefList+json", + "_href": "/api/ibexa/v2/user/groups/13/users", + "User": [ + { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/113" + }, + { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/groups/id/users/GET/UserRefList.xml.example b/src/bundle/Resources/api_platform/examples/user/groups/id/users/GET/UserRefList.xml.example new file mode 100644 index 000000000..633e04a03 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/groups/id/users/GET/UserRefList.xml.example @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<UserRefList media-type="application/vnd.ibexa.api.UserRefList+xml" href="/api/ibexa/v2/user/groups/13/users"> + <User media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/113"/> + <User media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> +</UserRefList> diff --git a/src/bundle/Resources/api_platform/examples/user/groups/path/GET/UserGroup.json.example b/src/bundle/Resources/api_platform/examples/user/groups/path/GET/UserGroup.json.example new file mode 100644 index 000000000..56f81323a --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/groups/path/GET/UserGroup.json.example @@ -0,0 +1,120 @@ +{ + "UserGroup": { + "_media-type": "application/vnd.ibexa.api.UserGroup+json", + "_href": "/api/ibexa/v2/user/groups/1/5/13", + "_id": 12, + "_remoteId": "9b47a45624b023b1a76c73b74d704acf", + "ContentType": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/3" + }, + "name": "Administrator users", + "Versions": { + "_media-type": "application/vnd.ibexa.api.VersionList+json", + "_href": "/api/ibexa/v2/content/objects/12/versions" + }, + "Section": { + "_media-type": "application/vnd.ibexa.api.Section+json", + "_href": "/api/ibexa/v2/content/sections/2" + }, + "MainLocation": { + "_media-type": "application/vnd.ibexa.api.Location+json", + "_href": "/api/ibexa/v2/content/locations/1/5/13" + }, + "Locations": { + "_media-type": "application/vnd.ibexa.api.LocationList+json", + "_href": "/api/ibexa/v2/content/objects/12/locations" + }, + "Owner": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "publishDate": "2002-10-06T16:12:55+00:00", + "lastModificationDate": "2002-10-06T16:12:55+00:00", + "mainLanguageCode": "eng-GB", + "alwaysAvailable": true, + "Version": { + "_media-type": "application/vnd.ibexa.api.Version+json", + "_href": "/api/ibexa/v2/content/objects/12/versions/1", + "VersionInfo": { + "id": 440, + "versionNo": 1, + "status": "PUBLISHED", + "modificationDate": "2002-10-06T16:12:55+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "creationDate": "2002-10-06T16:12:40+00:00", + "initialLanguageCode": "eng-GB", + "languageCodes": "eng-GB", + "VersionTranslationInfo": { + "_media-type": "application/vnd.ibexa.api.VersionTranslationInfo+json", + "Language": [ + { + "languageCode": "eng-GB" + } + ] + }, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Administrator users" + } + ] + }, + "Content": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/12" + } + }, + "Fields": { + "field": [ + { + "id": 24, + "fieldDefinitionIdentifier": "name", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezstring", + "fieldValue": "Administrator users" + }, + { + "id": 25, + "fieldDefinitionIdentifier": "description", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezstring", + "fieldValue": null + } + ] + }, + "Relations": { + "_media-type": "application/vnd.ibexa.api.RelationList+json", + "_href": "/api/ibexa/v2/content/objects/12/versions/1/relations", + "Relation": [] + }, + "Thumbnail": { + "_media-type": "application/vnd.ibexa.api.Thumbnail+json", + "resource": "/bundles/ezplatformadminui/img/ez-icons.svg#user_group", + "width": null, + "height": null, + "mimeType": "image/svg+xml" + } + }, + "ParentUserGroup": { + "_media-type": "application/vnd.ibexa.api.UserGroup+json", + "_href": "/api/ibexa/v2/user/groups/1/5" + }, + "Subgroups": { + "_media-type": "application/vnd.ibexa.api.UserGroupList+json", + "_href": "/api/ibexa/v2/user/groups/1/5/13/subgroups" + }, + "Users": { + "_media-type": "application/vnd.ibexa.api.UserList+json", + "_href": "/api/ibexa/v2/user/groups/1/5/13/users" + }, + "Roles": { + "_media-type": "application/vnd.ibexa.api.RoleAssignmentList+json", + "_href": "/api/ibexa/v2/user/groups/1/5/13/roles" + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/groups/path/GET/UserGroup.xml.example b/src/bundle/Resources/api_platform/examples/user/groups/path/GET/UserGroup.xml.example new file mode 100644 index 000000000..2145db50a --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/groups/path/GET/UserGroup.xml.example @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?> +<UserGroup media-type="application/vnd.ibexa.api.UserGroup+xml" href="/api/ibexa/v2/user/groups/1/5/13" id="12" remoteId="9b47a45624b023b1a76c73b74d704acf"> + <ContentType media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/3"/> + <name>Administrator users</name> + <Versions media-type="application/vnd.ibexa.api.VersionList+xml" href="/api/ibexa/v2/content/objects/12/versions"/> + <Section media-type="application/vnd.ibexa.api.Section+xml" href="/api/ibexa/v2/content/sections/2"/> + <MainLocation media-type="application/vnd.ibexa.api.Location+xml" href="/api/ibexa/v2/content/locations/1/5/13"/> + <Locations media-type="application/vnd.ibexa.api.LocationList+xml" href="/api/ibexa/v2/content/objects/12/locations"/> + <Owner media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <publishDate>2002-10-06T16:12:55+00:00</publishDate> + <lastModificationDate>2002-10-06T16:12:55+00:00</lastModificationDate> + <mainLanguageCode>eng-GB</mainLanguageCode> + <alwaysAvailable>true</alwaysAvailable> + <Version media-type="application/vnd.ibexa.api.Version+xml" href="/api/ibexa/v2/content/objects/12/versions/1"> + <VersionInfo> + <id>440</id> + <versionNo>1</versionNo> + <status>PUBLISHED</status> + <modificationDate>2002-10-06T16:12:55+00:00</modificationDate> + <Creator media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <creationDate>2002-10-06T16:12:40+00:00</creationDate> + <initialLanguageCode>eng-GB</initialLanguageCode> + <languageCodes>eng-GB</languageCodes> + <VersionTranslationInfo media-type="application/vnd.ibexa.api.VersionTranslationInfo+xml"> + <Language> + <languageCode>eng-GB</languageCode> + </Language> + </VersionTranslationInfo> + <names> + <value languageCode="eng-GB">Administrator users</value> + </names> + <Content media-type="application/vnd.ibexa.api.ContentInfo+xml" href="/api/ibexa/v2/content/objects/12"/> + </VersionInfo> + <Fields> + <field> + <id>24</id> + <fieldDefinitionIdentifier>name</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldTypeIdentifier>ezstring</fieldTypeIdentifier> + <fieldValue>Administrator users</fieldValue> + </field> + <field> + <id>25</id> + <fieldDefinitionIdentifier>description</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldTypeIdentifier>ezstring</fieldTypeIdentifier> + <fieldValue/> + </field> + </Fields> + <Relations media-type="application/vnd.ibexa.api.RelationList+xml" href="/api/ibexa/v2/content/objects/12/versions/1/relations"/> + <Thumbnail media-type="application/vnd.ibexa.api.Thumbnail+xml"> + <resource>/bundles/ezplatformadminui/img/ez-icons.svg#user_group</resource> + <width></width> + <height></height> + <mimeType>image/svg+xml</mimeType> + </Thumbnail> + </Version> + <ParentUserGroup media-type="application/vnd.ibexa.api.UserGroup+xml" href="/api/ibexa/v2/user/groups/1/5"/> + <Subgroups media-type="application/vnd.ibexa.api.UserGroupList+xml" href="/api/ibexa/v2/user/groups/1/5/13/subgroups"/> + <Users media-type="application/vnd.ibexa.api.UserList+xml" href="/api/ibexa/v2/user/groups/1/5/13/users"/> + <Roles media-type="application/vnd.ibexa.api.RoleAssignmentList+xml" href="/api/ibexa/v2/user/groups/1/5/13/roles"/> +</UserGroup> diff --git a/src/bundle/Resources/api_platform/examples/user/groups/path/PATCH/UserGroup.json.example b/src/bundle/Resources/api_platform/examples/user/groups/path/PATCH/UserGroup.json.example new file mode 100644 index 000000000..56f81323a --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/groups/path/PATCH/UserGroup.json.example @@ -0,0 +1,120 @@ +{ + "UserGroup": { + "_media-type": "application/vnd.ibexa.api.UserGroup+json", + "_href": "/api/ibexa/v2/user/groups/1/5/13", + "_id": 12, + "_remoteId": "9b47a45624b023b1a76c73b74d704acf", + "ContentType": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/3" + }, + "name": "Administrator users", + "Versions": { + "_media-type": "application/vnd.ibexa.api.VersionList+json", + "_href": "/api/ibexa/v2/content/objects/12/versions" + }, + "Section": { + "_media-type": "application/vnd.ibexa.api.Section+json", + "_href": "/api/ibexa/v2/content/sections/2" + }, + "MainLocation": { + "_media-type": "application/vnd.ibexa.api.Location+json", + "_href": "/api/ibexa/v2/content/locations/1/5/13" + }, + "Locations": { + "_media-type": "application/vnd.ibexa.api.LocationList+json", + "_href": "/api/ibexa/v2/content/objects/12/locations" + }, + "Owner": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "publishDate": "2002-10-06T16:12:55+00:00", + "lastModificationDate": "2002-10-06T16:12:55+00:00", + "mainLanguageCode": "eng-GB", + "alwaysAvailable": true, + "Version": { + "_media-type": "application/vnd.ibexa.api.Version+json", + "_href": "/api/ibexa/v2/content/objects/12/versions/1", + "VersionInfo": { + "id": 440, + "versionNo": 1, + "status": "PUBLISHED", + "modificationDate": "2002-10-06T16:12:55+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "creationDate": "2002-10-06T16:12:40+00:00", + "initialLanguageCode": "eng-GB", + "languageCodes": "eng-GB", + "VersionTranslationInfo": { + "_media-type": "application/vnd.ibexa.api.VersionTranslationInfo+json", + "Language": [ + { + "languageCode": "eng-GB" + } + ] + }, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Administrator users" + } + ] + }, + "Content": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/12" + } + }, + "Fields": { + "field": [ + { + "id": 24, + "fieldDefinitionIdentifier": "name", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezstring", + "fieldValue": "Administrator users" + }, + { + "id": 25, + "fieldDefinitionIdentifier": "description", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezstring", + "fieldValue": null + } + ] + }, + "Relations": { + "_media-type": "application/vnd.ibexa.api.RelationList+json", + "_href": "/api/ibexa/v2/content/objects/12/versions/1/relations", + "Relation": [] + }, + "Thumbnail": { + "_media-type": "application/vnd.ibexa.api.Thumbnail+json", + "resource": "/bundles/ezplatformadminui/img/ez-icons.svg#user_group", + "width": null, + "height": null, + "mimeType": "image/svg+xml" + } + }, + "ParentUserGroup": { + "_media-type": "application/vnd.ibexa.api.UserGroup+json", + "_href": "/api/ibexa/v2/user/groups/1/5" + }, + "Subgroups": { + "_media-type": "application/vnd.ibexa.api.UserGroupList+json", + "_href": "/api/ibexa/v2/user/groups/1/5/13/subgroups" + }, + "Users": { + "_media-type": "application/vnd.ibexa.api.UserList+json", + "_href": "/api/ibexa/v2/user/groups/1/5/13/users" + }, + "Roles": { + "_media-type": "application/vnd.ibexa.api.RoleAssignmentList+json", + "_href": "/api/ibexa/v2/user/groups/1/5/13/roles" + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/groups/path/PATCH/UserGroup.xml.example b/src/bundle/Resources/api_platform/examples/user/groups/path/PATCH/UserGroup.xml.example new file mode 100644 index 000000000..2145db50a --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/groups/path/PATCH/UserGroup.xml.example @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?> +<UserGroup media-type="application/vnd.ibexa.api.UserGroup+xml" href="/api/ibexa/v2/user/groups/1/5/13" id="12" remoteId="9b47a45624b023b1a76c73b74d704acf"> + <ContentType media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/3"/> + <name>Administrator users</name> + <Versions media-type="application/vnd.ibexa.api.VersionList+xml" href="/api/ibexa/v2/content/objects/12/versions"/> + <Section media-type="application/vnd.ibexa.api.Section+xml" href="/api/ibexa/v2/content/sections/2"/> + <MainLocation media-type="application/vnd.ibexa.api.Location+xml" href="/api/ibexa/v2/content/locations/1/5/13"/> + <Locations media-type="application/vnd.ibexa.api.LocationList+xml" href="/api/ibexa/v2/content/objects/12/locations"/> + <Owner media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <publishDate>2002-10-06T16:12:55+00:00</publishDate> + <lastModificationDate>2002-10-06T16:12:55+00:00</lastModificationDate> + <mainLanguageCode>eng-GB</mainLanguageCode> + <alwaysAvailable>true</alwaysAvailable> + <Version media-type="application/vnd.ibexa.api.Version+xml" href="/api/ibexa/v2/content/objects/12/versions/1"> + <VersionInfo> + <id>440</id> + <versionNo>1</versionNo> + <status>PUBLISHED</status> + <modificationDate>2002-10-06T16:12:55+00:00</modificationDate> + <Creator media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <creationDate>2002-10-06T16:12:40+00:00</creationDate> + <initialLanguageCode>eng-GB</initialLanguageCode> + <languageCodes>eng-GB</languageCodes> + <VersionTranslationInfo media-type="application/vnd.ibexa.api.VersionTranslationInfo+xml"> + <Language> + <languageCode>eng-GB</languageCode> + </Language> + </VersionTranslationInfo> + <names> + <value languageCode="eng-GB">Administrator users</value> + </names> + <Content media-type="application/vnd.ibexa.api.ContentInfo+xml" href="/api/ibexa/v2/content/objects/12"/> + </VersionInfo> + <Fields> + <field> + <id>24</id> + <fieldDefinitionIdentifier>name</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldTypeIdentifier>ezstring</fieldTypeIdentifier> + <fieldValue>Administrator users</fieldValue> + </field> + <field> + <id>25</id> + <fieldDefinitionIdentifier>description</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldTypeIdentifier>ezstring</fieldTypeIdentifier> + <fieldValue/> + </field> + </Fields> + <Relations media-type="application/vnd.ibexa.api.RelationList+xml" href="/api/ibexa/v2/content/objects/12/versions/1/relations"/> + <Thumbnail media-type="application/vnd.ibexa.api.Thumbnail+xml"> + <resource>/bundles/ezplatformadminui/img/ez-icons.svg#user_group</resource> + <width></width> + <height></height> + <mimeType>image/svg+xml</mimeType> + </Thumbnail> + </Version> + <ParentUserGroup media-type="application/vnd.ibexa.api.UserGroup+xml" href="/api/ibexa/v2/user/groups/1/5"/> + <Subgroups media-type="application/vnd.ibexa.api.UserGroupList+xml" href="/api/ibexa/v2/user/groups/1/5/13/subgroups"/> + <Users media-type="application/vnd.ibexa.api.UserList+xml" href="/api/ibexa/v2/user/groups/1/5/13/users"/> + <Roles media-type="application/vnd.ibexa.api.RoleAssignmentList+xml" href="/api/ibexa/v2/user/groups/1/5/13/roles"/> +</UserGroup> diff --git a/src/bundle/Resources/api_platform/examples/user/groups/path/PATCH/UserGroupUpdate.json.example b/src/bundle/Resources/api_platform/examples/user/groups/path/PATCH/UserGroupUpdate.json.example new file mode 100644 index 000000000..270526545 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/groups/path/PATCH/UserGroupUpdate.json.example @@ -0,0 +1,7 @@ +{ + "UserGroupUpdate":{ + "Section": { + "_href": "/api/ibexa/v2/content/sections/2" + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/groups/path/PATCH/UserGroupUpdate.xml.example b/src/bundle/Resources/api_platform/examples/user/groups/path/PATCH/UserGroupUpdate.xml.example new file mode 100644 index 000000000..1cda91de1 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/groups/path/PATCH/UserGroupUpdate.xml.example @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<UserGroupUpdate> + <Section href="/api/ibexa/v2/content/sections/2" /> +</UserGroupUpdate> diff --git a/src/bundle/Resources/api_platform/examples/user/groups/path/roles/GET/RoleAssigmentList.json.example b/src/bundle/Resources/api_platform/examples/user/groups/path/roles/GET/RoleAssigmentList.json.example new file mode 100644 index 000000000..2a429ff57 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/groups/path/roles/GET/RoleAssigmentList.json.example @@ -0,0 +1,10 @@ +{ + "RoleAssignment": { + "_media-type": "application/vnd.ibexa.api.RoleAssignment+json", + "_href": "/api/ibexa/v2/user/groups/1/42/44/roles/1", + "Role": { + "_media-type": "application/vnd.ibexa.api.Role+json", + "_href": "/api/ibexa/v2/user/roles/1" + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/groups/path/roles/GET/RoleAssignmentList.xml.example b/src/bundle/Resources/api_platform/examples/user/groups/path/roles/GET/RoleAssignmentList.xml.example new file mode 100644 index 000000000..4441ea6dd --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/groups/path/roles/GET/RoleAssignmentList.xml.example @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<RoleAssignment media-type="application/vnd.ibexa.api.RoleAssignment+xml" href="/api/ibexa/v2/user/groups/1/42/44/roles/1"> + <Role media-type="application/vnd.ibexa.api.Role+xml" href="/api/ibexa/v2/user/roles/1"/> +</RoleAssignment> diff --git a/src/bundle/Resources/api_platform/examples/user/groups/path/roles/POST/RoleAssignInput.json.example b/src/bundle/Resources/api_platform/examples/user/groups/path/roles/POST/RoleAssignInput.json.example new file mode 100644 index 000000000..027f2d71b --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/groups/path/roles/POST/RoleAssignInput.json.example @@ -0,0 +1,23 @@ +{ + "RoleAssignInput": { + "Role": { + "_href": "/api/ibexa/v2/user/roles/2", + "_media-type": "application/vnd.ibexa.api.RoleAssignInput+json" + }, + "limitation": { + "_identifier": "Section", + "values": { + "ref": [ + { + "_href": "/api/ibexa/v2/content/sections/1", + "_media-type": "application/vnd.ibexa.api.Section+json" + }, + { + "_href": "/api/ibexa/v2/content/sections/4", + "_media-type": "application/vnd.ibexa.api.Section+json" + } + ] + } + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/groups/path/roles/POST/RoleAssignInput.xml.example b/src/bundle/Resources/api_platform/examples/user/groups/path/roles/POST/RoleAssignInput.xml.example new file mode 100644 index 000000000..ddaefdad1 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/groups/path/roles/POST/RoleAssignInput.xml.example @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<RoleAssignInput> + <Role href="/api/ibexa/v2/user/roles/10" media-type="application/vnd.ibexa.api.RoleAssignInput+xml"/> + <limitation identifier="Section"> + <values> + <ref href="/api/ibexa/v2/content/sections/1" media-type="application/vnd.ibexa.api.Section+xml" /> + <ref href="/api/ibexa/v2/content/sections/4" media-type="application/vnd.ibexa.api.Section+xml" /> + </values> + </limitation> +</RoleAssignInput> diff --git a/src/bundle/Resources/api_platform/examples/user/groups/path/roles/POST/RoleAssignmentList.json.example b/src/bundle/Resources/api_platform/examples/user/groups/path/roles/POST/RoleAssignmentList.json.example new file mode 100644 index 000000000..4be381050 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/groups/path/roles/POST/RoleAssignmentList.json.example @@ -0,0 +1,16 @@ +{ + "RoleAssignmentList": { + "_media-type": "application/vnd.ibexa.api.RoleAssignmentList+json", + "_href": "/api/ibexa/v2/user/groups/1/12/2/roles", + "RoleAssignment": [ + { + "_media-type": "application/vnd.ibexa.api.RoleAssignment+json", + "_href": "/api/ibexa/v2/user/groups/1/12/2/roles/2", + "Role": { + "_media-type": "application/vnd.ibexa.api.Role+json", + "_href": "/api/ibexa/v2/user/roles/2" + } + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/groups/path/roles/POST/RoleAssignmentList.xml.example b/src/bundle/Resources/api_platform/examples/user/groups/path/roles/POST/RoleAssignmentList.xml.example new file mode 100644 index 000000000..28f7279ec --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/groups/path/roles/POST/RoleAssignmentList.xml.example @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<RoleAssignmentList media-type="application/vnd.ibexa.api.RoleAssignmentList+xml" href="/api/ibexa/v2/user/groups/1/5/65/roles"> +<RoleAssignment media-type="application/vnd.ibexa.api.RoleAssignment+xml" href="/api/ibexa/v2/user/groups/1/5/65/roles/3"> + <limitation identifier="Section"> + <values> + <ref media-type="application/vnd.ibexa.api.ref+xml" href="1"/> + </values> + </limitation> + <Role media-type="application/vnd.ibexa.api.Role+xml" href="/api/ibexa/v2/user/roles/3"/> +</RoleAssignment> +<RoleAssignment media-type="application/vnd.ibexa.api.RoleAssignment+xml" href="/api/ibexa/v2/user/groups/1/5/65/roles/10"> + <limitation identifier="Section"> + <values> + <ref media-type="application/vnd.ibexa.api.ref+xml" href="1"/> + </values> + </limitation> + <Role media-type="application/vnd.ibexa.api.Role+xml" href="/api/ibexa/v2/user/roles/10"/> +</RoleAssignment> +<RoleAssignment media-type="application/vnd.ibexa.api.RoleAssignment+xml" href="/api/ibexa/v2/user/groups/1/5/65/roles/10"> + <limitation identifier="Section"> + <values> + <ref media-type="application/vnd.ibexa.api.ref+xml" href="4"/> + </values> + </limitation> + <Role media-type="application/vnd.ibexa.api.Role+xml" href="/api/ibexa/v2/user/roles/10"/> +</RoleAssignment> +</RoleAssignmentList> diff --git a/src/bundle/Resources/api_platform/examples/user/groups/path/roles/role_id/DELETE/RoleAssignmentList.json.example b/src/bundle/Resources/api_platform/examples/user/groups/path/roles/role_id/DELETE/RoleAssignmentList.json.example new file mode 100644 index 000000000..98d139c12 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/groups/path/roles/role_id/DELETE/RoleAssignmentList.json.example @@ -0,0 +1,27 @@ +{ + "RoleAssignmentList": { + "_media-type": "application/vnd.ibexa.api.RoleAssignmentList+json", + "_href": "/api/ibexa/v2/user/groups/1/57/58/roles", + "RoleAssignment": [ + { + "_media-type": "application/vnd.ibexa.api.RoleAssignment+json", + "_href": "/api/ibexa/v2/user/groups/1/57/58/roles/3", + "limitation": { + "_identifier": "Section", + "values": { + "ref": [ + { + "_media-type": "application/vnd.ibexa.api.ref+json", + "_href": "1" + } + ] + } + }, + "Role": { + "_media-type": "application/vnd.ibexa.api.Role+json", + "_href": "/api/ibexa/v2/user/roles/3" + } + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/groups/path/roles/role_id/DELETE/RoleAssignmentList.xml.example b/src/bundle/Resources/api_platform/examples/user/groups/path/roles/role_id/DELETE/RoleAssignmentList.xml.example new file mode 100644 index 000000000..5c7da74a6 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/groups/path/roles/role_id/DELETE/RoleAssignmentList.xml.example @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<RoleAssignmentList media-type="application/vnd.ibexa.api.RoleAssignmentList+xml" href="/api/ibexa/v2/user/groups/1/5/65/roles"> +<RoleAssignment media-type="application/vnd.ibexa.api.RoleAssignment+xml" href="/api/ibexa/v2/user/groups/1/5/65/roles/3"> + <limitation identifier="Section"> + <values> + <ref media-type="application/vnd.ibexa.api.ref+xml" href="1"/> + </values> + </limitation> + <Role media-type="application/vnd.ibexa.api.Role+xml" href="/api/ibexa/v2/user/roles/3"/> +</RoleAssignment> +</RoleAssignmentList> diff --git a/src/bundle/Resources/api_platform/examples/user/groups/path/roles/role_id/GET/RoleAssignment.json.example b/src/bundle/Resources/api_platform/examples/user/groups/path/roles/role_id/GET/RoleAssignment.json.example new file mode 100644 index 000000000..3db7d95a4 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/groups/path/roles/role_id/GET/RoleAssignment.json.example @@ -0,0 +1,10 @@ +{ + "RoleAssignment": { + "_media-type": "application/vnd.ibexa.api.RoleAssignment+json", + "_href": "/api/ibexa/v2/user/groups/1/11/12/roles/1", + "Role": { + "_media-type": "application/vnd.ibexa.api.Role+json", + "_href": "/api/ibexa/v2/user/roles/1" + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/groups/path/roles/role_id/GET/RoleAssignment.xml.example b/src/bundle/Resources/api_platform/examples/user/groups/path/roles/role_id/GET/RoleAssignment.xml.example new file mode 100644 index 000000000..367622000 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/groups/path/roles/role_id/GET/RoleAssignment.xml.example @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<RoleAssignment media-type="application/vnd.ibexa.api.RoleAssignment+xml" href="/api/ibexa/v2/user/groups/1/11/12/roles/1"> + <Role media-type="application/vnd.ibexa.api.Role+xml" href="/api/ibexa/v2/user/roles/1"/> +</RoleAssignment> diff --git a/src/bundle/Resources/api_platform/examples/user/groups/path/subgroups/POST/UserGroup.json.example b/src/bundle/Resources/api_platform/examples/user/groups/path/subgroups/POST/UserGroup.json.example new file mode 100644 index 000000000..ffa7a38f4 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/groups/path/subgroups/POST/UserGroup.json.example @@ -0,0 +1,120 @@ +{ + "UserGroup": { + "_media-type": "application/vnd.ibexa.api.UserGroup+json", + "_href": "/api/ibexa/v2/user/groups/1/5/81", + "_id": 87, + "_remoteId": "remoteId-qwert098", + "ContentType": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/3" + }, + "name": "UserGroup2", + "Versions": { + "_media-type": "application/vnd.ibexa.api.VersionList+json", + "_href": "/api/ibexa/v2/content/objects/87/versions" + }, + "Section": { + "_media-type": "application/vnd.ibexa.api.Section+json", + "_href": "/api/ibexa/v2/content/sections/2" + }, + "MainLocation": { + "_media-type": "application/vnd.ibexa.api.Location+json", + "_href": "/api/ibexa/v2/content/locations/1/5/81" + }, + "Locations": { + "_media-type": "application/vnd.ibexa.api.LocationList+json", + "_href": "/api/ibexa/v2/content/objects/87/locations" + }, + "Owner": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "publishDate": "2021-08-09T09:06:49+00:00", + "lastModificationDate": "2021-08-09T09:06:49+00:00", + "mainLanguageCode": "eng-GB", + "alwaysAvailable": true, + "Version": { + "_media-type": "application/vnd.ibexa.api.Version+json", + "_href": "/api/ibexa/v2/content/objects/87/versions/1", + "VersionInfo": { + "id": 578, + "versionNo": 1, + "status": "PUBLISHED", + "modificationDate": "2021-08-09T09:06:49+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "creationDate": "2021-08-09T09:06:49+00:00", + "initialLanguageCode": "eng-GB", + "languageCodes": "eng-GB", + "VersionTranslationInfo": { + "_media-type": "application/vnd.ibexa.api.VersionTranslationInfo+json", + "Language": [ + { + "languageCode": "eng-GB" + } + ] + }, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "UserGroup2" + } + ] + }, + "Content": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/87" + } + }, + "Fields": { + "field": [ + { + "id": 384, + "fieldDefinitionIdentifier": "name", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezstring", + "fieldValue": "UserGroup2" + }, + { + "id": 385, + "fieldDefinitionIdentifier": "description", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezstring", + "fieldValue": "This is the description of the user group" + } + ] + }, + "Relations": { + "_media-type": "application/vnd.ibexa.api.RelationList+json", + "_href": "/api/ibexa/v2/content/objects/87/versions/1/relations", + "Relation": [] + }, + "Thumbnail": { + "_media-type": "application/vnd.ibexa.api.Thumbnail+json", + "resource": "/bundles/ezplatformadminui/img/ez-icons.svg#user_group", + "width": null, + "height": null, + "mimeType": "image/svg+xml" + } + }, + "ParentUserGroup": { + "_media-type": "application/vnd.ibexa.api.UserGroup+json", + "_href": "/api/ibexa/v2/user/groups/1/5" + }, + "Subgroups": { + "_media-type": "application/vnd.ibexa.api.UserGroupList+json", + "_href": "/api/ibexa/v2/user/groups/1/5/81/subgroups" + }, + "Users": { + "_media-type": "application/vnd.ibexa.api.UserList+json", + "_href": "/api/ibexa/v2/user/groups/1/5/81/users" + }, + "Roles": { + "_media-type": "application/vnd.ibexa.api.RoleAssignmentList+json", + "_href": "/api/ibexa/v2/user/groups/1/5/81/roles" + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/groups/path/subgroups/POST/UserGroup.xml.example b/src/bundle/Resources/api_platform/examples/user/groups/path/subgroups/POST/UserGroup.xml.example new file mode 100644 index 000000000..7f182f8de --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/groups/path/subgroups/POST/UserGroup.xml.example @@ -0,0 +1,62 @@ +<?xml version="1.0" encoding="UTF-8"?> +<UserGroup media-type="application/vnd.ibexa.api.UserGroup+xml" href="/api/ibexa/v2/user/groups/1/5/79" id="85" remoteId="remoteId-qwert098"> + <ContentType media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/3"/> + <name>UserGroup2</name> + <Versions media-type="application/vnd.ibexa.api.VersionList+xml" href="/api/ibexa/v2/content/objects/85/versions"/> + <Section media-type="application/vnd.ibexa.api.Section+xml" href="/api/ibexa/v2/content/sections/2"/> + <MainLocation media-type="application/vnd.ibexa.api.Location+xml" href="/api/ibexa/v2/content/locations/1/5/79"/> + <Locations media-type="application/vnd.ibexa.api.LocationList+xml" href="/api/ibexa/v2/content/objects/85/locations"/> + <Owner media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <publishDate>2021-08-09T09:03:35+00:00</publishDate> + <lastModificationDate>2021-08-09T09:03:35+00:00</lastModificationDate> + <mainLanguageCode>eng-GB</mainLanguageCode> + <alwaysAvailable>true</alwaysAvailable> + <Version media-type="application/vnd.ibexa.api.Version+xml" href="/api/ibexa/v2/content/objects/85/versions/1"> + <VersionInfo> + <id>576</id> + <versionNo>1</versionNo> + <status>PUBLISHED</status> + <modificationDate>2021-08-09T09:03:35+00:00</modificationDate> + <Creator media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <creationDate>2021-08-09T09:03:35+00:00</creationDate> + <initialLanguageCode>eng-GB</initialLanguageCode> + <languageCodes>eng-GB</languageCodes> + <VersionTranslationInfo media-type="application/vnd.ibexa.api.VersionTranslationInfo+xml"> + <Language> + <languageCode>eng-GB</languageCode> + </Language> + </VersionTranslationInfo> + <names> + <value languageCode="eng-GB">UserGroup2</value> + </names> + <Content media-type="application/vnd.ibexa.api.ContentInfo+xml" href="/api/ibexa/v2/content/objects/85"/> + </VersionInfo> + <Fields> + <field> + <id>380</id> + <fieldDefinitionIdentifier>name</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldTypeIdentifier>ezstring</fieldTypeIdentifier> + <fieldValue>UserGroup2</fieldValue> + </field> + <field> + <id>381</id> + <fieldDefinitionIdentifier>description</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldTypeIdentifier>ezstring</fieldTypeIdentifier> + <fieldValue>This is the description of the user group</fieldValue> + </field> + </Fields> + <Relations media-type="application/vnd.ibexa.api.RelationList+xml" href="/api/ibexa/v2/content/objects/85/versions/1/relations"/> + <Thumbnail media-type="application/vnd.ibexa.api.Thumbnail+xml"> + <resource>/bundles/ezplatformadminui/img/ez-icons.svg#user_group</resource> + <width></width> + <height></height> + <mimeType>image/svg+xml</mimeType> + </Thumbnail> + </Version> + <ParentUserGroup media-type="application/vnd.ibexa.api.UserGroup+xml" href="/api/ibexa/v2/user/groups/1/5"/> + <Subgroups media-type="application/vnd.ibexa.api.UserGroupList+xml" href="/api/ibexa/v2/user/groups/1/5/79/subgroups"/> + <Users media-type="application/vnd.ibexa.api.UserList+xml" href="/api/ibexa/v2/user/groups/1/5/79/users"/> + <Roles media-type="application/vnd.ibexa.api.RoleAssignmentList+xml" href="/api/ibexa/v2/user/groups/1/5/79/roles"/> +</UserGroup> diff --git a/src/bundle/Resources/api_platform/examples/user/groups/path/subgroups/POST/UserGroupCreate.json.example b/src/bundle/Resources/api_platform/examples/user/groups/path/subgroups/POST/UserGroupCreate.json.example new file mode 100644 index 000000000..876e65bdf --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/groups/path/subgroups/POST/UserGroupCreate.json.example @@ -0,0 +1,20 @@ +{ + "UserGroupCreate": { + "mainLanguageCode": "eng-GB", + "remoteId": "remoteId-qwert098", + "fields": { + "field": [ + { + "fieldDefinitionIdentifier": "name", + "languageCode": "eng-GB", + "fieldValue": "UserGroup2" + }, + { + "fieldDefinitionIdentifier": "description", + "languageCode": "eng-GB", + "fieldValue": "This is the description of the user group" + } + ] + } + } +} \ No newline at end of file diff --git a/src/bundle/Resources/api_platform/examples/user/groups/path/subgroups/POST/UserGroupCreate.xml.example b/src/bundle/Resources/api_platform/examples/user/groups/path/subgroups/POST/UserGroupCreate.xml.example new file mode 100644 index 000000000..2ae0b4aaa --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/groups/path/subgroups/POST/UserGroupCreate.xml.example @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<UserGroupCreate> + <mainLanguageCode>eng-GB</mainLanguageCode> + <remoteId>remoteId-qwert098</remoteId> + <fields> + <field> + <fieldDefinitionIdentifier>name</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldValue>UserGroup</fieldValue> + </field> + <field> + <fieldDefinitionIdentifier>description</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldValue>This is the description of the user group</fieldValue> + </field> + </fields> +</UserGroupCreate> \ No newline at end of file diff --git a/src/bundle/Resources/api_platform/examples/user/groups/path/users/POST/User.json.example b/src/bundle/Resources/api_platform/examples/user/groups/path/users/POST/User.json.example new file mode 100644 index 000000000..c0866de65 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/groups/path/users/POST/User.json.example @@ -0,0 +1,149 @@ +{ + "User": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/57", + "_id": 57, + "_remoteId": "remoteId-qwert426", + "ContentType": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/4" + }, + "name": "Yura Rajzer", + "Versions": { + "_media-type": "application/vnd.ibexa.api.VersionList+json", + "_href": "/api/ibexa/v2/content/objects/57/versions" + }, + "Section": { + "_media-type": "application/vnd.ibexa.api.Section+json", + "_href": "/api/ibexa/v2/content/sections/2" + }, + "MainLocation": { + "_media-type": "application/vnd.ibexa.api.Location+json", + "_href": "/api/ibexa/v2/content/locations/1/5/13/58" + }, + "Locations": { + "_media-type": "application/vnd.ibexa.api.LocationList+json", + "_href": "/api/ibexa/v2/content/objects/57/locations" + }, + "Groups": { + "_media-type": "application/vnd.ibexa.api.UserGroupRefList+json", + "_href": "/api/ibexa/v2/user/users/57/groups" + }, + "Owner": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "publishDate": "2021-08-11T13:52:13+00:00", + "lastModificationDate": "2021-08-11T13:52:13+00:00", + "mainLanguageCode": "eng-GB", + "alwaysAvailable": true, + "Version": { + "_media-type": "application/vnd.ibexa.api.Version+json", + "_href": "/api/ibexa/v2/content/objects/57/versions/1", + "VersionInfo": { + "id": 517, + "versionNo": 1, + "status": "PUBLISHED", + "modificationDate": "2021-08-11T13:52:13+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "creationDate": "2021-08-11T13:52:13+00:00", + "initialLanguageCode": "eng-GB", + "languageCodes": "eng-GB", + "VersionTranslationInfo": { + "_media-type": "application/vnd.ibexa.api.VersionTranslationInfo+json", + "Language": [ + { + "languageCode": "eng-GB" + } + ] + }, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Yura Rajzer" + } + ] + }, + "Content": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/57" + } + }, + "Fields": { + "field": [ + { + "id": 262, + "fieldDefinitionIdentifier": "first_name", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezstring", + "fieldValue": "Yura" + }, + { + "id": 263, + "fieldDefinitionIdentifier": "last_name", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezstring", + "fieldValue": "Rajzer" + }, + { + "id": 264, + "fieldDefinitionIdentifier": "user_account", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezuser", + "fieldValue": { + "hasStoredLogin": true, + "contentId": 57, + "login": "yura", + "email": "yurarajzer@example.net", + "passwordUpdatedAt": 1628689933, + "enabled": true, + "maxLogin": 0, + "plainPassword": null + } + }, + { + "id": 265, + "fieldDefinitionIdentifier": "signature", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "eztext", + "fieldValue": null + }, + { + "id": 266, + "fieldDefinitionIdentifier": "image", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezimage", + "fieldValue": null + } + ] + }, + "Relations": { + "_media-type": "application/vnd.ibexa.api.RelationList+json", + "_href": "/api/ibexa/v2/content/objects/57/versions/1/relations", + "Relation": [] + }, + "Thumbnail": { + "_media-type": "application/vnd.ibexa.api.Thumbnail+json", + "resource": "/bundles/ezplatformadminui/img/ez-icons.svg#user", + "width": null, + "height": null, + "mimeType": "image/svg+xml" + } + }, + "login": "yura", + "email": "yurarajzer@example.net", + "enabled": true, + "UserGroups": { + "_media-type": "application/vnd.ibexa.api.UserGroupList+json", + "_href": "/api/ibexa/v2/user/users/57/groups" + }, + "Roles": { + "_media-type": "application/vnd.ibexa.api.RoleAssignmentList+json", + "_href": "/api/ibexa/v2/user/users/57/roles" + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/groups/path/users/POST/User.xml.example b/src/bundle/Resources/api_platform/examples/user/groups/path/users/POST/User.xml.example new file mode 100644 index 000000000..bbe48cbe9 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/groups/path/users/POST/User.xml.example @@ -0,0 +1,86 @@ +<?xml version="1.0" encoding="UTF-8"?> +<User media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/59" id="59" remoteId="remoteId-qwert426"> +<ContentType media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/4"/> +<name>Yura Rajzer</name> +<Versions media-type="application/vnd.ibexa.api.VersionList+xml" href="/api/ibexa/v2/content/objects/59/versions"/> +<Section media-type="application/vnd.ibexa.api.Section+xml" href="/api/ibexa/v2/content/sections/2"/> +<MainLocation media-type="application/vnd.ibexa.api.Location+xml" href="/api/ibexa/v2/content/locations/1/5/65/67"/> +<Locations media-type="application/vnd.ibexa.api.LocationList+xml" href="/api/ibexa/v2/content/objects/59/locations"/> +<Groups media-type="application/vnd.ibexa.api.UserGroupRefList+xml" href="/api/ibexa/v2/user/users/59/groups"/> +<Owner media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> +<publishDate>2019-02-27T11:23:42+01:00</publishDate> +<lastModificationDate>2019-02-27T11:23:42+01:00</lastModificationDate> +<mainLanguageCode>eng-GB</mainLanguageCode> +<alwaysAvailable>true</alwaysAvailable> +<Version media-type="application/vnd.ibexa.api.Version+xml" href="/api/ibexa/v2/content/objects/59/versions/1"> + <VersionInfo> + <id>515</id> + <versionNo>1</versionNo> + <status>PUBLISHED</status> + <modificationDate>2019-02-27T11:23:42+01:00</modificationDate> + <Creator media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <creationDate>2019-02-27T11:23:42+01:00</creationDate> + <initialLanguageCode>eng-GB</initialLanguageCode> + <languageCodes>eng-GB</languageCodes> + <VersionTranslationInfo media-type="application/vnd.ibexa.api.VersionTranslationInfo+xml"> + <Language> + <languageCode>eng-GB</languageCode> + </Language> + </VersionTranslationInfo> + <names> + <value languageCode="eng-GB">Yura Rajzer</value> + </names> + <Content media-type="application/vnd.ibexa.api.ContentInfo+xml" href="/api/ibexa/v2/content/objects/59"/> + </VersionInfo> + <Fields> + <field> + <id>207</id> + <fieldDefinitionIdentifier>first_name</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldTypeIdentifier>ezstring</fieldTypeIdentifier> + <fieldValue>Yura</fieldValue> + </field> + <field> + <id>208</id> + <fieldDefinitionIdentifier>last_name</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldTypeIdentifier>ezstring</fieldTypeIdentifier> + <fieldValue>Rajzer</fieldValue> + </field> + <field> + <id>209</id> + <fieldDefinitionIdentifier>user_account</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldTypeIdentifier>ezuser</fieldTypeIdentifier> + <fieldValue> + <value key="hasStoredLogin">true</value> + <value key="contentId">59</value> + <value key="login">yura</value> + <value key="email">yurarajzer@example.net</value> + <value key="enabled">true</value> + <value key="maxLogin">0</value> + </fieldValue> + </field> + <field> + <id>210</id> + <fieldDefinitionIdentifier>signature</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldTypeIdentifier>eztext</fieldTypeIdentifier> + <fieldValue/> + </field> + <field> + <id>211</id> + <fieldDefinitionIdentifier>image</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldTypeIdentifier>ezimage</fieldTypeIdentifier> + <fieldValue/> + </field> + </Fields> + <Relations media-type="application/vnd.ibexa.api.RelationList+xml" href="/api/ibexa/v2/content/objects/59/versions/1/relations"/> +</Version> +<login>yura</login> +<email>yurarajzer@example.net</email> +<enabled>true</enabled> +<UserGroups media-type="application/vnd.ibexa.api.UserGroupList+xml" href="/api/ibexa/v2/user/users/59/groups"/> +<Roles media-type="application/vnd.ibexa.api.RoleAssignmentList+xml" href="/api/ibexa/v2/user/users/59/roles"/> +</User> diff --git a/src/bundle/Resources/api_platform/examples/user/groups/path/users/POST/UserCreate.json.example b/src/bundle/Resources/api_platform/examples/user/groups/path/users/POST/UserCreate.json.example new file mode 100644 index 000000000..d403e5324 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/groups/path/users/POST/UserCreate.json.example @@ -0,0 +1,35 @@ +{ + "UserCreate": { + "mainLanguageCode": "eng-GB", + "remoteId": "remoteId-23456789", + "login": "johnsmith2", + "email": "example@example.com", + "password": "Secrepassword5!", + "fields": { + "field": [ + { + "fieldDefinitionIdentifier": "first_name", + "languageCode": "eng-GB", + "fieldValue": "John" + }, + { + "fieldDefinitionIdentifier": "last_name", + "languageCode": "eng-GB", + "fieldValue": "Smith" + }, + { + "fieldDefinitionIdentifier": "user_account", + "languageCode": "eng-GB", + "fieldValue": { + "hasStoredLogin": true, + "contentId": 14, + "login": "johnsmith", + "email": "example@example.com", + "enabled": true, + "maxLogin": 10 + } + } + ] + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/groups/path/users/POST/UserCreate.xml.example b/src/bundle/Resources/api_platform/examples/user/groups/path/users/POST/UserCreate.xml.example new file mode 100644 index 000000000..1c281381e --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/groups/path/users/POST/UserCreate.xml.example @@ -0,0 +1,32 @@ +<?xml version="1.0" encoding="UTF-8"?> +<UserCreate> + <mainLanguageCode>eng-GB</mainLanguageCode> + <remoteId>remoteId-23456789</remoteId> + <login>johnsmith</login> + <email>example@example.com</email> + <password>Secrepassword5!</password> + <fields> + <field> + <fieldDefinitionIdentifier>first_name</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldValue>John</fieldValue> + </field> + <field> + <fieldDefinitionIdentifier>last_name</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldValue>Smith</fieldValue> + </field> + <field> + <fieldDefinitionIdentifier>user_account</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldValue> + <value key="hasStoredLogin">true</value> + <value key="contentId">14</value> + <value key="login">johnsmith</value> + <value key="email">example@example.com</value> + <value key="enabled">true</value> + <value key="maxLogin">10</value> + </fieldValue> + </field> + </fields> +</UserCreate> diff --git a/src/bundle/Resources/api_platform/examples/user/policies/GET/PolicyList.json.example b/src/bundle/Resources/api_platform/examples/user/policies/GET/PolicyList.json.example new file mode 100644 index 000000000..05f6b541d --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/policies/GET/PolicyList.json.example @@ -0,0 +1,104 @@ +{ + "PolicyList": { + "_media-type": "application/vnd.ibexa.api.PolicyList+json", + "_href": "/api/ibexa/v2/user/policies", + "Policy": [ + { + "_media-type": "application/vnd.ibexa.api.Policy+json", + "_href": "/api/ibexa/v2/user/roles/1/policies/349", + "id": 349, + "module": "content", + "function": "read", + "limitations": { + "limitation": [ + { + "_identifier": "Section", + "values": { + "ref": [ + { + "_media-type": "application/vnd.ibexa.api.ref+json", + "_href": "1" + }, + { + "_media-type": "application/vnd.ibexa.api.ref+json", + "_href": "3" + }, + { + "_media-type": "application/vnd.ibexa.api.ref+json", + "_href": "6" + } + ] + } + } + ] + } + }, + { + "_media-type": "application/vnd.ibexa.api.Policy+json", + "_href": "/api/ibexa/v2/user/roles/1/policies/350", + "id": 350, + "module": "user", + "function": "login", + "limitations": { + "limitation": [ + { + "_identifier": "SiteAccess", + "values": { + "ref": [ + { + "_media-type": "application/vnd.ibexa.api.ref+json", + "_href": "2282622326" + }, + { + "_media-type": "application/vnd.ibexa.api.ref+json", + "_href": "1766001124" + } + ] + } + } + ] + } + }, + { + "_media-type": "application/vnd.ibexa.api.Policy+json", + "_href": "/api/ibexa/v2/user/roles/1/policies/351", + "id": 351, + "module": "content", + "function": "view_embed", + "limitations": { + "limitation": [ + { + "_identifier": "Class", + "values": { + "ref": [ + { + "_media-type": "application/vnd.ibexa.api.ref+json", + "_href": "5" + }, + { + "_media-type": "application/vnd.ibexa.api.ref+json", + "_href": "12" + } + ] + } + } + ] + } + }, + { + "_media-type": "application/vnd.ibexa.api.Policy+json", + "_href": "/api/ibexa/v2/user/roles/1/policies/352", + "id": 352, + "module": "user", + "function": "register" + }, + { + "_media-type": "application/vnd.ibexa.api.Policy+json", + "_href": "/api/ibexa/v2/user/roles/1/policies/353", + "id": 353, + "module": "user", + "function": "password" + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/policies/GET/PolicyList.xml.example b/src/bundle/Resources/api_platform/examples/user/policies/GET/PolicyList.xml.example new file mode 100644 index 000000000..6f546c316 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/policies/GET/PolicyList.xml.example @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?> +<PolicyList media-type="application/vnd.ibexa.api.PolicyList+xml" href="/api/ibexa/v2/user/policies"> + <Policy media-type="application/vnd.ibexa.api.Policy+xml" href="/api/ibexa/v2/user/roles/1/policies/349"> + <id>349</id> + <module>content</module> + <function>read</function> + <limitations> + <limitation identifier="Section"> + <values> + <ref media-type="application/vnd.ibexa.api.ref+xml" href="1"/> + <ref media-type="application/vnd.ibexa.api.ref+xml" href="3"/> + <ref media-type="application/vnd.ibexa.api.ref+xml" href="6"/> + </values> + </limitation> + </limitations> + </Policy> + <Policy media-type="application/vnd.ibexa.api.Policy+xml" href="/api/ibexa/v2/user/roles/1/policies/350"> + <id>350</id> + <module>user</module> + <function>login</function> + <limitations> + <limitation identifier="SiteAccess"> + <values> + <ref media-type="application/vnd.ibexa.api.ref+xml" href="2282622326"/> + <ref media-type="application/vnd.ibexa.api.ref+xml" href="1766001124"/> + </values> + </limitation> + </limitations> + </Policy> + <Policy media-type="application/vnd.ibexa.api.Policy+xml" href="/api/ibexa/v2/user/roles/1/policies/351"> + <id>351</id> + <module>content</module> + <function>view_embed</function> + <limitations> + <limitation identifier="Class"> + <values> + <ref media-type="application/vnd.ibexa.api.ref+xml" href="5"/> + <ref media-type="application/vnd.ibexa.api.ref+xml" href="12"/> + </values> + </limitation> + </limitations> + </Policy> + <Policy media-type="application/vnd.ibexa.api.Policy+xml" href="/api/ibexa/v2/user/roles/1/policies/352"> + <id>352</id> + <module>user</module> + <function>register</function> + </Policy> + <Policy media-type="application/vnd.ibexa.api.Policy+xml" href="/api/ibexa/v2/user/roles/1/policies/353"> + <id>353</id> + <module>user</module> + <function>password</function> + </Policy> +</PolicyList> diff --git a/src/bundle/Resources/api_platform/examples/user/roles/GET/RoleList.json.example b/src/bundle/Resources/api_platform/examples/user/roles/GET/RoleList.json.example new file mode 100644 index 000000000..6cdbc21f2 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/roles/GET/RoleList.json.example @@ -0,0 +1,71 @@ +{ + "RoleList": { + "_media-type": "application/vnd.ibexa.api.RoleList+json", + "_href": "/api/ibexa/v2/user/roles", + "Role": [ + { + "_media-type": "application/vnd.ibexa.api.Role+json", + "_href": "/api/ibexa/v2/user/roles/1", + "identifier": "Anonymous", + "Policies": { + "_media-type": "application/vnd.ibexa.api.PolicyList+json", + "_href": "/api/ibexa/v2/user/roles/1/policies" + } + }, + { + "_media-type": "application/vnd.ibexa.api.Role+json", + "_href": "/api/ibexa/v2/user/roles/2", + "identifier": "Administrator", + "Policies": { + "_media-type": "application/vnd.ibexa.api.PolicyList+json", + "_href": "/api/ibexa/v2/user/roles/2/policies" + } + }, + { + "_media-type": "application/vnd.ibexa.api.Role+json", + "_href": "/api/ibexa/v2/user/roles/3", + "identifier": "Editor", + "Policies": { + "_media-type": "application/vnd.ibexa.api.PolicyList+json", + "_href": "/api/ibexa/v2/user/roles/3/policies" + } + }, + { + "_media-type": "application/vnd.ibexa.api.Role+json", + "_href": "/api/ibexa/v2/user/roles/4", + "identifier": "Member", + "Policies": { + "_media-type": "application/vnd.ibexa.api.PolicyList+json", + "_href": "/api/ibexa/v2/user/roles/4/policies" + } + }, + { + "_media-type": "application/vnd.ibexa.api.Role+json", + "_href": "/api/ibexa/v2/user/roles/10", + "identifier": "NewRole", + "Policies": { + "_media-type": "application/vnd.ibexa.api.PolicyList+json", + "_href": "/api/ibexa/v2/user/roles/10/policies" + } + }, + { + "_media-type": "application/vnd.ibexa.api.Role+json", + "_href": "/api/ibexa/v2/user/roles/14", + "identifier": "NewRole5", + "Policies": { + "_media-type": "application/vnd.ibexa.api.PolicyList+json", + "_href": "/api/ibexa/v2/user/roles/14/policies" + } + }, + { + "_media-type": "application/vnd.ibexa.api.Role+json", + "_href": "/api/ibexa/v2/user/roles/15", + "identifier": "NewRole7", + "Policies": { + "_media-type": "application/vnd.ibexa.api.PolicyList+json", + "_href": "/api/ibexa/v2/user/roles/15/policies" + } + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/roles/GET/RoleList.xml.example b/src/bundle/Resources/api_platform/examples/user/roles/GET/RoleList.xml.example new file mode 100644 index 000000000..a408cb426 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/roles/GET/RoleList.xml.example @@ -0,0 +1,31 @@ +<?xml version="1.0" encoding="UTF-8"?> +<RoleList media-type="application/vnd.ibexa.api.RoleList+xml" href="/api/ibexa/v2/user/roles"> + <Role media-type="application/vnd.ibexa.api.Role+xml" href="/api/ibexa/v2/user/roles/1"> + <identifier>Anonymous</identifier> + <Policies media-type="application/vnd.ibexa.api.PolicyList+xml" href="/api/ibexa/v2/user/roles/1/policies"/> + </Role> + <Role media-type="application/vnd.ibexa.api.Role+xml" href="/api/ibexa/v2/user/roles/2"> + <identifier>Administrator</identifier> + <Policies media-type="application/vnd.ibexa.api.PolicyList+xml" href="/api/ibexa/v2/user/roles/2/policies"/> + </Role> + <Role media-type="application/vnd.ibexa.api.Role+xml" href="/api/ibexa/v2/user/roles/3"> + <identifier>Editor</identifier> + <Policies media-type="application/vnd.ibexa.api.PolicyList+xml" href="/api/ibexa/v2/user/roles/3/policies"/> + </Role> + <Role media-type="application/vnd.ibexa.api.Role+xml" href="/api/ibexa/v2/user/roles/4"> + <identifier>Member</identifier> + <Policies media-type="application/vnd.ibexa.api.PolicyList+xml" href="/api/ibexa/v2/user/roles/4/policies"/> + </Role> + <Role media-type="application/vnd.ibexa.api.Role+xml" href="/api/ibexa/v2/user/roles/10"> + <identifier>NewRole</identifier> + <Policies media-type="application/vnd.ibexa.api.PolicyList+xml" href="/api/ibexa/v2/user/roles/10/policies"/> + </Role> + <Role media-type="application/vnd.ibexa.api.Role+xml" href="/api/ibexa/v2/user/roles/14"> + <identifier>NewRole5</identifier> + <Policies media-type="application/vnd.ibexa.api.PolicyList+xml" href="/api/ibexa/v2/user/roles/14/policies"/> + </Role> + <Role media-type="application/vnd.ibexa.api.Role+xml" href="/api/ibexa/v2/user/roles/15"> + <identifier>NewRole7</identifier> + <Policies media-type="application/vnd.ibexa.api.PolicyList+xml" href="/api/ibexa/v2/user/roles/15/policies"/> + </Role> +</RoleList> diff --git a/src/bundle/Resources/api_platform/examples/user/roles/POST/Role.json.example b/src/bundle/Resources/api_platform/examples/user/roles/POST/Role.json.example new file mode 100644 index 000000000..f26242811 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/roles/POST/Role.json.example @@ -0,0 +1,11 @@ +{ + "Role": { + "_media-type": "application/vnd.ibexa.api.Role+json", + "_href": "/api/ibexa/v2/user/roles/21", + "identifier": "NewRole", + "Policies": { + "_media-type": "application/vnd.ibexa.api.PolicyList+json", + "_href": "/api/ibexa/v2/user/roles/21/policies" + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/roles/POST/Role.xml.example b/src/bundle/Resources/api_platform/examples/user/roles/POST/Role.xml.example new file mode 100644 index 000000000..0d7808c86 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/roles/POST/Role.xml.example @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Role media-type="application/vnd.ibexa.api.Role+xml" href="/api/ibexa/v2/user/roles/19"> + <identifier>NewRole</identifier> + <Policies media-type="application/vnd.ibexa.api.PolicyList+xml" href="/api/ibexa/v2/user/roles/19/policies"/> +</Role> diff --git a/src/bundle/Resources/api_platform/examples/user/roles/POST/RoleInput.json.example b/src/bundle/Resources/api_platform/examples/user/roles/POST/RoleInput.json.example new file mode 100644 index 000000000..c2cfef57e --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/roles/POST/RoleInput.json.example @@ -0,0 +1,5 @@ +{ + "RoleInput": { + "identifier": "NewRole" + } +} \ No newline at end of file diff --git a/src/bundle/Resources/api_platform/examples/user/roles/POST/RoleInput.xml.example b/src/bundle/Resources/api_platform/examples/user/roles/POST/RoleInput.xml.example new file mode 100644 index 000000000..febdc5635 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/roles/POST/RoleInput.xml.example @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<RoleInput> + <identifier>NewRole</identifier> +</RoleInput> \ No newline at end of file diff --git a/src/bundle/Resources/api_platform/examples/user/roles/id/GET/Role.json.example b/src/bundle/Resources/api_platform/examples/user/roles/id/GET/Role.json.example new file mode 100644 index 000000000..f26242811 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/roles/id/GET/Role.json.example @@ -0,0 +1,11 @@ +{ + "Role": { + "_media-type": "application/vnd.ibexa.api.Role+json", + "_href": "/api/ibexa/v2/user/roles/21", + "identifier": "NewRole", + "Policies": { + "_media-type": "application/vnd.ibexa.api.PolicyList+json", + "_href": "/api/ibexa/v2/user/roles/21/policies" + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/roles/id/GET/Role.xml.example b/src/bundle/Resources/api_platform/examples/user/roles/id/GET/Role.xml.example new file mode 100644 index 000000000..7909c201a --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/roles/id/GET/Role.xml.example @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Role media-type="application/vnd.ibexa.api.Role+xml" href="/api/ibexa/v2/user/roles/21"> + <identifier>NewRole</identifier> + <Policies media-type="application/vnd.ibexa.api.PolicyList+xml" href="/api/ibexa/v2/user/roles/21/policies"/> +</Role> diff --git a/src/bundle/Resources/api_platform/examples/user/roles/id/PATCH/Role.json.example b/src/bundle/Resources/api_platform/examples/user/roles/id/PATCH/Role.json.example new file mode 100644 index 000000000..e7295d979 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/roles/id/PATCH/Role.json.example @@ -0,0 +1,11 @@ +{ + "Role": { + "_media-type": "application/vnd.ibexa.api.Role+json", + "_href": "/api/ibexa/v2/user/roles/21", + "identifier": "NewIdentifier", + "Policies": { + "_media-type": "application/vnd.ibexa.api.PolicyList+json", + "_href": "/api/ibexa/v2/user/roles/21/policies" + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/roles/id/PATCH/Role.xml.example b/src/bundle/Resources/api_platform/examples/user/roles/id/PATCH/Role.xml.example new file mode 100644 index 000000000..bf7ef5438 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/roles/id/PATCH/Role.xml.example @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Role media-type="application/vnd.ibexa.api.Role+xml" href="/api/ibexa/v2/user/roles/5"> + <identifier>NewIdentifier</identifier> + <Policies media-type="application/vnd.ibexa.api.PolicyList+xml" href="/api/ibexa/v2/user/roles/5/policies"/> +</Role> diff --git a/src/bundle/Resources/api_platform/examples/user/roles/id/PATCH/RoleInput.json.example b/src/bundle/Resources/api_platform/examples/user/roles/id/PATCH/RoleInput.json.example new file mode 100644 index 000000000..d31874469 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/roles/id/PATCH/RoleInput.json.example @@ -0,0 +1,5 @@ +{ + "RoleInput": { + "identifier": "NewIdentifier" + } +} \ No newline at end of file diff --git a/src/bundle/Resources/api_platform/examples/user/roles/id/PATCH/RoleInput.xml.example b/src/bundle/Resources/api_platform/examples/user/roles/id/PATCH/RoleInput.xml.example new file mode 100644 index 000000000..ffe9e53bb --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/roles/id/PATCH/RoleInput.xml.example @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<RoleInput> + <identifier>NewIdentifier</identifier> +</RoleInput> diff --git a/src/bundle/Resources/api_platform/examples/user/roles/id/POST/RoleDraft.json.example b/src/bundle/Resources/api_platform/examples/user/roles/id/POST/RoleDraft.json.example new file mode 100644 index 000000000..8bdccb5a3 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/roles/id/POST/RoleDraft.json.example @@ -0,0 +1,11 @@ +{ + "Role": { + "_media-type": "application/vnd.ibexa.api.Role+json", + "_href": "/api/ibexa/v2/user/roles/6", + "identifier": "Editor", + "Policies": { + "_media-type": "application/vnd.ibexa.api.PolicyList+json", + "_href": "/api/ibexa/v2/user/roles/6/policies" + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/roles/id/POST/RoleDraft.xml.example b/src/bundle/Resources/api_platform/examples/user/roles/id/POST/RoleDraft.xml.example new file mode 100644 index 000000000..ba485b805 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/roles/id/POST/RoleDraft.xml.example @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Role href="/user/roles/11" media-type="application/vnd.ibexa.api.RoleDraft+xml"> + <identifier>MyRole</identifier> + <Policies href="/user/roles/11/policies" media-type="application/vnd.ibexa.api.PolicyList+xml"/> +</Role> diff --git a/src/bundle/Resources/api_platform/examples/user/roles/id/draft/GET/Role.json.example b/src/bundle/Resources/api_platform/examples/user/roles/id/draft/GET/Role.json.example new file mode 100644 index 000000000..9d3c937ee --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/roles/id/draft/GET/Role.json.example @@ -0,0 +1,11 @@ +{ + "Role": { + "_media-type": "application/vnd.ibexa.api.Role+json", + "_href": "/api/ibexa/v2/user/roles/27", + "identifier": "Anonymous", + "Policies": { + "_media-type": "application/vnd.ibexa.api.PolicyList+json", + "_href": "/api/ibexa/v2/user/roles/27/policies" + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/roles/id/draft/GET/Role.xml.example b/src/bundle/Resources/api_platform/examples/user/roles/id/draft/GET/Role.xml.example new file mode 100644 index 000000000..79aa775ec --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/roles/id/draft/GET/Role.xml.example @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Role media-type="application/vnd.ibexa.api.Role+xml" href="/api/ibexa/v2/user/roles/27"> + <identifier>Anonymous</identifier> + <Policies media-type="application/vnd.ibexa.api.PolicyList+xml" href="/api/ibexa/v2/user/roles/27/policies"/> +</Role> diff --git a/src/bundle/Resources/api_platform/examples/user/roles/id/draft/PATCH/Role.json.example b/src/bundle/Resources/api_platform/examples/user/roles/id/draft/PATCH/Role.json.example new file mode 100644 index 000000000..cfd1b3d0c --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/roles/id/draft/PATCH/Role.json.example @@ -0,0 +1,11 @@ +{ + "Role": { + "_media-type": "application/vnd.ibexa.api.Role+json", + "_href": "/api/ibexa/v2/user/roles/6", + "identifier": "UpdatedIdentifier", + "Policies": { + "_media-type": "application/vnd.ibexa.api.PolicyList+json", + "_href": "/api/ibexa/v2/user/roles/6/policies" + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/roles/id/draft/PATCH/Role.xml.example b/src/bundle/Resources/api_platform/examples/user/roles/id/draft/PATCH/Role.xml.example new file mode 100644 index 000000000..66e1a057a --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/roles/id/draft/PATCH/Role.xml.example @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Role media-type="application/vnd.ibexa.api.Role+xml" href="/api/ibexa/v2/user/roles/9"> + <identifier>UpdatedIdentifier</identifier> + <Policies media-type="application/vnd.ibexa.api.PolicyList+xml" href="/api/ibexa/v2/user/roles/9/policies"/> +</Role> diff --git a/src/bundle/Resources/api_platform/examples/user/roles/id/draft/PATCH/RoleInput.json.example b/src/bundle/Resources/api_platform/examples/user/roles/id/draft/PATCH/RoleInput.json.example new file mode 100644 index 000000000..23bed0ebf --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/roles/id/draft/PATCH/RoleInput.json.example @@ -0,0 +1,5 @@ +{ + "RoleInput": { + "identifier": "UpdatedIdentifier" + } +} \ No newline at end of file diff --git a/src/bundle/Resources/api_platform/examples/user/roles/id/draft/PATCH/RoleInput.xml.example b/src/bundle/Resources/api_platform/examples/user/roles/id/draft/PATCH/RoleInput.xml.example new file mode 100644 index 000000000..1796642ea --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/roles/id/draft/PATCH/RoleInput.xml.example @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<RoleInput> + <identifier>UpdatedIdentifier</identifier> +</RoleInput> diff --git a/src/bundle/Resources/api_platform/examples/user/roles/id/policies/GET/PolicyList.json.example b/src/bundle/Resources/api_platform/examples/user/roles/id/policies/GET/PolicyList.json.example new file mode 100644 index 000000000..9b48841e3 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/roles/id/policies/GET/PolicyList.json.example @@ -0,0 +1,104 @@ +{ + "PolicyList": { + "_media-type": "application/vnd.ibexa.api.PolicyList+json", + "_href": "/api/ibexa/v2/user/roles/1/policies", + "Policy": [ + { + "_media-type": "application/vnd.ibexa.api.Policy+json", + "_href": "/api/ibexa/v2/user/roles/1/policies/349", + "id": 349, + "module": "content", + "function": "read", + "limitations": { + "limitation": [ + { + "_identifier": "Section", + "values": { + "ref": [ + { + "_media-type": "application/vnd.ibexa.api.ref+json", + "_href": "1" + }, + { + "_media-type": "application/vnd.ibexa.api.ref+json", + "_href": "3" + }, + { + "_media-type": "application/vnd.ibexa.api.ref+json", + "_href": "6" + } + ] + } + } + ] + } + }, + { + "_media-type": "application/vnd.ibexa.api.Policy+json", + "_href": "/api/ibexa/v2/user/roles/1/policies/350", + "id": 350, + "module": "user", + "function": "login", + "limitations": { + "limitation": [ + { + "_identifier": "SiteAccess", + "values": { + "ref": [ + { + "_media-type": "application/vnd.ibexa.api.ref+json", + "_href": "2282622326" + }, + { + "_media-type": "application/vnd.ibexa.api.ref+json", + "_href": "1766001124" + } + ] + } + } + ] + } + }, + { + "_media-type": "application/vnd.ibexa.api.Policy+json", + "_href": "/api/ibexa/v2/user/roles/1/policies/351", + "id": 351, + "module": "content", + "function": "view_embed", + "limitations": { + "limitation": [ + { + "_identifier": "Class", + "values": { + "ref": [ + { + "_media-type": "application/vnd.ibexa.api.ref+json", + "_href": "5" + }, + { + "_media-type": "application/vnd.ibexa.api.ref+json", + "_href": "12" + } + ] + } + } + ] + } + }, + { + "_media-type": "application/vnd.ibexa.api.Policy+json", + "_href": "/api/ibexa/v2/user/roles/1/policies/352", + "id": 352, + "module": "user", + "function": "register" + }, + { + "_media-type": "application/vnd.ibexa.api.Policy+json", + "_href": "/api/ibexa/v2/user/roles/1/policies/353", + "id": 353, + "module": "user", + "function": "password" + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/roles/id/policies/GET/PolicyList.xml.example b/src/bundle/Resources/api_platform/examples/user/roles/id/policies/GET/PolicyList.xml.example new file mode 100644 index 000000000..8a8b328e5 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/roles/id/policies/GET/PolicyList.xml.example @@ -0,0 +1,53 @@ +<?xml version="1.0" encoding="UTF-8"?> +<PolicyList media-type="application/vnd.ibexa.api.PolicyList+xml" href="/api/ibexa/v2/user/roles/1/policies"> + <Policy media-type="application/vnd.ibexa.api.Policy+xml" href="/api/ibexa/v2/user/roles/1/policies/349"> + <id>349</id> + <module>content</module> + <function>read</function> + <limitations> + <limitation identifier="Section"> + <values> + <ref media-type="application/vnd.ibexa.api.ref+xml" href="1"/> + <ref media-type="application/vnd.ibexa.api.ref+xml" href="3"/> + <ref media-type="application/vnd.ibexa.api.ref+xml" href="6"/> + </values> + </limitation> + </limitations> + </Policy> + <Policy media-type="application/vnd.ibexa.api.Policy+xml" href="/api/ibexa/v2/user/roles/1/policies/350"> + <id>350</id> + <module>user</module> + <function>login</function> + <limitations> + <limitation identifier="SiteAccess"> + <values> + <ref media-type="application/vnd.ibexa.api.ref+xml" href="2282622326"/> + <ref media-type="application/vnd.ibexa.api.ref+xml" href="1766001124"/> + </values> + </limitation> + </limitations> + </Policy> + <Policy media-type="application/vnd.ibexa.api.Policy+xml" href="/api/ibexa/v2/user/roles/1/policies/351"> + <id>351</id> + <module>content</module> + <function>view_embed</function> + <limitations> + <limitation identifier="Class"> + <values> + <ref media-type="application/vnd.ibexa.api.ref+xml" href="5"/> + <ref media-type="application/vnd.ibexa.api.ref+xml" href="12"/> + </values> + </limitation> + </limitations> + </Policy> + <Policy media-type="application/vnd.ibexa.api.Policy+xml" href="/api/ibexa/v2/user/roles/1/policies/352"> + <id>352</id> + <module>user</module> + <function>register</function> + </Policy> + <Policy media-type="application/vnd.ibexa.api.Policy+xml" href="/api/ibexa/v2/user/roles/1/policies/353"> + <id>353</id> + <module>user</module> + <function>password</function> + </Policy> +</PolicyList> diff --git a/src/bundle/Resources/api_platform/examples/user/roles/id/policies/POST/Policy.xml.example b/src/bundle/Resources/api_platform/examples/user/roles/id/policies/POST/Policy.xml.example new file mode 100644 index 000000000..d3db9de1a --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/roles/id/policies/POST/Policy.xml.example @@ -0,0 +1,17 @@ +<Policy href="/user/roles/11/policies/55" media-type="application/vnd.ibexa.api.Policy+xml"> + <id>55</id> + <module>content</module> + <function>create</function> + <limitations> + <limitation identifier="Class"> + <values> + <ref href="/content/types/13"/> + </values> + </limitation> + <limitation identifier="ParentClass"> + <values> + <ref href="/content/types/12"/> + </values> + </limitation> + </limitations> + </Policy> diff --git a/src/bundle/Resources/api_platform/examples/user/roles/id/policies/POST/PolicyCreate.xml.example b/src/bundle/Resources/api_platform/examples/user/roles/id/policies/POST/PolicyCreate.xml.example new file mode 100644 index 000000000..1bb010014 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/roles/id/policies/POST/PolicyCreate.xml.example @@ -0,0 +1,17 @@ +<?xml version="1.0" encoding="UTF-8"?> +<PolicyCreate> + <module>content</module> + <function>create</function> + <limitations> + <limitation identifier="Class"> + <values> + <ref href="2"/> + </values> + </limitation> + <limitation identifier="ParentClass"> + <values> + <ref href="1"/> + </values> + </limitation> + </limitations> +</PolicyCreate> diff --git a/src/bundle/Resources/api_platform/examples/user/roles/id/policies/id/GET/Policy.json.example b/src/bundle/Resources/api_platform/examples/user/roles/id/policies/id/GET/Policy.json.example new file mode 100644 index 000000000..dd22b0a2d --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/roles/id/policies/id/GET/Policy.json.example @@ -0,0 +1,9 @@ +{ + "Policy": { + "_media-type": "application/vnd.ibexa.api.Policy+json", + "_href": "/api/ibexa/v2/user/roles/1/policies/352", + "id": 352, + "module": "user", + "function": "register" + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/roles/id/policies/id/GET/Policy.xml.example b/src/bundle/Resources/api_platform/examples/user/roles/id/policies/id/GET/Policy.xml.example new file mode 100644 index 000000000..8240b8750 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/roles/id/policies/id/GET/Policy.xml.example @@ -0,0 +1,19 @@ +<Policy href="/user/roles/11/policies/45" media-type="application/vnd.ibexa.api.Policy+xml"> + <id>45</id> + <module>content</module> + <function>create</function> + <limitations> + <limitation identifier="Class"> + <values> + <ref href="/content/types/10" media-type="application/vnd.ibexa.api.ContentType+xml" /> + <ref href="/content/types/11" media-type="application/vnd.ibexa.api.ContentType+xml" /> + <ref href="/content/types/12" media-type="application/vnd.ibexa.api.ContentType+xml" /> + </values> + </limitation> + <limitation identifier="ParentClass"> + <values> + <ref href="/content/types/4" media-type="application/vnd.ibexa.api.ContentType+xml" /> + </values> + </limitation> + </limitations> +</Policy> diff --git a/src/bundle/Resources/api_platform/examples/user/roles/id/policies/id/PATCH/Policy.xml.example b/src/bundle/Resources/api_platform/examples/user/roles/id/policies/id/PATCH/Policy.xml.example new file mode 100644 index 000000000..86cfd7746 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/roles/id/policies/id/PATCH/Policy.xml.example @@ -0,0 +1,17 @@ +<Policy href="/user/roles/11/policies/55" media-type="application/vnd.ibexa.api.Policy+xml"> + <id>55</id> + <module>content</module> + <function>create</function> + <limitations> + <limitation identifier="Class"> + <values> + <ref href="/content/types/14"/> + </values> + </limitation> + <limitation identifier="ParentClass"> + <values> + <ref href="/content/types/10"/> + </values> + </limitation> + </limitations> + </Policy> diff --git a/src/bundle/Resources/api_platform/examples/user/roles/id/policies/id/PATCH/PolicyUpdate.xml.example b/src/bundle/Resources/api_platform/examples/user/roles/id/policies/id/PATCH/PolicyUpdate.xml.example new file mode 100644 index 000000000..47ff30ff3 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/roles/id/policies/id/PATCH/PolicyUpdate.xml.example @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<PolicyUpdate> + <limitations> + <limitation identifier="Class"> + <values> + <ref href="2"/> + </values> + </limitation> + <limitation identifier="ParentClass"> + <values> + <ref href="1"/> + </values> + </limitation> + </limitations> +</PolicyUpdate> diff --git a/src/bundle/Resources/api_platform/examples/user/sessions/POST/Session.json.example b/src/bundle/Resources/api_platform/examples/user/sessions/POST/Session.json.example new file mode 100644 index 000000000..879723680 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/sessions/POST/Session.json.example @@ -0,0 +1,12 @@ +{ + "Session": { + "_media-type": "application/vnd.ibexa.api.Session", + "name": "eZSSID", + "identifier": "go327ij2cirpo59pb6rrv2a4el2", + "csrfToken": "23lkneri34ijajedfw39orj3j93", + "User": { + "_href": "/user/users/14", + "_media-type": "application/vnd.ibexa.api.User+json" + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/sessions/POST/Session.xml.example b/src/bundle/Resources/api_platform/examples/user/sessions/POST/Session.xml.example new file mode 100644 index 000000000..ad2418606 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/sessions/POST/Session.xml.example @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Session href="/user/sessions/sessionID" media-type="application/vnd.ibexa.api.Session+xml"> + <name>eZSSID</name> + <identifier>go327ij2cirpo59pb6rrv2a4el2</identifier> + <csrfToken>23lkneri34ijajedfw39orj3j93</csrfToken> + <User href="/user/users/14" media-type="vnd.ibexa.api.User+xml"/> +</Session> diff --git a/src/bundle/Resources/api_platform/examples/user/sessions/POST/SessionInput.json.example b/src/bundle/Resources/api_platform/examples/user/sessions/POST/SessionInput.json.example new file mode 100644 index 000000000..9b45a75ce --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/sessions/POST/SessionInput.json.example @@ -0,0 +1,7 @@ +{ + "SessionInput": { + "_media-type": "application/vnd.ibexa.api.SessionInput", + "login": "admin", + "password": "secret" + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/sessions/POST/SessionInput.xml.example b/src/bundle/Resources/api_platform/examples/user/sessions/POST/SessionInput.xml.example new file mode 100644 index 000000000..ae0f88db0 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/sessions/POST/SessionInput.xml.example @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<SessionInput> + <login>admin</login> + <password>secret</password> +</SessionInput> diff --git a/src/bundle/Resources/api_platform/examples/user/sessions/session_id/refresh/POST/Session.json.example b/src/bundle/Resources/api_platform/examples/user/sessions/session_id/refresh/POST/Session.json.example new file mode 100644 index 000000000..879723680 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/sessions/session_id/refresh/POST/Session.json.example @@ -0,0 +1,12 @@ +{ + "Session": { + "_media-type": "application/vnd.ibexa.api.Session", + "name": "eZSSID", + "identifier": "go327ij2cirpo59pb6rrv2a4el2", + "csrfToken": "23lkneri34ijajedfw39orj3j93", + "User": { + "_href": "/user/users/14", + "_media-type": "application/vnd.ibexa.api.User+json" + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/sessions/session_id/refresh/POST/Session.xml.example b/src/bundle/Resources/api_platform/examples/user/sessions/session_id/refresh/POST/Session.xml.example new file mode 100644 index 000000000..039aa875c --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/sessions/session_id/refresh/POST/Session.xml.example @@ -0,0 +1,7 @@ +<?xml version="1.0" encoding="UTF-8"?> +<Session href="user/sessions/go327ij2cirpo59pb6rrv2a4el2/refresh" media-type="application/vnd.ibexa.api.Session+xml"> + <name>eZSSID</name> + <identifier>go327ij2cirpo59pb6rrv2a4el2</identifier> + <csrfToken>23lkneri34ijajedfw39orj3j93</csrfToken> + <User href="/user/users/14" media-type="vnd.ibexa.api.User+xml"/> +</Session> diff --git a/src/bundle/Resources/api_platform/examples/user/token/jwt/POST/JWT.json.example b/src/bundle/Resources/api_platform/examples/user/token/jwt/POST/JWT.json.example new file mode 100644 index 000000000..3de11a92c --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/token/jwt/POST/JWT.json.example @@ -0,0 +1,7 @@ +{ + "JWT": { + "_media-type": "application/vnd.ibexa.api.JWT+json", + "_token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MDI4NDA3ODAsImV4cCI6MTYwMjg0NDM4MCwicm9sZXMiOlsiUk9MRV9VU0VSIl0sInVzZXJuYW1lIjoiYWRtaW4ifQ.0LHa799HwSwwfDBZd2V0q2xHwGt86PpyZamKnXHQyYI", + "token": "eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MDI4NDA3ODAsImV4cCI6MTYwMjg0NDM4MCwicm9sZXMiOlsiUk9MRV9VU0VSIl0sInVzZXJuYW1lIjoiYWRtaW4ifQ.0LHa799HwSwwfDBZd2V0q2xHwGt86PpyZamKnXHQyYI" + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/token/jwt/POST/JWT.xml.example b/src/bundle/Resources/api_platform/examples/user/token/jwt/POST/JWT.xml.example new file mode 100644 index 000000000..7d59afac2 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/token/jwt/POST/JWT.xml.example @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<JWT media-type="application/vnd.ibexa.api.JWT+xml" token="eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MDI4NDA3NjEsImV4cCI6MTYwMjg0NDM2MSwicm9sZXMiOlsiUk9MRV9VU0VSIl0sInVzZXJuYW1lIjoiYWRtaW4ifQ.LsmdVjad7wMwVQUo4vSftT0zHbJyArOMd23b417E2jI"> + <token>eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJpYXQiOjE2MDI4NDA3NjEsImV4cCI6MTYwMjg0NDM2MSwicm9sZXMiOlsiUk9MRV9VU0VSIl0sInVzZXJuYW1lIjoiYWRtaW4ifQ.LsmdVjad7wMwVQUo4vSftT0zHbJyArOMd23b417E2jI</token> +</JWT> diff --git a/src/bundle/Resources/api_platform/examples/user/token/jwt/POST/JWTInput.json.example b/src/bundle/Resources/api_platform/examples/user/token/jwt/POST/JWTInput.json.example new file mode 100644 index 000000000..cc2dc54d6 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/token/jwt/POST/JWTInput.json.example @@ -0,0 +1,7 @@ +{ + "JWTInput": { + "_media-type": "application/vnd.ibexa.api.JWTInput", + "username": "admin", + "password": "publish" + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/token/jwt/POST/JWTInput.xml.example b/src/bundle/Resources/api_platform/examples/user/token/jwt/POST/JWTInput.xml.example new file mode 100644 index 000000000..b7a053478 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/token/jwt/POST/JWTInput.xml.example @@ -0,0 +1,4 @@ +<JWTInput> + <password>publish</password> + <username>admin</username> +</JWTInput> diff --git a/src/bundle/Resources/api_platform/examples/user/users/GET/UserList.json.example b/src/bundle/Resources/api_platform/examples/user/users/GET/UserList.json.example new file mode 100644 index 000000000..bd915b1cc --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/users/GET/UserList.json.example @@ -0,0 +1,155 @@ +{ + "UserList": { + "_media-type": "application/vnd.ibexa.api.UserList+json", + "_href": "/api/ibexa/v2/user/users", + "User": [ + { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14", + "_id": 14, + "_remoteId": "1bb4fe25487f05527efa8bfd394cecc7", + "ContentType": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/4" + }, + "name": "Administrator User", + "Versions": { + "_media-type": "application/vnd.ibexa.api.VersionList+json", + "_href": "/api/ibexa/v2/content/objects/14/versions" + }, + "Section": { + "_media-type": "application/vnd.ibexa.api.Section+json", + "_href": "/api/ibexa/v2/content/sections/2" + }, + "MainLocation": { + "_media-type": "application/vnd.ibexa.api.Location+json", + "_href": "/api/ibexa/v2/content/locations/1/5/13/15" + }, + "Locations": { + "_media-type": "application/vnd.ibexa.api.LocationList+json", + "_href": "/api/ibexa/v2/content/objects/14/locations" + }, + "Groups": { + "_media-type": "application/vnd.ibexa.api.UserGroupRefList+json", + "_href": "/api/ibexa/v2/user/users/14/groups" + }, + "Owner": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "publishDate": "2002-10-06T16:13:50+00:00", + "lastModificationDate": "2011-03-25T14:07:04+00:00", + "mainLanguageCode": "eng-GB", + "alwaysAvailable": true, + "Version": { + "_media-type": "application/vnd.ibexa.api.Version+json", + "_href": "/api/ibexa/v2/content/objects/14/versions/3", + "VersionInfo": { + "id": 499, + "versionNo": 3, + "status": "PUBLISHED", + "modificationDate": "2011-03-25T14:07:04+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "creationDate": "2011-03-25T14:03:03+00:00", + "initialLanguageCode": "eng-GB", + "languageCodes": "eng-GB", + "VersionTranslationInfo": { + "_media-type": "application/vnd.ibexa.api.VersionTranslationInfo+json", + "Language": [ + { + "languageCode": "eng-GB" + } + ] + }, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Administrator User" + } + ] + }, + "Content": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/14" + } + }, + "Fields": { + "field": [ + { + "id": 28, + "fieldDefinitionIdentifier": "first_name", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezstring", + "fieldValue": "Administrator" + }, + { + "id": 29, + "fieldDefinitionIdentifier": "last_name", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezstring", + "fieldValue": "User" + }, + { + "id": 30, + "fieldDefinitionIdentifier": "user_account", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezuser", + "fieldValue": { + "hasStoredLogin": true, + "contentId": 14, + "login": "admin", + "email": "admin@link.invalid", + "passwordUpdatedAt": null, + "enabled": true, + "maxLogin": 10, + "plainPassword": null + } + }, + { + "id": 178, + "fieldDefinitionIdentifier": "signature", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "eztext", + "fieldValue": null + }, + { + "id": 180, + "fieldDefinitionIdentifier": "image", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezimage", + "fieldValue": null + } + ] + }, + "Relations": { + "_media-type": "application/vnd.ibexa.api.RelationList+json", + "_href": "/api/ibexa/v2/content/objects/14/versions/3/relations", + "Relation": [] + }, + "Thumbnail": { + "_media-type": "application/vnd.ibexa.api.Thumbnail+json", + "resource": "/bundles/ezplatformadminui/img/ez-icons.svg#user", + "width": null, + "height": null, + "mimeType": "image/svg+xml" + } + }, + "login": "admin", + "email": "admin@link.invalid", + "enabled": true, + "UserGroups": { + "_media-type": "application/vnd.ibexa.api.UserGroupList+json", + "_href": "/api/ibexa/v2/user/users/14/groups" + }, + "Roles": { + "_media-type": "application/vnd.ibexa.api.RoleAssignmentList+json", + "_href": "/api/ibexa/v2/user/users/14/roles" + } + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/users/GET/UserList.xml.example b/src/bundle/Resources/api_platform/examples/user/users/GET/UserList.xml.example new file mode 100644 index 000000000..6dbef3cdf --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/users/GET/UserList.xml.example @@ -0,0 +1,88 @@ +<?xml version="1.0" encoding="UTF-8"?> +<UserList media-type="application/vnd.ibexa.api.UserList+xml" href="/api/ibexa/v2/user/users"> + <User media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14" id="14" remoteId="1bb4fe25487f05527efa8bfd394cecc7"> + <ContentType media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/4"/> + <name>Administrator User</name> + <Versions media-type="application/vnd.ibexa.api.VersionList+xml" href="/api/ibexa/v2/content/objects/14/versions"/> + <Section media-type="application/vnd.ibexa.api.Section+xml" href="/api/ibexa/v2/content/sections/2"/> + <MainLocation media-type="application/vnd.ibexa.api.Location+xml" href="/api/ibexa/v2/content/locations/1/5/13/15"/> + <Locations media-type="application/vnd.ibexa.api.LocationList+xml" href="/api/ibexa/v2/content/objects/14/locations"/> + <Groups media-type="application/vnd.ibexa.api.UserGroupRefList+xml" href="/api/ibexa/v2/user/users/14/groups"/> + <Owner media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <publishDate>2002-10-06T18:13:50+02:00</publishDate> + <lastModificationDate>2011-03-25T15:07:04+01:00</lastModificationDate> + <mainLanguageCode>eng-GB</mainLanguageCode> + <alwaysAvailable>true</alwaysAvailable> + <Version media-type="application/vnd.ibexa.api.Version+xml" href="/api/ibexa/v2/content/objects/14/versions/3"> + <VersionInfo> + <id>499</id> + <versionNo>3</versionNo> + <status>PUBLISHED</status> + <modificationDate>2011-03-25T15:07:04+01:00</modificationDate> + <Creator media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <creationDate>2011-03-25T15:03:03+01:00</creationDate> + <initialLanguageCode>eng-GB</initialLanguageCode> + <languageCodes>eng-GB</languageCodes> + <VersionTranslationInfo media-type="application/vnd.ibexa.api.VersionTranslationInfo+xml"> + <Language> + <languageCode>eng-GB</languageCode> + </Language> + </VersionTranslationInfo> + <names> + <value languageCode="eng-GB">Administrator User</value> + </names> + <Content media-type="application/vnd.ibexa.api.ContentInfo+xml" href="/api/ibexa/v2/content/objects/14"/> + </VersionInfo> + <Fields> + <field> + <id>28</id> + <fieldDefinitionIdentifier>first_name</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldTypeIdentifier>ezstring</fieldTypeIdentifier> + <fieldValue>Administrator</fieldValue> + </field> + <field> + <id>29</id> + <fieldDefinitionIdentifier>last_name</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldTypeIdentifier>ezstring</fieldTypeIdentifier> + <fieldValue>User</fieldValue> + </field> + <field> + <id>30</id> + <fieldDefinitionIdentifier>user_account</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldTypeIdentifier>ezuser</fieldTypeIdentifier> + <fieldValue> + <value key="hasStoredLogin">true</value> + <value key="contentId">14</value> + <value key="login">admin</value> + <value key="email">nospam@ibexa.co</value> + <value key="enabled">true</value> + <value key="maxLogin">10</value> + </fieldValue> + </field> + <field> + <id>178</id> + <fieldDefinitionIdentifier>signature</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldTypeIdentifier>eztext</fieldTypeIdentifier> + <fieldValue/> + </field> + <field> + <id>180</id> + <fieldDefinitionIdentifier>image</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldTypeIdentifier>ezimage</fieldTypeIdentifier> + <fieldValue/> + </field> + </Fields> + <Relations media-type="application/vnd.ibexa.api.RelationList+xml" href="/api/ibexa/v2/content/objects/14/versions/3/relations"/> + </Version> + <login>admin</login> + <email>nospam@ibexa.co</email> + <enabled>true</enabled> + <UserGroups media-type="application/vnd.ibexa.api.UserGroupList+xml" href="/api/ibexa/v2/user/users/14/groups"/> + <Roles media-type="application/vnd.ibexa.api.RoleAssignmentList+xml" href="/api/ibexa/v2/user/users/14/roles"/> + </User> +</UserList> diff --git a/src/bundle/Resources/api_platform/examples/user/users/GET/UserRefList.xml.example b/src/bundle/Resources/api_platform/examples/user/users/GET/UserRefList.xml.example new file mode 100644 index 000000000..c8cf9a66d --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/users/GET/UserRefList.xml.example @@ -0,0 +1,4 @@ +<?xml version="1.0" encoding="UTF-8"?> +<UserRefList media-type="application/vnd.ibexa.api.UserRefList+xml" href="/api/ibexa/v2/user/users"> + <User media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> +</UserRefList> diff --git a/src/bundle/Resources/api_platform/examples/user/users/user_id/GET/User.json.example b/src/bundle/Resources/api_platform/examples/user/users/user_id/GET/User.json.example new file mode 100644 index 000000000..e0318f6dd --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/users/user_id/GET/User.json.example @@ -0,0 +1,155 @@ +{ + "UserList": { + "_media-type": "application/vnd.ibexa.api.UserList+json", + "_href": "/api/ibexa/v2/user/users", + "User": [ + { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/79", + "_id": 79, + "_remoteId": "bcf0764b417f05af21852a1f03fb1f13", + "ContentType": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/4" + }, + "name": "Jose Vargas", + "Versions": { + "_media-type": "application/vnd.ibexa.api.VersionList+json", + "_href": "/api/ibexa/v2/content/objects/79/versions" + }, + "Section": { + "_media-type": "application/vnd.ibexa.api.Section+json", + "_href": "/api/ibexa/v2/content/sections/2" + }, + "MainLocation": { + "_media-type": "application/vnd.ibexa.api.Location+json", + "_href": "/api/ibexa/v2/content/locations/1/5/12/79" + }, + "Locations": { + "_media-type": "application/vnd.ibexa.api.LocationList+json", + "_href": "/api/ibexa/v2/content/objects/79/locations" + }, + "Groups": { + "_media-type": "application/vnd.ibexa.api.UserGroupRefList+json", + "_href": "/api/ibexa/v2/user/users/79/groups" + }, + "Owner": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/10" + }, + "publishDate": "2021-06-29T08:23:42+00:00", + "lastModificationDate": "2021-06-29T08:23:42+00:00", + "mainLanguageCode": "eng-GB", + "alwaysAvailable": true, + "Version": { + "_media-type": "application/vnd.ibexa.api.Version+json", + "_href": "/api/ibexa/v2/content/objects/79/versions/1", + "VersionInfo": { + "id": 547, + "versionNo": 1, + "status": "PUBLISHED", + "modificationDate": "2021-06-29T08:23:42+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/10" + }, + "creationDate": "2021-06-29T08:23:42+00:00", + "initialLanguageCode": "eng-GB", + "languageCodes": "eng-GB", + "VersionTranslationInfo": { + "_media-type": "application/vnd.ibexa.api.VersionTranslationInfo+json", + "Language": [ + { + "languageCode": "eng-GB" + } + ] + }, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Jose Vargas" + } + ] + }, + "Content": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/79" + } + }, + "Fields": { + "field": [ + { + "id": 342, + "fieldDefinitionIdentifier": "first_name", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezstring", + "fieldValue": "Jose" + }, + { + "id": 343, + "fieldDefinitionIdentifier": "last_name", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezstring", + "fieldValue": "Vargas" + }, + { + "id": 344, + "fieldDefinitionIdentifier": "user_account", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezuser", + "fieldValue": { + "hasStoredLogin": true, + "contentId": 79, + "login": "josevargas", + "email": "aa@bb.cc", + "passwordUpdatedAt": 1624955022, + "enabled": true, + "maxLogin": 0, + "plainPassword": null + } + }, + { + "id": 345, + "fieldDefinitionIdentifier": "signature", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "eztext", + "fieldValue": null + }, + { + "id": 346, + "fieldDefinitionIdentifier": "image", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezimage", + "fieldValue": null + } + ] + }, + "Relations": { + "_media-type": "application/vnd.ibexa.api.RelationList+json", + "_href": "/api/ibexa/v2/content/objects/79/versions/1/relations", + "Relation": [] + }, + "Thumbnail": { + "_media-type": "application/vnd.ibexa.api.Thumbnail+json", + "resource": "/bundles/ezplatformadminui/img/ez-icons.svg#user", + "width": null, + "height": null, + "mimeType": "image/svg+xml" + } + }, + "login": "josevargas", + "email": "aa@bb.cc", + "enabled": true, + "UserGroups": { + "_media-type": "application/vnd.ibexa.api.UserGroupList+json", + "_href": "/api/ibexa/v2/user/users/79/groups" + }, + "Roles": { + "_media-type": "application/vnd.ibexa.api.RoleAssignmentList+json", + "_href": "/api/ibexa/v2/user/users/79/roles" + } + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/users/user_id/GET/User.xml.example b/src/bundle/Resources/api_platform/examples/user/users/user_id/GET/User.xml.example new file mode 100644 index 000000000..fab328704 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/users/user_id/GET/User.xml.example @@ -0,0 +1,96 @@ +<?xml version="1.0" encoding="UTF-8"?> +<UserList media-type="application/vnd.ibexa.api.UserList+xml" href="/api/ibexa/v2/user/users"> + <User media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/79" id="79" remoteId="bcf0764b417f05af21852a1f03fb1f13"> + <ContentType media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/4"/> + <name>Jose Vargas</name> + <Versions media-type="application/vnd.ibexa.api.VersionList+xml" href="/api/ibexa/v2/content/objects/79/versions"/> + <Section media-type="application/vnd.ibexa.api.Section+xml" href="/api/ibexa/v2/content/sections/2"/> + <MainLocation media-type="application/vnd.ibexa.api.Location+xml" href="/api/ibexa/v2/content/locations/1/5/12/79"/> + <Locations media-type="application/vnd.ibexa.api.LocationList+xml" href="/api/ibexa/v2/content/objects/79/locations"/> + <Groups media-type="application/vnd.ibexa.api.UserGroupRefList+xml" href="/api/ibexa/v2/user/users/79/groups"/> + <Owner media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/10"/> + <publishDate>2021-06-29T08:23:42+00:00</publishDate> + <lastModificationDate>2021-06-29T08:23:42+00:00</lastModificationDate> + <mainLanguageCode>eng-GB</mainLanguageCode> + <alwaysAvailable>true</alwaysAvailable> + <Version media-type="application/vnd.ibexa.api.Version+xml" href="/api/ibexa/v2/content/objects/79/versions/1"> + <VersionInfo> + <id>547</id> + <versionNo>1</versionNo> + <status>PUBLISHED</status> + <modificationDate>2021-06-29T08:23:42+00:00</modificationDate> + <Creator media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/10"/> + <creationDate>2021-06-29T08:23:42+00:00</creationDate> + <initialLanguageCode>eng-GB</initialLanguageCode> + <languageCodes>eng-GB</languageCodes> + <VersionTranslationInfo media-type="application/vnd.ibexa.api.VersionTranslationInfo+xml"> + <Language> + <languageCode>eng-GB</languageCode> + </Language> + </VersionTranslationInfo> + <names> + <value languageCode="eng-GB">Jose Vargas</value> + </names> + <Content media-type="application/vnd.ibexa.api.ContentInfo+xml" href="/api/ibexa/v2/content/objects/79"/> + </VersionInfo> + <Fields> + <field> + <id>342</id> + <fieldDefinitionIdentifier>first_name</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldTypeIdentifier>ezstring</fieldTypeIdentifier> + <fieldValue>Jose</fieldValue> + </field> + <field> + <id>343</id> + <fieldDefinitionIdentifier>last_name</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldTypeIdentifier>ezstring</fieldTypeIdentifier> + <fieldValue>Vargas</fieldValue> + </field> + <field> + <id>344</id> + <fieldDefinitionIdentifier>user_account</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldTypeIdentifier>ezuser</fieldTypeIdentifier> + <fieldValue> + <value key="hasStoredLogin">true</value> + <value key="contentId">79</value> + <value key="login">josevargas</value> + <value key="email">aa@bb.cc</value> + <value key="passwordUpdatedAt">1624955022</value> + <value key="enabled">true</value> + <value key="maxLogin">0</value> + <value key="plainPassword"/> + </fieldValue> + </field> + <field> + <id>345</id> + <fieldDefinitionIdentifier>signature</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldTypeIdentifier>eztext</fieldTypeIdentifier> + <fieldValue/> + </field> + <field> + <id>346</id> + <fieldDefinitionIdentifier>image</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldTypeIdentifier>ezimage</fieldTypeIdentifier> + <fieldValue/> + </field> + </Fields> + <Relations media-type="application/vnd.ibexa.api.RelationList+xml" href="/api/ibexa/v2/content/objects/79/versions/1/relations"/> + <Thumbnail media-type="application/vnd.ibexa.api.Thumbnail+xml"> + <resource>/bundles/ezplatformadminui/img/ez-icons.svg#user</resource> + <width></width> + <height></height> + <mimeType>image/svg+xml</mimeType> + </Thumbnail> + </Version> + <login>josevargas</login> + <email>aa@bb.cc</email> + <enabled>true</enabled> + <UserGroups media-type="application/vnd.ibexa.api.UserGroupList+xml" href="/api/ibexa/v2/user/users/79/groups"/> + <Roles media-type="application/vnd.ibexa.api.RoleAssignmentList+xml" href="/api/ibexa/v2/user/users/79/roles"/> + </User> +</UserList> diff --git a/src/bundle/Resources/api_platform/examples/user/users/user_id/PATCH/User.json.example b/src/bundle/Resources/api_platform/examples/user/users/user_id/PATCH/User.json.example new file mode 100644 index 000000000..8f1a529db --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/users/user_id/PATCH/User.json.example @@ -0,0 +1,149 @@ +{ + "User": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/79", + "_id": 79, + "_remoteId": "bcf0764b417f05af21852a1f03fb1f13", + "ContentType": { + "_media-type": "application/vnd.ibexa.api.ContentType+json", + "_href": "/api/ibexa/v2/content/types/4" + }, + "name": "Jose Vargas", + "Versions": { + "_media-type": "application/vnd.ibexa.api.VersionList+json", + "_href": "/api/ibexa/v2/content/objects/79/versions" + }, + "Section": { + "_media-type": "application/vnd.ibexa.api.Section+json", + "_href": "/api/ibexa/v2/content/sections/2" + }, + "MainLocation": { + "_media-type": "application/vnd.ibexa.api.Location+json", + "_href": "/api/ibexa/v2/content/locations/1/5/12/79" + }, + "Locations": { + "_media-type": "application/vnd.ibexa.api.LocationList+json", + "_href": "/api/ibexa/v2/content/objects/79/locations" + }, + "Groups": { + "_media-type": "application/vnd.ibexa.api.UserGroupRefList+json", + "_href": "/api/ibexa/v2/user/users/79/groups" + }, + "Owner": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/10" + }, + "publishDate": "2021-06-29T08:23:42+00:00", + "lastModificationDate": "2021-07-29T12:00:24+00:00", + "mainLanguageCode": "eng-GB", + "alwaysAvailable": true, + "Version": { + "_media-type": "application/vnd.ibexa.api.Version+json", + "_href": "/api/ibexa/v2/content/objects/79/versions/11", + "VersionInfo": { + "id": 614, + "versionNo": 11, + "status": "PUBLISHED", + "modificationDate": "2021-07-29T12:00:24+00:00", + "Creator": { + "_media-type": "application/vnd.ibexa.api.User+json", + "_href": "/api/ibexa/v2/user/users/14" + }, + "creationDate": "2021-07-29T12:00:24+00:00", + "initialLanguageCode": "eng-GB", + "languageCodes": "eng-GB", + "VersionTranslationInfo": { + "_media-type": "application/vnd.ibexa.api.VersionTranslationInfo+json", + "Language": [ + { + "languageCode": "eng-GB" + } + ] + }, + "names": { + "value": [ + { + "_languageCode": "eng-GB", + "#text": "Jose Vargas" + } + ] + }, + "Content": { + "_media-type": "application/vnd.ibexa.api.ContentInfo+json", + "_href": "/api/ibexa/v2/content/objects/79" + } + }, + "Fields": { + "field": [ + { + "id": 342, + "fieldDefinitionIdentifier": "first_name", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezstring", + "fieldValue": "Jose" + }, + { + "id": 343, + "fieldDefinitionIdentifier": "last_name", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezstring", + "fieldValue": "Vargas" + }, + { + "id": 344, + "fieldDefinitionIdentifier": "user_account", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezuser", + "fieldValue": { + "hasStoredLogin": true, + "contentId": 79, + "login": "josevargas", + "email": "aa@bb.cc", + "passwordUpdatedAt": null, + "enabled": false, + "maxLogin": 0, + "plainPassword": null + } + }, + { + "id": 345, + "fieldDefinitionIdentifier": "signature", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "eztext", + "fieldValue": null + }, + { + "id": 346, + "fieldDefinitionIdentifier": "image", + "languageCode": "eng-GB", + "fieldTypeIdentifier": "ezimage", + "fieldValue": null + } + ] + }, + "Relations": { + "_media-type": "application/vnd.ibexa.api.RelationList+json", + "_href": "/api/ibexa/v2/content/objects/79/versions/11/relations", + "Relation": [] + }, + "Thumbnail": { + "_media-type": "application/vnd.ibexa.api.Thumbnail+json", + "resource": "/bundles/ezplatformadminui/img/ez-icons.svg#user", + "width": null, + "height": null, + "mimeType": "image/svg+xml" + } + }, + "login": "josevargas", + "email": "aa@bb.cc", + "enabled": false, + "UserGroups": { + "_media-type": "application/vnd.ibexa.api.UserGroupList+json", + "_href": "/api/ibexa/v2/user/users/79/groups" + }, + "Roles": { + "_media-type": "application/vnd.ibexa.api.RoleAssignmentList+json", + "_href": "/api/ibexa/v2/user/users/79/roles" + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/users/user_id/PATCH/User.xml.example b/src/bundle/Resources/api_platform/examples/user/users/user_id/PATCH/User.xml.example new file mode 100644 index 000000000..caf3abbaf --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/users/user_id/PATCH/User.xml.example @@ -0,0 +1,94 @@ +<?xml version="1.0" encoding="UTF-8"?> +<User media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/79" id="79" remoteId="bcf0764b417f05af21852a1f03fb1f13"> + <ContentType media-type="application/vnd.ibexa.api.ContentType+xml" href="/api/ibexa/v2/content/types/4"/> + <name>Jose Vargas</name> + <Versions media-type="application/vnd.ibexa.api.VersionList+xml" href="/api/ibexa/v2/content/objects/79/versions"/> + <Section media-type="application/vnd.ibexa.api.Section+xml" href="/api/ibexa/v2/content/sections/2"/> + <MainLocation media-type="application/vnd.ibexa.api.Location+xml" href="/api/ibexa/v2/content/locations/1/5/12/79"/> + <Locations media-type="application/vnd.ibexa.api.LocationList+xml" href="/api/ibexa/v2/content/objects/79/locations"/> + <Groups media-type="application/vnd.ibexa.api.UserGroupRefList+xml" href="/api/ibexa/v2/user/users/79/groups"/> + <Owner media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/10"/> + <publishDate>2021-06-29T08:23:42+00:00</publishDate> + <lastModificationDate>2021-07-29T11:45:07+00:00</lastModificationDate> + <mainLanguageCode>eng-GB</mainLanguageCode> + <alwaysAvailable>true</alwaysAvailable> + <Version media-type="application/vnd.ibexa.api.Version+xml" href="/api/ibexa/v2/content/objects/79/versions/6"> + <VersionInfo> + <id>609</id> + <versionNo>6</versionNo> + <status>PUBLISHED</status> + <modificationDate>2021-07-29T11:45:07+00:00</modificationDate> + <Creator media-type="application/vnd.ibexa.api.User+xml" href="/api/ibexa/v2/user/users/14"/> + <creationDate>2021-07-29T11:45:07+00:00</creationDate> + <initialLanguageCode>eng-GB</initialLanguageCode> + <languageCodes>eng-GB</languageCodes> + <VersionTranslationInfo media-type="application/vnd.ibexa.api.VersionTranslationInfo+xml"> + <Language> + <languageCode>eng-GB</languageCode> + </Language> + </VersionTranslationInfo> + <names> + <value languageCode="eng-GB">Jose Vargas</value> + </names> + <Content media-type="application/vnd.ibexa.api.ContentInfo+xml" href="/api/ibexa/v2/content/objects/79"/> + </VersionInfo> + <Fields> + <field> + <id>342</id> + <fieldDefinitionIdentifier>first_name</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldTypeIdentifier>ezstring</fieldTypeIdentifier> + <fieldValue>Jose</fieldValue> + </field> + <field> + <id>343</id> + <fieldDefinitionIdentifier>last_name</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldTypeIdentifier>ezstring</fieldTypeIdentifier> + <fieldValue>Vargas</fieldValue> + </field> + <field> + <id>344</id> + <fieldDefinitionIdentifier>user_account</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldTypeIdentifier>ezuser</fieldTypeIdentifier> + <fieldValue> + <value key="hasStoredLogin">true</value> + <value key="contentId">79</value> + <value key="login">josevargas</value> + <value key="email">aa@bb.cc</value> + <value key="passwordUpdatedAt"/> + <value key="enabled">false</value> + <value key="maxLogin">0</value> + <value key="plainPassword"/> + </fieldValue> + </field> + <field> + <id>345</id> + <fieldDefinitionIdentifier>signature</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldTypeIdentifier>eztext</fieldTypeIdentifier> + <fieldValue/> + </field> + <field> + <id>346</id> + <fieldDefinitionIdentifier>image</fieldDefinitionIdentifier> + <languageCode>eng-GB</languageCode> + <fieldTypeIdentifier>ezimage</fieldTypeIdentifier> + <fieldValue/> + </field> + </Fields> + <Relations media-type="application/vnd.ibexa.api.RelationList+xml" href="/api/ibexa/v2/content/objects/79/versions/6/relations"/> + <Thumbnail media-type="application/vnd.ibexa.api.Thumbnail+xml"> + <resource>/bundles/ezplatformadminui/img/ez-icons.svg#user</resource> + <width></width> + <height></height> + <mimeType>image/svg+xml</mimeType> + </Thumbnail> + </Version> + <login>josevargas</login> + <email>aa@bb.cc</email> + <enabled>false</enabled> + <UserGroups media-type="application/vnd.ibexa.api.UserGroupList+xml" href="/api/ibexa/v2/user/users/79/groups"/> + <Roles media-type="application/vnd.ibexa.api.RoleAssignmentList+xml" href="/api/ibexa/v2/user/users/79/roles"/> +</User> diff --git a/src/bundle/Resources/api_platform/examples/user/users/user_id/PATCH/UserUpdate.json.example b/src/bundle/Resources/api_platform/examples/user/users/user_id/PATCH/UserUpdate.json.example new file mode 100644 index 000000000..fd43e1d7f --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/users/user_id/PATCH/UserUpdate.json.example @@ -0,0 +1,6 @@ +{ + "UserUpdate": { + "login": "josevargas", + "enabled": false + } +} \ No newline at end of file diff --git a/src/bundle/Resources/api_platform/examples/user/users/user_id/PATCH/UserUpdate.xml.example b/src/bundle/Resources/api_platform/examples/user/users/user_id/PATCH/UserUpdate.xml.example new file mode 100644 index 000000000..fe09ab444 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/users/user_id/PATCH/UserUpdate.xml.example @@ -0,0 +1,5 @@ +<?xml version="1.0" encoding="UTF-8"?> +<UserUpdate> + <login>josevargas</login> + <enabled>false</enabled> +</UserUpdate> diff --git a/src/bundle/Resources/api_platform/examples/user/users/user_id/groups/GET/UserGroupRefList.xml.example b/src/bundle/Resources/api_platform/examples/user/users/user_id/groups/GET/UserGroupRefList.xml.example new file mode 100644 index 000000000..dc45cf331 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/users/user_id/groups/GET/UserGroupRefList.xml.example @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<UserGroupRefList media-type="application/vnd.ibexa.api.UserGroupRefList+xml" href="/api/ibexa/v2/user/users/55/groups"> + <UserGroup media-type="application/vnd.ibexa.api.UserGroup+xml" href="/api/ibexa/v2/user/groups/1/5/12"> + <unassign href="/api/ibexa/v2/user/users/55/groups/12" method="DELETE"/> + </UserGroup> + <UserGroup media-type="application/vnd.ibexa.api.UserGroup+xml" href="/api/ibexa/v2/user/groups/1/5/14"> + <unassign href="/api/ibexa/v2/user/users/55/groups/14" method="DELETE"/> + </UserGroup> +</UserGroupRefList> diff --git a/src/bundle/Resources/api_platform/examples/user/users/user_id/groups/POST/UserGroupRefList.json.example b/src/bundle/Resources/api_platform/examples/user/users/user_id/groups/POST/UserGroupRefList.json.example new file mode 100644 index 000000000..8e7c8f7cb --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/users/user_id/groups/POST/UserGroupRefList.json.example @@ -0,0 +1,24 @@ +{ + "UserGroupRefList": { + "_media-type": "application/vnd.ibexa.api.UserGroupRefList+json", + "_href": "/api/ibexa/v2/user/users/115/groups", + "UserGroup": [ + { + "_media-type": "application/vnd.ibexa.api.UserGroup+json", + "_href": "/api/ibexa/v2/user/groups/1/5/12", + "unassign": { + "_href": "/api/ibexa/v2/user/users/115/groups/12", + "_method": "DELETE" + } + }, + { + "_media-type": "application/vnd.ibexa.api.UserGroup+json", + "_href": "/api/ibexa/v2/user/groups/1/5/13", + "unassign": { + "_href": "/api/ibexa/v2/user/users/115/groups/13", + "_method": "DELETE" + } + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/users/user_id/groups/POST/UserGroupRefList.xml.example b/src/bundle/Resources/api_platform/examples/user/users/user_id/groups/POST/UserGroupRefList.xml.example new file mode 100644 index 000000000..ed2ceff01 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/users/user_id/groups/POST/UserGroupRefList.xml.example @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<UserGroupRefList media-type="application/vnd.ibexa.api.UserGroupRefList+xml" href="/api/ibexa/v2/user/users/115/groups"> + <UserGroup media-type="application/vnd.ibexa.api.UserGroup+xml" href="/api/ibexa/v2/user/groups/1/5/12"> + <unassign href="/api/ibexa/v2/user/users/79/groups/12" method="DELETE"/> + </UserGroup> + <UserGroup media-type="application/vnd.ibexa.api.UserGroup+xml" href="/api/ibexa/v2/user/groups/1/5/13"> + <unassign href="/api/ibexa/v2/user/users/115/groups/13" method="DELETE"/> + </UserGroup> +</UserGroupRefList> diff --git a/src/bundle/Resources/api_platform/examples/user/users/user_id/groups/group_id/DELETE/UserGroupRefList.xml.example b/src/bundle/Resources/api_platform/examples/user/users/user_id/groups/group_id/DELETE/UserGroupRefList.xml.example new file mode 100644 index 000000000..f0e5f585e --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/users/user_id/groups/group_id/DELETE/UserGroupRefList.xml.example @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<UserGroupRefList href="/user/users/45/groups" + media-type="application/vnd.ibexa.api.UserGroupRefList"> + <UserGroup href="/user/groups/1/5/34" media-type="application/vnd.ibexa.api.UserGroup"> + <unassign href="/user/users/45/groups/34" method="DELETE" /> + </UserGroup> + <UserGroup href="/user/groups/1/5/88" media-type="application/vnd.ibexa.api.UserGroup"> + <unassign href="/user/users/45/groups/88" method="DELETE" /> + </UserGroup> +</UserGroupRefList> diff --git a/src/bundle/Resources/api_platform/examples/user/users/user_id/groups/group_id/UserGroupRefList.json.example b/src/bundle/Resources/api_platform/examples/user/users/user_id/groups/group_id/UserGroupRefList.json.example new file mode 100644 index 000000000..1d5808dc1 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/users/user_id/groups/group_id/UserGroupRefList.json.example @@ -0,0 +1,12 @@ +{ + "UserGroupRefList": { + "_media-type": "application/vnd.ibexa.api.UserGroupRefList+json", + "_href": "/api/ibexa/v2/user/users/57/groups", + "UserGroup": [ + { + "_media-type": "application/vnd.ibexa.api.UserGroup+json", + "_href": "/api/ibexa/v2/user/groups/1/5/13" + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/users/user_id/roles/GET/RoleAssignmentList.json.example b/src/bundle/Resources/api_platform/examples/user/users/user_id/roles/GET/RoleAssignmentList.json.example new file mode 100644 index 000000000..b265f016e --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/users/user_id/roles/GET/RoleAssignmentList.json.example @@ -0,0 +1,27 @@ +{ + "RoleAssignmentList": { + "_media-type": "application/vnd.ibexa.api.RoleAssignmentList+json", + "_href": "/api/ibexa/v2/user/users/115/roles", + "RoleAssignment": [ + { + "_media-type": "application/vnd.ibexa.api.RoleAssignment+json", + "_href": "/api/ibexa/v2/user/users/115/roles/2", + "limitation": { + "_identifier": "Section", + "values": { + "ref": [ + { + "_media-type": "application/vnd.ibexa.api.ref+json", + "_href": "1" + } + ] + } + }, + "Role": { + "_media-type": "application/vnd.ibexa.api.Role+json", + "_href": "/api/ibexa/v2/user/roles/2" + } + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/users/user_id/roles/GET/RoleAssignmentList.xml.example b/src/bundle/Resources/api_platform/examples/user/users/user_id/roles/GET/RoleAssignmentList.xml.example new file mode 100644 index 000000000..1fb30959a --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/users/user_id/roles/GET/RoleAssignmentList.xml.example @@ -0,0 +1,11 @@ +<?xml version="1.0" encoding="UTF-8"?> +<RoleAssignmentList media-type="application/vnd.ibexa.api.RoleAssignmentList+xml" href="/api/ibexa/v2/user/users/115/roles"> + <RoleAssignment media-type="application/vnd.ibexa.api.RoleAssignment+xml" href="/api/ibexa/v2/user/users/115/roles/2"> + <limitation identifier="Section"> + <values> + <ref media-type="application/vnd.ibexa.api.ref+xml" href="1"/> + </values> + </limitation> + <Role media-type="application/vnd.ibexa.api.Role+xml" href="/api/ibexa/v2/user/roles/2"/> + </RoleAssignment> +</RoleAssignmentList> diff --git a/src/bundle/Resources/api_platform/examples/user/users/user_id/roles/POST/RoleAssignInput.json.example b/src/bundle/Resources/api_platform/examples/user/users/user_id/roles/POST/RoleAssignInput.json.example new file mode 100644 index 000000000..ea756134d --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/users/user_id/roles/POST/RoleAssignInput.json.example @@ -0,0 +1,23 @@ +{ + "RoleAssignInput": { + "Role": { + "_href": "/api/ibexa/v2/user/roles/2", + "_media-type": "application/vnd.ibexa.api.RoleAssignInput+xml" + }, + "limitation": { + "_identifier": "Section", + "values": { + "ref": [ + { + "_href": "/api/ibexa/v2/content/sections/1", + "_media-type": "application/vnd.ibexa.api.Section+xml" + }, + { + "_href": "/api/ibexa/v2/content/sections/2", + "_media-type": "application/vnd.ibexa.api.Section+xml" + } + ] + } + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/users/user_id/roles/POST/RoleAssignInput.xml.example b/src/bundle/Resources/api_platform/examples/user/users/user_id/roles/POST/RoleAssignInput.xml.example new file mode 100644 index 000000000..243f3ff7d --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/users/user_id/roles/POST/RoleAssignInput.xml.example @@ -0,0 +1,10 @@ +<?xml version="1.0" encoding="UTF-8"?> +<RoleAssignInput> + <Role href="/api/ibexa/v2/user/roles/2" media-type="application/vnd.ibexa.api.RoleAssignInput+xml"/> + <limitation identifier="Section"> + <values> + <ref href="/api/ibexa/v2/content/sections/1" media-type="application/vnd.ibexa.api.Section+xml" /> + <ref href="/api/ibexa/v2/content/sections/2" media-type="application/vnd.ibexa.api.Section+xml" /> + </values> + </limitation> +</RoleAssignInput> diff --git a/src/bundle/Resources/api_platform/examples/user/users/user_id/roles/POST/RoleAssignmentList.json.example b/src/bundle/Resources/api_platform/examples/user/users/user_id/roles/POST/RoleAssignmentList.json.example new file mode 100644 index 000000000..22b919336 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/users/user_id/roles/POST/RoleAssignmentList.json.example @@ -0,0 +1,46 @@ +{ + "RoleAssignmentList": { + "_media-type": "application/vnd.ibexa.api.RoleAssignmentList+json", + "_href": "/api/ibexa/v2/user/users/115/roles", + "RoleAssignment": [ + { + "_media-type": "application/vnd.ibexa.api.RoleAssignment+json", + "_href": "/api/ibexa/v2/user/users/115/roles/2", + "limitation": { + "_identifier": "Section", + "values": { + "ref": [ + { + "_media-type": "application/vnd.ibexa.api.ref+json", + "_href": "2" + } + ] + } + }, + "Role": { + "_media-type": "application/vnd.ibexa.api.Role+json", + "_href": "/api/ibexa/v2/user/roles/2" + } + }, + { + "_media-type": "application/vnd.ibexa.api.RoleAssignment+json", + "_href": "/api/ibexa/v2/user/users/115/roles/2", + "limitation": { + "_identifier": "Section", + "values": { + "ref": [ + { + "_media-type": "application/vnd.ibexa.api.ref+json", + "_href": "1" + } + ] + } + }, + "Role": { + "_media-type": "application/vnd.ibexa.api.Role+json", + "_href": "/api/ibexa/v2/user/roles/2" + } + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/users/user_id/roles/POST/RoleAssignmentList.xml.example b/src/bundle/Resources/api_platform/examples/user/users/user_id/roles/POST/RoleAssignmentList.xml.example new file mode 100644 index 000000000..4800db41d --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/users/user_id/roles/POST/RoleAssignmentList.xml.example @@ -0,0 +1,19 @@ +<?xml version="1.0" encoding="UTF-8"?> +<RoleAssignmentList media-type="application/vnd.ibexa.api.RoleAssignmentList+xml" href="/api/ibexa/v2/user/users/115/roles"> + <RoleAssignment media-type="application/vnd.ibexa.api.RoleAssignment+xml" href="/api/ibexa/v2/user/users/115/roles/2"> + <limitation identifier="Section"> + <values> + <ref media-type="application/vnd.ibexa.api.ref+xml" href="1"/> + </values> + </limitation> + <Role media-type="application/vnd.ibexa.api.Role+xml" href="/api/ibexa/v2/user/roles/2"/> + </RoleAssignment> + <RoleAssignment media-type="application/vnd.ibexa.api.RoleAssignment+xml" href="/api/ibexa/v2/user/users/115/roles/2"> + <limitation identifier="Section"> + <values> + <ref media-type="application/vnd.ibexa.api.ref+xml" href="2"/> + </values> + </limitation> + <Role media-type="application/vnd.ibexa.api.Role+xml" href="/api/ibexa/v2/user/roles/2"/> + </RoleAssignment> +</RoleAssignmentList> diff --git a/src/bundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/DELETE/RoleAssignmentList.json.example b/src/bundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/DELETE/RoleAssignmentList.json.example new file mode 100644 index 000000000..16dc02334 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/DELETE/RoleAssignmentList.json.example @@ -0,0 +1,24 @@ +{ + "RoleAssignmentList": { + "_media-type": "application/vnd.ibexa.api.RoleAssignmentList+json", + "_href": "/api/ibexa/v2/user/users/57/roles", + "RoleAssignment": [ + { + "_media-type": "application/vnd.ibexa.api.RoleAssignment+json", + "_href": "/api/ibexa/v2/user/users/57/roles/1", + "Role": { + "_media-type": "application/vnd.ibexa.api.Role+json", + "_href": "/api/ibexa/v2/user/roles/1" + } + }, + { + "_media-type": "application/vnd.ibexa.api.RoleAssignment+json", + "_href": "/api/ibexa/v2/user/users/57/roles/2", + "Role": { + "_media-type": "application/vnd.ibexa.api.Role+json", + "_href": "/api/ibexa/v2/user/roles/2" + } + } + ] + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/DELETE/RoleAssignmentList.xml.example b/src/bundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/DELETE/RoleAssignmentList.xml.example new file mode 100644 index 000000000..2c74de453 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/DELETE/RoleAssignmentList.xml.example @@ -0,0 +1,15 @@ +<?xml version="1.0" encoding="UTF-8"?> +<RoleAssignmentList href="/user/groups/1/5/65/roles" media-type="application/vnd.ibexa.api.RoleAssignmentList+xml"> + <RoleAssignment href="/user/groups/1/5/65/roles/5" media-type="application/vnd.ibexa.api.RoleAssignment+xml"> + <Role href="/user/roles/5" media-type="application/vnd.ibexa.api.Role+xml"/> + </RoleAssignment> + <RoleAssignment href="/user/groups/1/5/65/roles/11" media-type="application/vnd.ibexa.api.RoleAssignment+xml"> + <limitation identifier="Section"> + <values> + <ref href="/content/sections/1" media-type="application/vnd.ibexa.api.Section+xml" /> + <ref href="/content/sections/4" media-type="application/vnd.ibexa.api.Section+xml" /> + </values> + </limitation> + <Role href="/user/roles/11" media-type="application/vnd.ibexa.api.Role+xml"/> + </RoleAssignment> +</RoleAssignmentList> diff --git a/src/bundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/GET/RoleAssignment.json.example b/src/bundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/GET/RoleAssignment.json.example new file mode 100644 index 000000000..527244157 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/GET/RoleAssignment.json.example @@ -0,0 +1,21 @@ +{ + "RoleAssignment": { + "_media-type": "application/vnd.ibexa.api.RoleAssignment+json", + "_href": "/api/ibexa/v2/user/users/113/roles/3", + "limitation": { + "_identifier": "Section", + "values": { + "ref": [ + { + "_media-type": "application/vnd.ibexa.api.ref+json", + "_href": "6" + } + ] + } + }, + "Role": { + "_media-type": "application/vnd.ibexa.api.Role+json", + "_href": "/api/ibexa/v2/user/roles/3" + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/GET/RoleAssignment.xml.example b/src/bundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/GET/RoleAssignment.xml.example new file mode 100644 index 000000000..0511e11c5 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/GET/RoleAssignment.xml.example @@ -0,0 +1,9 @@ +<?xml version="1.0" encoding="UTF-8"?> +<RoleAssignment media-type="application/vnd.ibexa.api.RoleAssignment+xml" href="/api/ibexa/v2/user/users/113/roles/3"> + <limitation identifier="Section"> + <values> + <ref media-type="application/vnd.ibexa.api.ref+xml" href="6"/> + </values> + </limitation> + <Role media-type="application/vnd.ibexa.api.Role+xml" href="/api/ibexa/v2/user/roles/3"/> +</RoleAssignment> diff --git a/src/bundle/Resources/api_platform/examples/views/POST/View.xml.v11.example b/src/bundle/Resources/api_platform/examples/views/POST/View.xml.v11.example new file mode 100644 index 000000000..d476a11c8 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/views/POST/View.xml.v11.example @@ -0,0 +1,67 @@ +<?xml version="1.0" encoding="UTF-8"?> +<View href="/views/TitleView" media-type="application/vnd.ibexa.api.View+xml; version=1.1"> + <identifier>TitleView</identifier> + <User href="/user/users/14" media-type="vnd.ibexa.api.User+xml"/> + <public>false</public> + <LocationQuery> + <Filter> + <ParentLocationIdCriterion>2</ParentLocationIdCriterion> + </Filter> + <limit>10</limit> + <offset>0</offset> + <SortClauses> + <ContentName>ascending</ContentName> + </SortClauses> + <FacetBuilders> + <contentTypeFacetBuilder/> + </FacetBuilders> + </LocationQuery> + <Result href="/content/views/view1234/results" + media-type="application/vnd.ibexa.api.ViewResult+xml" count="34" time="31" maxScore="1.0"> + <searchHits> + <searchHit score="1.0" index="installid1234567890"> + <hightlight/> + <value> + <Location media-type="application/vnd.ibexa.api.Location+xml" href="/api/ibexa/v2/content/locations/1/2"> + <id>2</id> + <priority>0</priority> + <hidden>false</hidden> + <invisible>false</invisible> + <ParentLocation media-type="application/vnd.ibexa.api.Location+xml" href="/api/ibexa/v2/content/locations/1"/> + <pathString>/1/2/</pathString> + <depth>1</depth> + <childCount>8</childCount> + <remoteId>f3e90596361e31d496d4026eb624c983</remoteId> + <Children media-type="application/vnd.ibexa.api.LocationList+xml" href="/api/ibexa/v2/content/locations/1/2/children"/> + <Content media-type="application/vnd.ibexa.api.Content+xml" href="/api/ibexa/v2/content/objects/57"/> + <sortField>PRIORITY</sortField> + <sortOrder>ASC</sortOrder> + <UrlAliases media-type="application/vnd.ibexa.api.UrlAliasRefList+xml" href="/api/ibexa/v2/content/locations/1/2/urlaliases"/> + </Location> + + </value> + </searchHit> + <!-- ... --> + </searchHits> + <facets> + <contentTypeFacet> + <contentTypeFacetEntry> + <contentType href="/content/types/1" media-type="application/vnd.ibexa.api.ContentType+xml"/> + <count>3</count> + </contentTypeFacetEntry> + <contentTypeFacetEntry> + <contentType href="/content/types/7" media-type="application/vnd.ibexa.api.ContentType+xml"/> + <count>9</count> + </contentTypeFacetEntry> + <contentTypeFacetEntry> + <contentType href="/content/types/11" media-type="application/vnd.ibexa.api.ContentType+xml"/> + <count>1</count> + </contentTypeFacetEntry> + <contentTypeFacetEntry> + <contentType href="/content/types/15" media-type="application/vnd.ibexa.api.ContentType+xml"/> + <count>8</count> + </contentTypeFacetEntry> + </contentTypeFacet> + </facets> + </Result> +</View> diff --git a/src/bundle/Resources/api_platform/examples/views/POST/ViewInput.json.example b/src/bundle/Resources/api_platform/examples/views/POST/ViewInput.json.example new file mode 100644 index 000000000..eb4514cc9 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/views/POST/ViewInput.json.example @@ -0,0 +1,28 @@ +{ + "ViewInput": { + "identifier": "TitleView", + "Query": { + "Filter": { + "ContentTypeIdentifierCriterion": "image", + "SectionIdentifierCriterion": "media", + "DateMetadataCriterion": { + "Target": "modified", + "Value": 1675681020, + "Operator": "gte" + } + }, + "limit": 10, + "offset": 0, + "SortClauses": { + "ContentName": "ascending" + }, + "Aggregations": [ + { + "ContentTypeTermAggregation": { + "name": "some name" + } + } + ] + } + } +} diff --git a/src/bundle/Resources/api_platform/examples/views/POST/ViewInput.xml.example b/src/bundle/Resources/api_platform/examples/views/POST/ViewInput.xml.example new file mode 100644 index 000000000..45cc1f489 --- /dev/null +++ b/src/bundle/Resources/api_platform/examples/views/POST/ViewInput.xml.example @@ -0,0 +1,27 @@ +<?xml version="1.0" encoding="UTF-8"?> +<ViewInput> + <identifier>TitleView</identifier> + <Query> + <Filter> + <ContentTypeIdentifierCriterion>image</ContentTypeIdentifierCriterion> + <SectionIdentifierCriterion>media</SectionIdentifierCriterion> + <DateMetadataCriterion> + <Target>modified</Target> + <Value>1675681020</Value> + <Operator>gte</Operator> + </DateMetadataCriterion> + </Filter> + <limit>10</limit> + <offset>0</offset> + <SortClauses> + <ContentName>ascending</ContentName> + </SortClauses> + <Aggregations> + <Aggregation> + <ContentTypeTermAggregation> + <name>some name</name> + </ContentTypeTermAggregation> + </Aggregation> + </Aggregations> + </Query> +</ViewInput> diff --git a/src/bundle/Resources/api_platform/user/roles_schemas.yml b/src/bundle/Resources/api_platform/user/roles_schemas.yml new file mode 100644 index 000000000..88672bb0c --- /dev/null +++ b/src/bundle/Resources/api_platform/user/roles_schemas.yml @@ -0,0 +1,273 @@ +schemas: + Role: + allOf: + - $ref: "#/components/schemas/BaseObject" + - description: This class represents a role. + type: object + required: + - identifier + - Policies + properties: + identifier: + description: Readable string identifier of a role. + type: string + Policies: + description: Returns the list of policies of this role. + type: + $ref: "#/components/schemas/BaseObject" + RoleWrapper: + type: object + required: + - Role + properties: + Role: + $ref: "#/components/schemas/Role" + RoleDraft: + description: This class represents a draft of a role, extends Role. + type: + $ref: "#/components/schemas/Role" + RoleDraftWrapper: + type: object + required: + - Role + properties: + Role: + $ref: "#/components/schemas/RoleDraft" + RoleInput: + description: This class represents a Role input. + type: object + required: + - identifier + properties: + identifier: + type: string + RoleInputWrapper: + type: object + required: + - RoleInput + properties: + RoleInput: + $ref: "#/components/schemas/RoleInput" + RoleList: + allOf: + - $ref: "#/components/schemas/BaseObject" + - description: This class represents a list roles. + type: object + required: + - Role + properties: + Role: + type: array + items: + $ref: "#/components/schemas/Role" + RoleListWrapper: + type: object + required: + - RoleList + properties: + RoleList: + $ref: "#/components/schemas/RoleList" + Policy: + allOf: + - $ref: "#/components/schemas/BaseObject" + - description: This class represents a policy value. + type: object + required: + - id + - module + - function + properties: + id: + description: ID of the policy. + type: integer + module: + description: Name of module, associated with the Policy e.g. content. + type: string + function: + description: Name of the module function Or all functions with '*' e.g. read. + type: string + limitations: + description: Limitations. + type: object + required: + - limitation + properties: + limitation: + type: array + items: + $ref: "#/components/schemas/Limitation" + PolicyWrapper: + type: object + required: + - Policy + properties: + Policy: + $ref: "#/components/schemas/Policy" + Limitation: + description: This class represents a Limitation applied to a policy. + type: object + required: + - _identifier + - values + properties: + _identifier: + description: "Returns the limitation identifier (one of the defined constants) or a custom limitation. Constants: CONTENTTYPE = Class; LANGUAGE = Language; LOCATION = Node; OWNER = Owner; PARENTOWNER = ParentOwner; PARENTCONTENTTYPE = ParentClass; PARENTDEPTH = ParentDepth; SECTION = Section; NEWSECTION = NewSection; SITEACCESS = SiteAccess; STATE = State; NEWSTATE = NewState; SUBTREE = Subtree; USERGROUP = Group; PARENTUSERGROUP = ParentGroup; STATUS = Status." + enum: + - ContentType + - Language + - Location + - Owner + - Parentowner + - ParentContentType + - ParentDepth + - Section + - NewSection + - SiteAccess + - State + - NewState + - Subtree + - UserGroup + - ParentUserGroup + - Status + - Class + xml: + attribute: true + name: identifier + type: string + values: + description: A read-only list of IDs or identifiers for which the limitation should be applied. The value of this property must conform to a hash, which means that it may only consist of array and scalar values, but must not contain objects or resources. + type: object + required: + - $ref + properties: + ref: + type: array + items: + $ref: "#/components/schemas/Ref" + PolicyList: + allOf: + - $ref: "#/components/schemas/BaseObject" + - description: List of policies. + type: object + required: + - Policy + properties: + Policy: + type: array + items: + $ref: "#/components/schemas/Policy" + PolicyListWrapper: + type: object + required: + - PolicyList + properties: + PolicyList: + $ref: "#/components/schemas/PolicyList" + PolicyCreate: + allOf: + - $ref: "#/components/schemas/BaseObject" + - description: This class is used to create a Policy. + type: object + required: + - module + - function + - Limitations + properties: + module: + description: Name of module associated with the Policy. For example, content. + type: string + function: + description: Name of the module function, or all functions with ''*''. For example, read. + type: string + Limitations: + type: array + items: + $ref: "#/components/schemas/Limitation" + PolicyCreateWrapper: + type: object + required: + - PolicyCreate + properties: + PolicyCreate: + $ref: "#/components/schemas/PolicyCreate" + PolicyUpdate: + allOf: + - $ref: "#/components/schemas/BaseObject" + - description: This class is used to update a Policy. + type: object + required: + - Limitations + properties: + Limitations: + type: array + items: + $ref: "#/components/schemas/Limitation" + PolicyUpdateWrapper: + type: object + required: + - PolicyUpdate + properties: + PolicyUpdate: + $ref: "#/components/schemas/PolicyUpdate" + RoleAssignment: + allOf: + - $ref: "#/components/schemas/BaseObject" + - description: This value object represents an assignment of a User or User group to a role including a limitation. + type: object + required: + - Role + properties: + limitation: + description: Returns the limitation of the role assignment. + Role: + description: Returns the role to which the User or User group is assigned to. + type: + $ref: "#/components/schemas/Ref" + RoleAssignmentWrapper: + type: object + required: + - RoleAssignment + properties: + RoleAssignment: + $ref: "#/components/schemas/RoleAssignment" + RoleAssignInput: + description: This class represents a Role assign input. + type: object + required: + - Role + - limitation + properties: + Role: + description: Returns the Role to which the user or user group is assigned to. + type: + $ref: "#/components/schemas/Ref" + limitation: + description: Returns the Limitation of the Role assignment. + type: + $ref: "#/components/schemas/Limitation" + RoleAssignInputWrapper: + type: object + required: + - RoleAssignInput + properties: + RoleAssignInput: + $ref: "#/components/schemas/RoleAssignInput" + RoleAssignmentList: + allOf: + - $ref: "#/components/schemas/BaseObject" + - description: This value object represents a list of assignments of a User or User group to a role including a limitation. + type: object + required: + - RoleAssignment + properties: + RoleAssignment: + type: array + items: + $ref: "#/components/schemas/RoleAssignment" + RoleAssignmentListWrapper: + type: object + required: + - RoleAssignmentList + properties: + RoleAssignmentList: + $ref: "#/components/schemas/RoleAssignmentList" diff --git a/src/bundle/Resources/api_platform/user/sessions_schemas.yml b/src/bundle/Resources/api_platform/user/sessions_schemas.yml new file mode 100644 index 000000000..045877d8f --- /dev/null +++ b/src/bundle/Resources/api_platform/user/sessions_schemas.yml @@ -0,0 +1,52 @@ +schemas: + Session: + allOf: + - $ref: "#/components/schemas/BaseObject" + - description: Value for session. + type: object + required: + - name + - identifier + - csrfToken + - User + properties: + name: + description: Name. + type: string + identifier: + description: Identifier. + type: string + csrfToken: + description: csrfToken. + type: string + User: + description: User. + type: + $ref: "#/components/schemas/BaseObject" + SessionWrapper: + type: object + required: + - Session + properties: + Session: + $ref: "#/components/schemas/Session" + SessionInput: + allOf: + - $ref: "#/components/schemas/BaseObject" + - description: This class represents a session input. + type: object + required: + - login + - password + properties: + login: + type: string + password: + type: string + SessionInputWrapper: + type: object + required: + - SessionInput + properties: + SessionInput: + $ref: "#/components/schemas/SessionInput" diff --git a/src/bundle/Resources/api_platform/user/token_schemas.yml b/src/bundle/Resources/api_platform/user/token_schemas.yml new file mode 100644 index 000000000..44d95555b --- /dev/null +++ b/src/bundle/Resources/api_platform/user/token_schemas.yml @@ -0,0 +1,39 @@ +schemas: + JWT: + description: This class represents the JWT authentication token + type: object + required: + - token + properties: + token: + description: JWT authentication token + type: string + JWTWrapper: + type: object + required: + - JWT + properties: + JWT: + $ref: "#/components/schemas/JWT" + JWTInput: + allOf: + - $ref: "#/components/schemas/BaseObject" + - description: This class represents the input for a JWT authentication token + type: object + required: + - username + - password + properties: + username: + description: User name + type: string + password: + description: User password + type: string + JWTInputWrapper: + type: object + required: + - JWTInput + properties: + JWTInput: + $ref: "#/components/schemas/JWTInput" diff --git a/src/bundle/Resources/api_platform/user/user_groups_schemas.yml b/src/bundle/Resources/api_platform/user/user_groups_schemas.yml new file mode 100644 index 000000000..7f3d5163a --- /dev/null +++ b/src/bundle/Resources/api_platform/user/user_groups_schemas.yml @@ -0,0 +1,192 @@ +schemas: + UserGroup: + allOf: + - $ref: "#/components/schemas/BaseObject" + - description: Content ID matcher class. + type: object + required: + - _remoteId + - _id + - ContentType + - name + - Versions + - Section + - MainLocation + - Locations + - Owner + - lastModificationDate + - mainLanguageCode + - alwaysAvailable + - Version + - ParentUserGroup + - Subgroups + - Users + - Roles + properties: + _remoteId: + description: Remote ID of the content type. + xml: + attribute: true + name: remoteId + type: string + _id: + description: Unique ID of the content type. + xml: + attribute: true + name: id + type: integer + ContentType: + description: Content type. + type: + $ref: "#/components/schemas/Ref" + name: + type: string + Versions: + description: Returns the VersionInfo for this version. + type: + $ref: "#/components/schemas/Ref" + Section: + description: The Section to which the content item is assigned to. + type: + $ref: "#/components/schemas/Ref" + MainLocation: + type: + $ref: "#/components/schemas/Ref" + Locations: + description: Location of the content item. + type: + $ref: "#/components/schemas/Ref" + Owner: + description: The owner of the content item. + type: + $ref: "#/components/schemas/Ref" + lastModificationDate: + description: Content item modification date. + type: string + format: date-time + mainLanguageCode: + description: The main language code of the content item. + type: string + alwaysAvailable: + type: boolean + Version: + $ref: "#/components/schemas/Version" + ParentUserGroup: + type: + $ref: "#/components/schemas/Ref" + Subgroups: + type: + $ref: "#/components/schemas/Ref" + Users: + type: + $ref: "#/components/schemas/Ref" + Roles: + type: + $ref: "#/components/schemas/Ref" + UserGroupWrapper: + type: object + required: + - UserGroup + properties: + UserGroup: + $ref: "#/components/schemas/UserGroup" + UserGroupList: + description: This class represents a User Group list. + type: + $ref: "#/components/schemas/BaseObject" + UserGroupListWrapper: + type: object + required: + - UserGroupList + properties: + UserGroupList: + $ref: "#/components/schemas/UserGroupList" + UserGroupRefList: + allOf: + - $ref: "#/components/schemas/BaseObject" + - description: Returns a list of the sub groups. + type: object + required: + - UserGroup + properties: + UserGroup: + description: This class represents a User group. + type: array + items: + $ref: "#/components/schemas/Ref" + UserGroupRefListWrapper: + type: object + required: + - UserGroupRefList + properties: + UserGroupRefList: + $ref: "#/components/schemas/UserGroupRefList" + UserGroupCreate: + description: This class is used to create a User Group. + type: object + required: + - mainLanguageCode + - remoteId + - fields + properties: + mainLanguageCode: + type: string + remoteId: + type: string + fields: + type: + $ref: "#/components/schemas/Fields" + UserGroupCreateWrapper: + type: object + required: + - UserGroupCreate + properties: + UserGroupCreate: + $ref: "#/components/schemas/UserGroupCreate" + UserGroupUpdate: + description: This class is used to update a User group in the Repository. + type: object + required: + - Section + properties: + Section: + type: object + required: + - _href + properties: + _href: + xml: + attribute: true + name: href + type: string + UserGroupUpdateWrapper: + type: object + required: + - UserGroupUpdate + properties: + UserGroupUpdate: + $ref: "#/components/schemas/UserGroupUpdate" + UserGroupUnassign: + allOf: + - $ref: "#/components/schemas/BaseObject" + - description: This class represents a User group. + type: object + required: + - Unassign + properties: + Unassign: + type: + $ref: "#/components/schemas/Unlink" + Unlink: + description: Unlink a content type group from a content type. + type: object + required: + - _href + - _method + properties: + _href: + type: string + _method: + enum: + - DELETE + type: string diff --git a/src/bundle/Resources/api_platform/user/users_schemas.yml b/src/bundle/Resources/api_platform/user/users_schemas.yml new file mode 100644 index 000000000..9d9902fa9 --- /dev/null +++ b/src/bundle/Resources/api_platform/user/users_schemas.yml @@ -0,0 +1,206 @@ +schemas: + User: + allOf: + - $ref: "#/components/schemas/BaseObject" + - description: This class represents a User value. + type: object + required: + - _id + - _remoteId + - ContentType + - name + - Versions + - Section + - MainLocation + - Locations + - Groups + - Owner + - publishDate + - lastModificationDate + - mainLanguageCode + - alwaysAvailable + - Version + - login + - email + - enabled + - UserGroups + - Roles + properties: + _id: + description: Unique ID of the content type. + xml: + attribute: true + name: id + type: integer + _remoteId: + description: Remote ID of the content type. + xml: + attribute: true + name: remoteId + type: string + ContentType: + description: This class represents a content type. + type: + $ref: "#/components/schemas/BaseObject" + name: + description: Name of the domain object in a given language. + type: string + Versions: + description: Returns the VersionInfo for this version. + type: + $ref: "#/components/schemas/BaseObject" + Section: + description: The Section to which the content item is assigned. + type: + $ref: "#/components/schemas/BaseObject" + MainLocation: + description: Main Location of the object. + type: + $ref: "#/components/schemas/BaseObject" + Locations: + description: Locations of the object. + type: + $ref: "#/components/schemas/BaseObject" + Groups: + description: Group User of the content type. + type: + $ref: "#/components/schemas/BaseObject" + Owner: + description: The owner of the content item. + type: + $ref: "#/components/schemas/BaseObject" + publishDate: + description: Content publication date. + type: string + format: date-time + lastModificationDate: + description: Content modification date. + type: string + format: date-time + mainLanguageCode: + description: The main language code of the content item. + type: string + alwaysAvailable: + description: Indicates if the content item is shown in the main language if it's not present in an other requested language. + type: boolean + Version: + description: Returns the VersionInfo for this version. + login: + description: User login. + type: string + email: + description: User email address. + type: string + enabled: + description: Flag to Signal if User is enabled or not. User can not login if false. + type: boolean + UserGroups: + description: User groups. + type: + $ref: "#/components/schemas/BaseObject" + Roles: + description: Roles. + type: + $ref: "#/components/schemas/BaseObject" + UserWrapper: + type: object + required: + - User + properties: + User: + $ref: "#/components/schemas/User" + UserList: + allOf: + - $ref: "#/components/schemas/BaseObject" + - description: This class represents a list of users. + type: object + required: + - User + properties: + User: + type: array + items: + $ref: "#/components/schemas/User" + UserListWrapper: + type: object + required: + - UserList + properties: + UserList: + $ref: "#/components/schemas/UserList" + UserRefList: + allOf: + - $ref: "#/components/schemas/BaseObject" + - description: Returns a list of the users. + type: object + required: + - User + properties: + User: + description: This class represents a User. + type: array + items: + $ref: "#/components/schemas/BaseObject" + UserRefListWrapper: + type: object + required: + - UserRefList + properties: + UserRefList: + $ref: "#/components/schemas/UserRefList" + UserUpdate: + description: This class is used to update a User. + type: object + required: + - login + properties: + login: + type: string + email: + type: string + password: + type: string + enabled: + type: boolean + maxLogin: + type: integer + ContentUpdate: + description: The update structure for the profile content. + ContentMetadataUpdate: + description: The update structure for the profile metadata. + UserUpdateWrapper: + type: object + required: + - UserUpdate + properties: + UserUpdate: + $ref: "#/components/schemas/UserUpdate" + UserCreate: + description: This class is used to create a User. + type: object + required: + - mainLanguageCode + - remoteId + - login + - email + - password + properties: + mainLanguageCode: + type: string + remoteId: + type: string + login: + type: string + email: + type: string + password: + type: string + enabled: + type: boolean + UserCreateWrapper: + type: object + required: + - UserCreate + properties: + UserCreate: + $ref: "#/components/schemas/UserCreate" diff --git a/src/bundle/Resources/config/api_platform.yml b/src/bundle/Resources/config/api_platform.yml index 5c14a025e..f0385f1c9 100644 --- a/src/bundle/Resources/config/api_platform.yml +++ b/src/bundle/Resources/config/api_platform.yml @@ -55,3 +55,8 @@ services: - '@@IbexaRestBundle/Resources/api_platform/object_state_groups_schemas.yml' - '@@IbexaRestBundle/Resources/api_platform/services_schemas.yml' - '@@IbexaRestBundle/Resources/api_platform/views_schemas.yml' + - '@@IbexaRestBundle/Resources/api_platform/user/roles_schemas.yml' + - '@@IbexaRestBundle/Resources/api_platform/user/sessions_schemas.yml' + - '@@IbexaRestBundle/Resources/api_platform/user/token_schemas.yml' + - '@@IbexaRestBundle/Resources/api_platform/user/user_groups_schemas.yml' + - '@@IbexaRestBundle/Resources/api_platform/user/users_schemas.yml' diff --git a/src/lib/Server/Controller/Bookmark.php b/src/lib/Server/Controller/Bookmark.php index 377067a3e..b64351596 100644 --- a/src/lib/Server/Controller/Bookmark.php +++ b/src/lib/Server/Controller/Bookmark.php @@ -8,6 +8,11 @@ namespace Ibexa\Rest\Server\Controller; +use ApiPlatform\Metadata\Delete; +use ApiPlatform\Metadata\Get; +use ApiPlatform\Metadata\Post; +use ApiPlatform\OpenApi\Factory\OpenApiFactory; +use ApiPlatform\OpenApi\Model; use Ibexa\Contracts\Core\Repository\BookmarkService; use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; use Ibexa\Contracts\Core\Repository\LocationService; @@ -16,7 +21,148 @@ use Ibexa\Rest\Server\Values; use Ibexa\Rest\Value as RestValue; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +#[Get( + uriTemplate: '/bookmark', + name: 'List of bookmarks', + openapi: new Model\Operation( + summary: 'Lists bookmarked Locations for the current user.', + tags: [ + 'Bookmark', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the list is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.BookmarkList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/BookmarkList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/bookmark/GET/BookmarkList.xml.example', + ], + 'application/vnd.ibexa.api.BookmarkList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/BookmarkListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/bookmark/GET/BookmarkList.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to list bookmarks.', + ], + ], + ), +)] +#[Post( + uriTemplate: '/bookmark/{locationId}', + name: 'Create bookmark', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapiContext: ['requestBody' => false], + openapi: new Model\Operation( + summary: 'Add given Location to bookmarks of the current user.', + tags: [ + 'Bookmark', + ], + parameters: [ + new Model\Parameter( + name: 'locationId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_CREATED => [ + 'description' => 'Created.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to given Location.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the given Location does not exist.', + ], + Response::HTTP_CONFLICT => [ + 'description' => 'Error - Location is already bookmarked.', + ], + ], + ), +)] +#[Head( + uriTemplate: '/bookmark/{locationId}', + name: 'Check if Location is bookmarked', + openapi: new Model\Operation( + summary: 'Checks if the given Location is bookmarked by the current user.', + tags: [ + 'Bookmark', + ], + parameters: [ + new Model\Parameter( + name: 'locationId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - bookmarked.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized for the given Location.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the given Location does not exist / is not bookmarked.', + ], + ], + ), +)] +#[Delete( + uriTemplate: '/bookmark/{locationId}', + name: 'Delete bookmark', + openapi: new Model\Operation( + summary: 'Deletes the given Location from bookmarks of the current user.', + tags: [ + 'Bookmark', + ], + parameters: [ + new Model\Parameter( + name: 'locationId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_NO_CONTENT => [ + 'description' => 'Deleted - no content.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized for the given Location.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the given Location does not exist / is not bookmarked.', + ], + ], + ), +)] class Bookmark extends RestController { /** diff --git a/src/lib/Server/Controller/Content.php b/src/lib/Server/Controller/Content.php index 2b7e680b7..b2bf9f0b1 100644 --- a/src/lib/Server/Controller/Content.php +++ b/src/lib/Server/Controller/Content.php @@ -7,6 +7,12 @@ namespace Ibexa\Rest\Server\Controller; +use ApiPlatform\Metadata\Delete; +use ApiPlatform\Metadata\Get; +use ApiPlatform\Metadata\Patch; +use ApiPlatform\Metadata\Post; +use ApiPlatform\OpenApi\Factory\OpenApiFactory; +use ApiPlatform\OpenApi\Model; use Ibexa\Contracts\Core\Repository\Exceptions\ContentFieldValidationException; use Ibexa\Contracts\Core\Repository\Exceptions\ContentValidationException; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; @@ -23,8 +29,1543 @@ use Ibexa\Rest\Server\Values\RestContentCreateStruct; use JMS\TranslationBundle\Annotation\Ignore; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\HttpKernelInterface; +#[Post( + uriTemplate: '/content/views', + name: 'Create View (deprecated)', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapiContext: ['requestBody' => false], + openapi: new Model\Operation( + summary: 'Executes a query and returns View including the results. The View input reflects the criteria model of the public PHP API. Deprecated as of eZ Platform 1.0 and will respond 301, use POST /views instead.', + tags: [ + 'Views', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'The View in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The View input in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_MOVED_PERMANENTLY => [ + 'description' => 'Moved permanently.', + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - the input does not match the input schema definition.', + ], + ], + ), +)] +#[Post( + uriTemplate: '/content/objects', + name: 'Create content item', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Creates a draft assigned to the authenticated user. If a different user ID is given in the input, the draft is assigned to the given user but this action requires special permissions for the authenticated user (this is useful for content staging where the transfer process does not have to authenticate with the user who created the content item in the source server). The user needs to publish the content item if it should be visible.', + tags: [ + 'Objects', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'Content - If set, all information for the content item including the embedded current version is returned in XML or JSON format. ContentInfo - If set, all information for the content item (excluding the current version) is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The ContentCreate schema encoded in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.ContentCreate+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentCreate', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/POST/ContentCreate.xml.example', + ], + 'application/vnd.ibexa.api.ContentCreate+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentCreateWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/POST/ContentCreate.json.example', + ], + ]), + ), + responses: [ + Response::HTTP_CREATED => [ + 'content' => [ + 'application/vnd.ibexa.api.Content+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/Content', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/GET/Content.xml.example', + ], + 'application/vnd.ibexa.api.Content+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/GET/Content.json.example', + ], + 'application/vnd.ibexa.api.ContentInfo+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentInfoWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/PATCH/ContentInfo.xml.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - the input does not match the input schema definition or the validation on a field fails.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to create this Object in this Location.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the parent Location specified in the request body does not exist.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/content/objects', + name: 'Load content by remote ID', + openapi: new Model\Operation( + summary: 'Loads content item for a given remote ID.', + tags: [ + 'Objects', + ], + parameters: [ + ], + responses: [ + Response::HTTP_TEMPORARY_REDIRECT => [ + 'description' => 'Temporary redirect.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the content with the given remote ID does not exist.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/content/objects/{contentId}', + name: 'Load content', + openapi: new Model\Operation( + summary: 'Loads the content item for the given ID. Depending on the Accept header the current version is embedded (i.e. the current published version or if it does not exist, the draft of the authenticated user).', + tags: [ + 'Objects', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'Content - If set, all information for the content item including the embedded current version is returned in XML or JSON format. ContentInfo - If set, all information for the content item (excluding the current version) is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'If-None-Match', + in: 'header', + required: true, + description: 'If the provided ETag matches the current ETag then a "304 Not Modified" is returned. The ETag changes if the meta data has changed, this happens also if there is a new published version.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'contentId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.Content+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/Content', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/GET/Content.xml.example', + ], + 'application/vnd.ibexa.api.Content+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/GET/Content.json.example', + ], + 'application/vnd.ibexa.api.ContentInfo+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentInfo', + ], + ], + 'application/vnd.ibexa.api.ContentInfo+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentInfoWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/PATCH/ContentInfo.xml.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to read this object. This could also happen if there is no published version yet and another user owns a draft of this content item.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the ID is not found.', + ], + ], + ), +)] +#[Patch( + uriTemplate: '/content/objects/{contentId}', + name: 'Update content', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'This method updates the content metadata which is independent from a version. PATCH or POST with header X-HTTP-Method-Override PATCH.', + tags: [ + 'Objects', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, all information for the content item (excluding the current version) is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'If-match', + in: 'header', + required: true, + description: 'Causes to patch only if the specified ETag is the current one. Otherwise a 412 is returned.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The ContentUpdate schema encoded in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'contentId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.ContentUpdate+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentInfo', + ], + ], + 'application/vnd.ibexa.api.ContentUpdate+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentInfoWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/PATCH/ContentInfo.xml.example', + ], + ]), + ), + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.ContentInfo+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentInfo', + ], + ], + 'application/vnd.ibexa.api.ContentInfo+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentInfoWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/PATCH/ContentInfo.xml.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - the input does not match the input schema definition.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to update this object.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the content ID does not exist.', + ], + Response::HTTP_PRECONDITION_FAILED => [ + 'description' => 'Error - the current ETag does not match with the one provided in the If-Match header.', + ], + Response::HTTP_UNSUPPORTED_MEDIA_TYPE => [ + 'description' => 'Error - the media-type is not one of those specified in headers.', + ], + ], + ), +)] +#[Delete( + uriTemplate: '/content/objects/{contentId}', + name: 'Delete Content', + openapi: new Model\Operation( + summary: 'Deletes content item. If content item has multiple Locations, all of them will be deleted via delete a subtree.', + tags: [ + 'Objects', + ], + parameters: [ + new Model\Parameter( + name: 'contentId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_NO_CONTENT => [ + 'description' => 'The content item is deleted.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - content item was not found.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to delete this content item.', + ], + ], + ), +)] +#[Delete( + uriTemplate: '/content/objects/{contentId}/translations/{languageCode}', + name: 'Delete translation (permanently)', + openapi: new Model\Operation( + summary: 'Permanently deletes a translation from all versions of a content item.', + tags: [ + 'Objects', + ], + parameters: [ + new Model\Parameter( + name: 'contentId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'languageCode', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_NO_CONTENT => [ + 'description' => 'No Content', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to delete content item (content/remove policy).', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the content item was not found.', + ], + Response::HTTP_NOT_ACCEPTABLE => [ + 'description' => 'Error - the given translation does not exist for the content item.', + ], + Response::HTTP_CONFLICT => [ + 'description' => 'Error - the specified translation is the only one any version has or is the main translation.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/content/objects/{contentId}/currentversion', + name: 'Get current version', + openapi: new Model\Operation( + summary: 'Redirects to the current version of the content item.', + tags: [ + 'Objects', + ], + parameters: [ + new Model\Parameter( + name: 'contentId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.Version+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/Version', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/GET/Version.xml.example', + ], + 'application/vnd.ibexa.api.Version+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/VersionWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/GET/Version.json.example', + ], + ], + ], + Response::HTTP_TEMPORARY_REDIRECT => [ + 'description' => 'Temporary redirect.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the resource does not exist.', + ], + ], + ), +)] +#[Post( + uriTemplate: '/content/objects/{contentId}/currentversion', + name: 'Create a draft from current version', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapiContext: ['requestBody' => false], + openapi: new Model\Operation( + summary: 'The system creates a new draft as a copy of the current version. COPY or POST with header X-HTTP-Method-Override COPY.', + tags: [ + 'Objects', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the updated version is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'contentId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_CREATED => [ + 'description' => 'Created', + 'content' => [ + 'application/vnd.ibexa.api.Version+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/Version', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/GET/Version.xml.example', + ], + 'application/vnd.ibexa.api.Version+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/VersionWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/GET/Version.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to update this content item.', + ], + Response::HTTP_FORBIDDEN => [ + 'description' => 'Error - the current version is already a draft.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the content item was not found.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/content/objects/{contentId}/versions', + name: 'List versions', + openapi: new Model\Operation( + summary: 'Returns a list of all versions of the content item. This method does not include fields and relations in the version elements of the response.', + tags: [ + 'Objects', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the version list is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'contentId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.VersionList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/VersionList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/GET/VersionList.xml.example', + ], + 'application/vnd.ibexa.api.VersionList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/VersionListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/GET/VersionList.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user has no permission to read the versions.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/content/objects/{contentId}/versions/{versionNo}', + name: 'Load version', + openapi: new Model\Operation( + summary: 'Loads a specific version of a content item. This method returns Fields and relations.', + tags: [ + 'Objects', + ], + parameters: [ + new Model\Parameter( + name: 'If-None-Match', + in: 'header', + required: true, + description: 'Only return the version if the given ETag is the not current one, otherwise a 304 is returned.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the version list is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'contentId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'versionNo', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.Version+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/Version', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/GET/Version.xml.example', + ], + 'application/vnd.ibexa.api.Version+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/VersionWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/GET/Version.json.example', + ], + ], + ], + Response::HTTP_NOT_MODIFIED => [ + 'description' => 'Error - the ETag does not match the current one.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to read this content item.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the ID or version is not found.', + ], + ], + ), +)] +#[Patch( + uriTemplate: '/content/objects/{contentId}/versions/{versionNo}', + name: 'Update version', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'A specific draft is updated. PATCH or POST with header X-HTTP-Method-Override PATCH.', + tags: [ + 'Objects', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the updated version is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'If-match', + in: 'header', + required: true, + description: 'Performs the patch only if the specified ETag is the current one.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The VersionUpdate schema encoded in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'contentId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'versionNo', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.VersionUpdate+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/VersionUpdate', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/PATCH/VersionUpdate.xml.example', + ], + 'application/vnd.ibexa.api.VersionUpdate+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/VersionUpdateWrapper', + ], + ], + ]), + ), + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.Version+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/Version', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/GET/Version.xml.example', + ], + 'application/vnd.ibexa.api.Version+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/VersionWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/GET/Version.json.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - the input does not match the input schema definition.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to update this version.', + ], + Response::HTTP_FORBIDDEN => [ + 'description' => 'Error - the version is not allowed to change - i.e. version is not a DRAFT.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the content ID or version ID does not exist.', + ], + Response::HTTP_PRECONDITION_FAILED => [ + 'description' => 'Error - the current ETag does not match with the one provided in the If-Match header.', + ], + ], + ), +)] +#[Post( + uriTemplate: '/content/objects/{contentId}/versions/{versionNo}', + name: 'Create a draft from a version', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapiContext: ['requestBody' => false], + openapi: new Model\Operation( + summary: 'The system creates a new draft as a copy of the given version. COPY or POST with header X-HTTP-Method-Override COPY.', + tags: [ + 'Objects', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the updated version is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'contentId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'versionNo', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_CREATED => [ + 'description' => 'Created.', + 'content' => [ + 'application/vnd.ibexa.api.Version+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/Version', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/GET/Version.xml.example', + ], + 'application/vnd.ibexa.api.Version+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/VersionWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/GET/Version.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to update this content item.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the content item was not found.', + ], + ], + ), +)] +#[Delete( + uriTemplate: '/content/objects/{contentId}/versions/{versionNo}', + name: 'Delete content version', + openapi: new Model\Operation( + summary: 'Deletes the content version.', + tags: [ + 'Objects', + ], + parameters: [ + new Model\Parameter( + name: 'contentId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'versionNo', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_NO_CONTENT => [ + 'description' => 'No Content - the version is deleted.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the content item or version were not found.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to delete this version.', + ], + Response::HTTP_FORBIDDEN => [ + 'description' => 'Error - the version is in published state.', + ], + ], + ), +)] +#[Delete( + uriTemplate: '/content/objects/{contentId}/versions/{versionNo}/translations/{languageCode}', + name: 'Delete translation from version draft', + openapi: new Model\Operation( + summary: 'Removes a translation from a version draft.', + tags: [ + 'Objects', + ], + parameters: [ + new Model\Parameter( + name: 'contentId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'versionNo', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'languageCode', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_NO_CONTENT => [ + 'description' => 'No Content - removes a translation from a version draft.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to delete this translation.', + ], + Response::HTTP_FORBIDDEN => [ + 'description' => 'Error - the version is not in draft state.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the content item or version number were not found.', + ], + Response::HTTP_NOT_ACCEPTABLE => [ + 'description' => 'Error - the given translation does not exist for the version.', + ], + Response::HTTP_CONFLICT => [ + 'description' => 'Error - the specified translation is the only one the version has or is the main translation.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/content/objects/{contentId}/versions/{versionNo}/relations', + name: 'Load Relations of content item version', + openapi: new Model\Operation( + summary: 'Loads the Relations of the given version.', + tags: [ + 'Objects', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the Relation is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'contentId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'versionNo', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.RelationList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RelationList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/GET/RelationList.xml.example', + ], + 'application/vnd.ibexa.api.RelationList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RelationListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/GET/RelationList.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to read this content item.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the content item was not found.', + ], + ], + ), +)] +#[Post( + uriTemplate: '/content/objects/{contentId}/versions/{versionNo}/relations', + name: 'Create new Relation', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Creates a new Relation of type COMMON for the given draft.', + tags: [ + 'Objects', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the updated version is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The RelationCreate schema encoded in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'contentId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'versionNo', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.RelationCreate+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RelationCreate', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/POST/RelationCreate.xml.example', + ], + 'application/vnd.ibexa.api.RelationCreate+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RelationCreateWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/POST/RelationCreate.json.example', + ], + ]), + ), + responses: [ + Response::HTTP_CREATED => [ + 'content' => [ + 'application/vnd.ibexa.api.Relation+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/Relation', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/relation_id/GET/Relation.xml.example', + ], + 'application/vnd.ibexa.api.Relation+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RelationWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/POST/Relation.json.example', + ], + ], + ], + ], + ), +)] +#[Get( + uriTemplate: '/content/objects/{contentId}/versions/{versionNo}/relations/{relationId}', + name: 'Load Relation', + openapi: new Model\Operation( + summary: 'Loads a Relation for the given content item.', + tags: [ + 'Objects', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the Relation is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'contentId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'versionNo', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'relationId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - loads a Relation for the given content item.', + 'content' => [ + 'application/vnd.ibexa.api.Relation+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/Relation', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/relation_id/GET/Relation.xml.example', + ], + 'application/vnd.ibexa.api.Relation+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RelationWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/versions/version_no/relations/POST/Relation.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to read this content item.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the content item with the given ID or the Relation does not exist.', + ], + ], + ), +)] +#[Delete( + uriTemplate: '/content/objects/{contentId}/versions/{versionNo}/relations/{relationId}', + name: 'Delete Relation', + openapi: new Model\Operation( + summary: 'Deletes a Relation of the given draft.', + tags: [ + 'Objects', + ], + parameters: [ + new Model\Parameter( + name: 'contentId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'versionNo', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'relationId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_NO_CONTENT => [ + 'description' => 'No Content - deleted a Relation of the given draft.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to delete this Relation.', + ], + Response::HTTP_FORBIDDEN => [ + 'description' => 'Error - the Relation is not of type COMMON or the given version is not a draft.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - content item or the Relation were not found in the given version.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/content/objects/{contentId}/relations', + name: 'Load Relations of content item', + openapi: new Model\Operation( + summary: 'Redirects to the Relations of the current version.', + tags: [ + 'Objects', + ], + parameters: [ + new Model\Parameter( + name: 'contentId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_TEMPORARY_REDIRECT => [ + 'description' => 'Temporary redirect.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to read this content item.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the content item was not found.', + ], + ], + ), +)] +#[Post( + uriTemplate: '/content/objects/{contentId}/locations', + name: 'Create new Location for content item', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Creates a new Location for the given content item.', + tags: [ + 'Objects', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the new Location is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The LocationCreate schema encoded in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'contentId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.LocationCreate+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/LocationCreate', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/locations/POST/LocationCreate.xml.example', + ], + 'application/vnd.ibexa.api.LocationCreate+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/LocationCreateWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/locations/POST/LocationCreate.json.example', + ], + ]), + ), + responses: [ + Response::HTTP_CREATED => [ + 'content' => [ + 'application/vnd.ibexa.api.Location+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/Location', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/locations/POST/Location.xml.example', + ], + 'application/vnd.ibexa.api.Location+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/LocationWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/locations/POST/Location.json.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - the input does not match the input schema definition.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to create this Location.', + ], + Response::HTTP_FORBIDDEN => [ + 'description' => 'Error - a Location under the given parent ID already exists.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/content/objects/{contentId}/locations', + name: 'Get Locations for content item', + openapi: new Model\Operation( + summary: 'Loads all Locations for the given content item.', + tags: [ + 'Objects', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the Location list is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'If-None-Match', + in: 'header', + required: true, + description: 'ETag', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'contentId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.LocationList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/LocationList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/locations/GET/LocationList.xml.example', + ], + 'application/vnd.ibexa.api.LocationList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/LocationListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/locations/GET/LocationList.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to read this content item.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the content item with the given ID does not exist.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/content/objects/{contentId}/objectstates', + name: 'Get Object states of content item', + openapi: new Model\Operation( + summary: 'Returns the Object states of a content item', + tags: [ + 'Objects', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the Object states are returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'If-None-Match', + in: 'header', + required: true, + description: 'ETag', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'contentId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - returns the Object state.', + 'content' => [ + 'application/vnd.ibexa.api.ContentObjectStates+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentObjectStates', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/objectstates/PATCH/ContentObjectStates.response.xml.example', + ], + 'application/vnd.ibexa.api.ContentObjectStates+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentObjectStatesWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/objectstates/GET/ContentObjectStates.json.example', + ], + ], + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - The content item does not exist.', + ], + ], + ), +)] +#[Patch( + uriTemplate: '/content/objects/{contentId}/objectstates', + name: 'Set Object states of content item', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Updates Object states of a content item. An Object state in the input overrides the state of the Object state group. PATCH or POST with header X-HTTP-Method-Override PATCH.', + tags: [ + 'Objects', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the updated Object state is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The content item Object states input schema encoded in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'If-Match', + in: 'header', + required: true, + description: 'ETag', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'contentId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.ContentObjectStates+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentObjectStates', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/objectstates/PATCH/ContentObjectStates.response.xml.example', + ], + 'application/vnd.ibexa.api.ContentObjectStates+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentObjectStatesWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/objectstates/GET/ContentObjectStates.json.example', + ], + ]), + ), + responses: [ + Response::HTTP_NO_CONTENT => [ + 'description' => 'OK - Object state updated.', + 'content' => [ + 'application/vnd.ibexa.api.ContentObjectStates+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentObjectStates', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/objectstates/PATCH/ContentObjectStates.response.xml.example', + ], + 'application/vnd.ibexa.api.ContentObjectStates+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentObjectStatesWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/objectstates/GET/ContentObjectStates.json.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - The input does not match the input schema definition.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to set an Object state.', + ], + Response::HTTP_FORBIDDEN => [ + 'description' => 'Error - The input contains multiple Object states of the same Object state group.', + ], + Response::HTTP_PRECONDITION_FAILED => [ + 'description' => 'Error - The current ETag does not match the one provided in the If-Match header.', + ], + ], + ), +)] +#[Post( + uriTemplate: '/content/objects/{contentId}/hide', + name: 'Hide content item', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapiContext: ['requestBody' => false], + openapi: new Model\Operation( + summary: 'Makes or keep the content item invisible', + tags: [ + 'Objects', + ], + parameters: [ + new Model\Parameter( + name: 'contentId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_NO_CONTENT => [ + 'description' => 'OK - Object item is hidden.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user has no permission to change Object item visibility.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - The content item was not found.', + ], + ], + ), +)] +#[Post( + uriTemplate: '/content/objects/{contentId}/reveal', + name: 'Reveal content item', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapiContext: ['requestBody' => false], + openapi: new Model\Operation( + summary: 'Makes or keep the content item visible', + tags: [ + 'Objects', + ], + parameters: [ + new Model\Parameter( + name: 'contentId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_NO_CONTENT => [ + 'description' => 'OK - Object item is revealed.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user has no permission to change Object item visibility.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - The content item was not found.', + ], + ], + ), +)] /** * Content controller. */ diff --git a/src/lib/Server/Controller/ContentType.php b/src/lib/Server/Controller/ContentType.php index 94d03a405..4166000d7 100644 --- a/src/lib/Server/Controller/ContentType.php +++ b/src/lib/Server/Controller/ContentType.php @@ -7,6 +7,12 @@ namespace Ibexa\Rest\Server\Controller; +use ApiPlatform\Metadata\Delete; +use ApiPlatform\Metadata\Get; +use ApiPlatform\Metadata\Patch; +use ApiPlatform\Metadata\Post; +use ApiPlatform\OpenApi\Factory\OpenApiFactory; +use ApiPlatform\OpenApi\Model; use Ibexa\Contracts\Core\Repository\ContentTypeService; use Ibexa\Contracts\Core\Repository\Exceptions\BadStateException; use Ibexa\Contracts\Core\Repository\Exceptions\ContentTypeFieldDefinitionValidationException; @@ -24,7 +30,1481 @@ use Ibexa\Rest\Server\Values; use JMS\TranslationBundle\Annotation\Ignore; use Symfony\Component\HttpFoundation\Request; - +use Symfony\Component\HttpFoundation\Response; + +#[Get( + uriTemplate: '/content/types', + name: 'List content types', + openapi: new Model\Operation( + summary: 'Returns a list of content types.', + tags: [ + 'Type', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the list of content type info objects or content types (including Field definitions) is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - returns a list of content types.', + 'content' => [ + 'application/vnd.ibexa.api.ContentTypeInfoList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeInfoList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/GET/ContentTypeInfoList.xml.example', + ], + 'application/vnd.ibexa.api.ContentTypeInfoList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeInfoListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/GET/ContentTypeInfoList.json.example', + ], + 'application/vnd.ibexa.api.ContentTypeList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeList', + ], + ], + 'application/vnd.ibexa.api.ContentTypeList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeListWrapper', + ], + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user has no permission to read the content types.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/content/types/{contentTypeId}', + name: 'Get content type', + openapi: new Model\Operation( + summary: 'Returns the content type with the provided ID.', + tags: [ + 'Type', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the content type is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'If-None-Match', + in: 'header', + required: true, + description: 'ETag', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'contentTypeId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - returns the content type.', + 'content' => [ + 'application/vnd.ibexa.api.ContentType+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentType', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/draft/PUBLISH/ContentType.xml.example', + ], + 'application/vnd.ibexa.api.ContentType+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/GET/ContentType.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to read this content type.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - The content type does not exist.', + ], + ], + ), +)] +#[Post( + uriTemplate: '/content/types/{contentTypeId}', + name: 'Create Draft', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Creates a draft and updates it with the given data.', + tags: [ + 'Type', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the new content type draft is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The content type Update schema encoded in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'contentTypeId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.ContentTypeUpdate+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeUpdate', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/POST/ContentTypeUpdate.xml.example', + ], + 'application/vnd.ibexa.api.ContentTypeUpdate+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeUpdateWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/POST/ContentTypeUpdate.json.example', + ], + ]), + ), + responses: [ + Response::HTTP_CREATED => [ + 'description' => 'Draft created.', + 'content' => [ + 'application/vnd.ibexa.api.ContentTypeInfo+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeInfo', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/draft/PATCH/ContentTypeInfo.xml.example', + ], + 'application/vnd.ibexa.api.ContentTypeInfo+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeInfoWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/draft/PATCH/ContentTypeInfo.json.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - The input does not match the input schema definition.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to create the draft.', + ], + Response::HTTP_FORBIDDEN => [ + 'description' => 'Error - A content type with the given new identifier already exists. A draft already exists.', + ], + ], + ), +)] +#[Delete( + uriTemplate: '/content/types/{contentTypeId}', + name: 'Delete content type', + openapi: new Model\Operation( + summary: 'Deletes the provided content type.', + tags: [ + 'Type', + ], + parameters: [ + new Model\Parameter( + name: 'contentTypeId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_NO_CONTENT => [ + 'description' => 'No Content - content type deleted.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to delete this content type.', + ], + Response::HTTP_FORBIDDEN => [ + 'description' => 'Error - There are object instances of this content type.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - The content type does not exist.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/content/types/{contentTypeId}/fieldDefinitions', + name: 'Get Field definition list', + openapi: new Model\Operation( + summary: 'Returns all Field definitions of the provided content type.', + tags: [ + 'Type', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the Field definitions are returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'contentTypeId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - return a list of Field definitions.', + 'content' => [ + 'application/vnd.ibexa.api.FieldDefinitionList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/FieldDefinitions', + ], + ], + 'application/vnd.ibexa.api.FieldDefinitionList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/FieldDefinitionsWrapper', + ], + ], + ], + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - The content type does not exist.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/content/types/{contentTypeId}/fieldDefinitions/{fieldDefinitionId}', + name: 'Get Field definition', + openapi: new Model\Operation( + summary: 'Returns the Field definition by the given ID.', + tags: [ + 'Type', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the Field definition is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'contentTypeId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'fieldDefinitionId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - returns the Field definition.', + 'content' => [ + 'application/vnd.ibexa.api.FieldDefinition+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/FieldDefinition', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/field_definition_id/GET/FieldDefinition.xml.example', + ], + 'application/vnd.ibexa.api.FieldDefinition+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/FieldDefinitionWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/field_definition_id/GET/FieldDefinition.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to read the content type.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - The content type does not exist.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/content/types/{contentTypeId}/draft', + name: 'Get content type draft', + openapi: new Model\Operation( + summary: 'Returns the draft of the content type with the provided ID.', + tags: [ + 'Type', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the content type is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'contentTypeId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - returns the content type.', + 'content' => [ + 'application/vnd.ibexa.api.ContentType+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentType', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/draft/PUBLISH/ContentType.xml.example', + ], + 'application/vnd.ibexa.api.ContentType+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/GET/ContentType.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to read this content type.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - The content type does not exist or does not have a draft.', + ], + ], + ), +)] +#[Patch( + uriTemplate: '/content/types/{contentTypeId}/draft', + name: 'Update content type draft', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Updates metadata of a draft. This method does not handle Field definitions. PATCH or POST with header X-HTTP-Method-Override PATCH.', + tags: [ + 'Type', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the new content type draft is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The content type update schema encoded in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'contentTypeId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.ContentTypeUpdate+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeUpdate', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/POST/ContentTypeUpdate.xml.example', + ], + 'application/vnd.ibexa.api.ContentTypeUpdate+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeUpdateWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/POST/ContentTypeUpdate.json.example', + ], + ]), + ), + responses: [ + Response::HTTP_OK => [ + 'description' => 'Draft metadata updated.', + 'content' => [ + 'application/vnd.ibexa.api.ContentTypeInfo+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeInfo', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/draft/PATCH/ContentTypeInfo.xml.example', + ], + 'application/vnd.ibexa.api.ContentTypeInfo+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeInfoWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/draft/PATCH/ContentTypeInfo.json.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - The input does not match the input schema definition.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to update the draft.', + ], + Response::HTTP_FORBIDDEN => [ + 'description' => 'Error - A content type with the given new identifier already exists.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - There is no draft for this content type.', + ], + ], + ), +)] +#[Delete( + uriTemplate: '/content/types/{contentTypeId}/draft', + name: 'Delete content type draft', + openapi: new Model\Operation( + summary: 'Deletes the provided content type draft.', + tags: [ + 'Type', + ], + parameters: [ + new Model\Parameter( + name: 'contentTypeId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_NO_CONTENT => [ + 'description' => 'No Content - content type draft deleted.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to delete this content type draft.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - The content type draft does not exist.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/content/types/{contentTypeId}/draft/fieldDefinitions', + name: 'Get Draft Field definition list', + openapi: new Model\Operation( + summary: 'Returns all Field definitions of the provided content type Draft.', + tags: [ + 'Type', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the Field definitions are returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'contentTypeId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - return a list of Field definitions.', + 'content' => [ + 'application/vnd.ibexa.api.FieldDefinitionList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/FieldDefinitions', + ], + ], + 'application/vnd.ibexa.api.FieldDefinitionList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/FieldDefinitionsWrapper', + ], + ], + ], + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - The content type draft does not exist.', + ], + ], + ), +)] +#[Post( + uriTemplate: '/content/types/{contentTypeId}/draft/fieldDefinitions', + name: 'Add content type Draft Field definition', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Creates a new Field definition for the given content type.', + tags: [ + 'Type', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the new Field definition is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The Field Definition Create schema encoded in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'contentTypeId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.FieldDefinitionCreate+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/FieldDefinitionCreate', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/draft/field_definitions/POST/FieldDefinitionCreate.xml.example', + ], + 'application/vnd.ibexa.api.FieldDefinitionCreate+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/FieldDefinitionCreateWrapper', + ], + ], + ]), + ), + responses: [ + Response::HTTP_CREATED => [ + 'description' => 'Field definition created.', + 'content' => [ + 'application/vnd.ibexa.api.FieldDefinition+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/FieldDefinition', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/field_definition_id/GET/FieldDefinition.xml.example', + ], + 'application/vnd.ibexa.api.FieldDefinition+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/FieldDefinitionWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/field_definition_id/GET/FieldDefinition.json.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - The input does not match the input schema definition or validation on the Field definition fails.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to add a Field definition.', + ], + Response::HTTP_FORBIDDEN => [ + 'description' => 'Error - A Field definition with the same identifier already exists in the given content type. The Field definition is of singular type, already existing in the given content type. The Field definition you want to add is of a type that can\'t be added to a content type that already has content instances.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/content/types/{contentTypeId}/draft/fieldDefinitions/{fieldDefinitionId}', + name: 'Get content type Draft Field definition', + openapi: new Model\Operation( + summary: 'Returns the Field definition by the given ID.', + tags: [ + 'Type', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the Field definition is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'contentTypeId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'fieldDefinitionId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - returns the Field definition.', + 'content' => [ + 'application/vnd.ibexa.api.FieldDefinition+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/FieldDefinition', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/field_definition_id/GET/FieldDefinition.xml.example', + ], + 'application/vnd.ibexa.api.FieldDefinition+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/FieldDefinitionWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/field_definition_id/GET/FieldDefinition.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to read the content type draft.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - The content type or draft does not exist.', + ], + ], + ), +)] +#[Patch( + uriTemplate: '/content/types/{contentTypeId}/draft/fieldDefinitions/{fieldDefinitionId}', + name: 'Update content type Draft Field definition', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Updates the attributes of a Field definition.', + tags: [ + 'Type', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the updated Field definition is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The Field definition update schema encoded in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'contentTypeId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'fieldDefinitionId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.FieldDefinitionUpdate+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/FieldDefinitionUpdate', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/draft/field_definitions/field_definition_id/PATCH/FieldDefinitionUpdate.xml.example', + ], + 'application/vnd.ibexa.api.FieldDefinitionUpdate+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/FieldDefinitionUpdateWrapper', + ], + ], + ]), + ), + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - attributes updated.', + 'content' => [ + 'application/vnd.ibexa.api.FieldDefinition+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/FieldDefinition', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/field_definition_id/GET/FieldDefinition.xml.example', + ], + 'application/vnd.ibexa.api.FieldDefinition+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/FieldDefinitionWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/field_definition_id/GET/FieldDefinition.json.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - The input does not match the input schema definition.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to update the Field definition.', + ], + Response::HTTP_FORBIDDEN => [ + 'description' => 'Error - A Field definition with the given identifier already exists in the given content type.', + ], + ], + ), +)] +#[Delete( + uriTemplate: '/content/types/{contentTypeId}/draft/fieldDefinitions/{fieldDefinitionId}', + name: 'Delete content type Draft Field definition', + openapi: new Model\Operation( + summary: 'Deletes the provided Field definition.', + tags: [ + 'Type', + ], + parameters: [ + new Model\Parameter( + name: 'contentTypeId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'fieldDefinitionId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_NO_CONTENT => [ + 'description' => 'No Content - Field definition deleted.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to delete this content type.', + ], + Response::HTTP_FORBIDDEN => [ + 'description' => 'Error - There is no draft of the content type assigned to the authenticated user.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/content/types/{contentTypeId}/groups', + name: 'Get groups of content type', + openapi: new Model\Operation( + summary: 'Returns the content type group to which content type belongs to.', + tags: [ + 'Type', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the content type group list is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'contentTypeId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.ContentTypeGroupRefList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeGroupRefList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/groups/id/DELETE/ContentTypeGroupRefList.xml.example', + ], + 'application/vnd.ibexa.api.ContentTypeGroupRefList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeGroupRefListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/groups/id/DELETE/ContentTypeGroupRefList.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to read this content type.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - The content type does not exist.', + ], + ], + ), +)] +#[Post( + uriTemplate: '/content/types/{contentTypeId}/groups', + name: 'Link group to content type', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapiContext: ['requestBody' => false], + openapi: new Model\Operation( + summary: 'Links a content type group to the content type and returns the updated group list.', + tags: [ + 'Type', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the updated content type group list is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'contentTypeId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.ContentTypeGroupRefList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeGroupRefList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/groups/id/DELETE/ContentTypeGroupRefList.xml.example', + ], + 'application/vnd.ibexa.api.ContentTypeGroupRefList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeGroupRefListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/groups/id/DELETE/ContentTypeGroupRefList.json.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - The input does not match the input schema definition.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to add a group.', + ], + Response::HTTP_FORBIDDEN => [ + 'description' => 'Error - The content type is already assigned to the group.', + ], + ], + ), +)] +#[Delete( + uriTemplate: '/content/types/{contentTypeId}/groups/{id}', + name: 'Unlink group from content type', + openapi: new Model\Operation( + summary: 'Removes the given group from the content type and returns the updated group list.', + tags: [ + 'Type', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the updated content type group list is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'contentTypeId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'id', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.ContentTypeGroupRefList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeGroupRefList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/groups/id/DELETE/ContentTypeGroupRefList.xml.example', + ], + 'application/vnd.ibexa.api.ContentTypeGroupRefList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeGroupRefListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/groups/id/DELETE/ContentTypeGroupRefList.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to delete this content type.', + ], + Response::HTTP_FORBIDDEN => [ + 'description' => 'Error - content type cannot be unlinked from the only remaining group.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - The resource does not exist.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/content/typegroups', + name: 'Get content type groups', + openapi: new Model\Operation( + summary: 'Returns a list of all content type groups. If an identifier is provided, loads the content type group for this identifier.', + tags: [ + 'Type Groups', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the content type group list is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - returns a list of content type groups.', + 'content' => [ + 'application/vnd.ibexa.api.ContentTypeGroupList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeGroupList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/typegroups/GET/ContentTypeGroupList.xml.example', + ], + 'application/vnd.ibexa.api.ContentTypeGroupList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeGroupListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/typegroups/GET/ContentTypeGroupList.json.example', + ], + ], + ], + Response::HTTP_TEMPORARY_REDIRECT => [ + 'description' => 'Temporary redirect.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user has no permission to read content types.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - The content type group with the given identifier does not exist.', + ], + ], + ), +)] +#[Post( + uriTemplate: '/content/typegroups', + name: 'Create content type group', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Creates a new content type group.', + tags: [ + 'Type Groups', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the new content type group is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The content type group input schema encoded in XML or JSON.', + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.ContentTypeGroupInput+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeGroupInput', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/typegroups/POST/ContentTypeGroupInput.xml.example', + ], + 'application/vnd.ibexa.api.ContentTypeGroupInput+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeGroupInputWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/typegroups/POST/ContentTypeGroupInput.json.example', + ], + ]), + ), + responses: [ + Response::HTTP_CREATED => [ + 'description' => 'Content type group created.', + 'content' => [ + 'application/vnd.ibexa.api.ContentTypeGroup+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeGroup', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/typegroups/POST/ContentTypeGroup.xml.example', + ], + 'application/vnd.ibexa.api.ContentTypeGroup+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeGroupWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/PATCH/ContentTypeGroup.json.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - The input does not match the input schema definition.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to create this content type group.', + ], + Response::HTTP_FORBIDDEN => [ + 'description' => 'Error - A content type group with the same identifier already exists.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/content/typegroups/{contentTypeGroupId}', + name: 'Get content type group', + openapi: new Model\Operation( + summary: 'Returns the content type group with provided ID.', + tags: [ + 'Type Groups', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the content type group is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'If-None-Match', + in: 'header', + required: true, + description: 'ETag', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'contentTypeGroupId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - returns the content type group.', + 'content' => [ + 'application/vnd.ibexa.api.ContentTypeGroup+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/GET/ContentTypeInfoList.xml.example', + ], + 'application/vnd.ibexa.api.ContentTypeGroup+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/GET/ContentTypeInfoList.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to read this content type group.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - The content type group does not exist.', + ], + ], + ), +)] +#[Patch( + uriTemplate: '/content/typegroups/{contentTypeGroupId}', + name: 'Update content type group', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Updates a content type group. PATCH or POST with header X-HTTP-Method-Override PATCH.', + tags: [ + 'Type Groups', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the updated content type group is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The content type group input schema encoded in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'If-Match', + in: 'header', + required: true, + description: 'ETag causes patching only if the specified ETag is the current one. Otherwise a 412 is returned.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'contentTypeGroupId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.ContentTypeGroupInput+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeGroupInput', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/typegroups/POST/ContentTypeGroupInput.xml.example', + ], + 'application/vnd.ibexa.api.ContentTypeGroupInput+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeGroupInputWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/typegroups/POST/ContentTypeGroupInput.json.example', + ], + ]), + ), + responses: [ + Response::HTTP_OK => [ + 'description' => 'Content type group updated.', + 'content' => [ + 'application/vnd.ibexa.api.ContentTypeGroup+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeGroup', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/typegroups/POST/ContentTypeGroup.xml.example', + ], + 'application/vnd.ibexa.api.ContentTypeGroup+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeGroupWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/PATCH/ContentTypeGroup.json.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - The input does not match the input schema definition.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to create this content type group.', + ], + Response::HTTP_FORBIDDEN => [ + 'description' => 'Error - A content type group with the given identifier already exists.', + ], + Response::HTTP_PRECONDITION_FAILED => [ + 'description' => 'Error - The current ETag does not match the one provided in the If-Match header.', + ], + ], + ), +)] +#[Delete( + uriTemplate: '/content/typegroups/{contentTypeGroupId}', + name: 'Delete content type group', + openapi: new Model\Operation( + summary: 'Deletes the provided content type group.', + tags: [ + 'Type Groups', + ], + parameters: [ + new Model\Parameter( + name: 'contentTypeGroupId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_NO_CONTENT => [ + 'description' => 'No Content - content type group deleted.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to delete this content type group.', + ], + Response::HTTP_FORBIDDEN => [ + 'description' => 'Error - The content type group is not empty.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - The content type group does not exist.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/content/typegroups/{contentTypeGroupId}/types', + name: 'List content types for group', + openapi: new Model\Operation( + summary: 'Returns a list of content types in the provided group.', + tags: [ + 'Type Groups', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the list of content type info objects or content types (including Field definitions) is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'contentTypeGroupId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - returns a list on content types.', + 'content' => [ + 'application/vnd.ibexa.api.ContentTypeInfoList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeInfoList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/types/GET/ContentTypeInfoList.xml.example', + ], + 'application/vnd.ibexa.api.ContentTypeInfoList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeInfoListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/GET/ContentTypeInfoList.json.example', + ], + 'application/vnd.ibexa.api.ContentTypeList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/GET/ContentTypeInfoList.xml.example', + ], + 'application/vnd.ibexa.api.ContentTypeList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/GET/ContentTypeInfoList.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user has no permission to read the content types.', + ], + ], + ), +)] +#[Post( + uriTemplate: '/content/typegroups/{contentTypeGroupId}/types', + name: 'Create content type', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Creates a new content type draft in the given content type group.', + tags: [ + 'Type Groups', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the new content type or draft is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The content type Create schema encoded in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'contentTypeGroupId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.ContentTypeCreate+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeCreate', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/types/POST/ContentTypeCreate.xml.example', + ], + 'application/vnd.ibexa.api.ContentTypeCreate+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeCreateWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/typegroups/content_type_group_id/types/POST/ContentTypeCreate.json.example', + ], + ]), + ), + responses: [ + Response::HTTP_CREATED => [ + 'description' => 'Content type created.', + 'content' => [ + 'application/vnd.ibexa.api.ContentType+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentType', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/types/content_type_id/draft/PUBLISH/ContentType.xml.example', + ], + 'application/vnd.ibexa.api.ContentType+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ContentTypeWrapper', + ], + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - The input does not match the input schema definition. Validation on a Field definition fails. Validation of the content type fails, e.g. multiple Fields of a same singular Field Type are provided. Publish is set to true and the input is not complete e.g. no Field definitions are provided.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to create this content type.', + ], + Response::HTTP_FORBIDDEN => [ + 'description' => 'Error - A content type with same identifier already exists.', + ], + ], + ), +)] /** * ContentType controller. */ diff --git a/src/lib/Server/Controller/JWT.php b/src/lib/Server/Controller/JWT.php index f1f705b3b..fabaf68af 100644 --- a/src/lib/Server/Controller/JWT.php +++ b/src/lib/Server/Controller/JWT.php @@ -8,9 +8,81 @@ namespace Ibexa\Rest\Server\Controller; +use ApiPlatform\Metadata\Post; +use ApiPlatform\OpenApi\Factory\OpenApiFactory; +use ApiPlatform\OpenApi\Model; use Ibexa\Rest\Server\Controller as RestController; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +#[Post( + uriTemplate: '/user/token/jwt', + name: 'Create JWT token', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Creates JWT authentication token.', + tags: [ + 'User Token', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the token is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The SessionInput schema encoded in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.JWTInput+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/JWTInput', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/token/jwt/POST/JWTInput.xml.example', + ], + 'application/vnd.ibexa.api.JWTInput+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/JWTInputWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/token/jwt/POST/JWTInput.json.example', + ], + ]), + ), + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.JWT+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/JWT', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/token/jwt/POST/JWT.xml.example', + ], + 'application/vnd.ibexa.api.JWT+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/JWTWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/token/jwt/POST/JWT.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - Unauthorized', + ], + ], + ), +)] final class JWT extends RestController { public function createToken(Request $request): void diff --git a/src/lib/Server/Controller/Location.php b/src/lib/Server/Controller/Location.php index 8f60e6f2b..5f05f5feb 100644 --- a/src/lib/Server/Controller/Location.php +++ b/src/lib/Server/Controller/Location.php @@ -7,6 +7,11 @@ namespace Ibexa\Rest\Server\Controller; +use ApiPlatform\Metadata\Delete; +use ApiPlatform\Metadata\Get; +use ApiPlatform\Metadata\Patch; +use ApiPlatform\OpenApi\Factory\OpenApiFactory; +use ApiPlatform\OpenApi\Model; use Ibexa\Contracts\Core\Repository\ContentService; use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; use Ibexa\Contracts\Core\Repository\LocationService; @@ -20,7 +25,339 @@ use Ibexa\Rest\Server\Values; use JMS\TranslationBundle\Annotation\Ignore; use Symfony\Component\HttpFoundation\Request; - +use Symfony\Component\HttpFoundation\Response; + +#[Get( + uriTemplate: '/content/locations', + name: 'Load Locations by id/remoteId/urlAlias', + openapi: new Model\Operation( + summary: 'Loads the Location for a given ID (x), remote ID or URL alias.', + tags: [ + 'Location', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.LocationList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/Location', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/locations/POST/Location.xml.example', + ], + 'application/vnd.ibexa.api.LocationList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/LocationWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/locations/POST/Location.json.example', + ], + ], + ], + Response::HTTP_TEMPORARY_REDIRECT => [ + 'description' => 'Temporary redirect to the main resource URL.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the Location with the given ID (remote ID or URL Alias) does not exist.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/content/locations/{path}', + name: 'Load Location', + openapi: new Model\Operation( + summary: 'Loads the Location for the given path e.g. \'/content/locations/1/2/61\'.', + tags: [ + 'Location', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the new Location is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'If-None-Match', + in: 'header', + required: true, + description: 'ETag', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'path', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.Location+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/Location', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/locations/POST/Location.xml.example', + ], + 'application/vnd.ibexa.api.Location+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/LocationWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/locations/POST/Location.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to read this Location.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the Location with the given path does not exist.', + ], + ], + ), +)] +#[Delete( + uriTemplate: '/content/locations/{path}', + name: 'Delete subtree', + openapi: new Model\Operation( + summary: 'Deletes the complete subtree for the given path. Every content item which does not have any other Location is deleted. Otherwise the deleted Location is removed from the content item. The children are recursively deleted.', + tags: [ + 'Location', + ], + parameters: [ + new Model\Parameter( + name: 'path', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_NO_CONTENT => [ + 'description' => 'No Content - deleted.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to delete this subtree.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the Location with the given ID does not exist.', + ], + ], + ), +)] +#[Patch( + uriTemplate: '/content/locations/{path}', + name: 'Update Location', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Updates the Location. This method can also be used to hide/reveal a Location via the hidden field in the LocationUpdate. PATCH or POST with header X-HTTP-Method-Override PATCH.', + tags: [ + 'Location', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the Location is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The LocationUpdate schema encoded in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'If-Match', + in: 'header', + required: true, + description: 'ETag', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'path', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.LocationUpdate+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/LocationUpdateStruct', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/locations/location_id/PATCH/LocationUpdate.xml.example', + ], + 'application/vnd.ibexa.api.LocationUpdate+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/LocationUpdateStructWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/locations/location_id/PATCH/LocationUpdate.json.example', + ], + ]), + ), + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.Location+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/Location', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/locations/POST/Location.xml.example', + ], + 'application/vnd.ibexa.api.Location+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/LocationWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/locations/POST/Location.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to update this Location.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the Location with the given ID does not exist.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/content/locations/{path}/children', + name: 'Get child Locations.', + openapi: new Model\Operation( + summary: 'Loads all child Locations for the given parent Location.', + tags: [ + 'Location', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the new Location list is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'path', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.LocationList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/LocationList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/locations/GET/LocationList.xml.example', + ], + 'application/vnd.ibexa.api.LocationList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/LocationList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objects/content_id/locations/GET/LocationList.xml.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to read this content item.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the content item with the given ID does not exist.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/content/locations/{path}/urlaliases', + name: 'List URL aliases for Location', + openapi: new Model\Operation( + summary: 'Returns the list of URL aliases for a Location.', + tags: [ + 'Location', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the URL alias list contains only references and is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'path', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - returns the list of URL aliases.', + 'content' => [ + 'application/vnd.ibexa.api.UrlAliasRefList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UrlAliasRefList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/urlaliases/GET/UrlAliasRefList.xml.example', + ], + 'application/vnd.ibexa.api.UrlAliasRefList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UrlAliasRefListWrapper', + ], + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - The user has no permission to read URL aliases.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The Location was not found.', + ], + ], + ), +)] /** * Location controller. */ diff --git a/src/lib/Server/Controller/ObjectState.php b/src/lib/Server/Controller/ObjectState.php index 9f6ab55f1..ba8524475 100644 --- a/src/lib/Server/Controller/ObjectState.php +++ b/src/lib/Server/Controller/ObjectState.php @@ -7,6 +7,12 @@ namespace Ibexa\Rest\Server\Controller; +use ApiPlatform\Metadata\Delete; +use ApiPlatform\Metadata\Get; +use ApiPlatform\Metadata\Patch; +use ApiPlatform\Metadata\Post; +use ApiPlatform\OpenApi\Factory\OpenApiFactory; +use ApiPlatform\OpenApi\Model; use Ibexa\Contracts\Core\Repository\ContentService; use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; @@ -20,7 +26,680 @@ use Ibexa\Rest\Values\RestObjectState; use JMS\TranslationBundle\Annotation\Ignore; use Symfony\Component\HttpFoundation\Request; - +use Symfony\Component\HttpFoundation\Response; + +#[Get( + uriTemplate: '/content/objectstategroups', + name: 'List Object state groups', + openapi: new Model\Operation( + summary: 'Returns a list of all Object state groups.', + tags: [ + 'Object State Groups', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the Object state group list is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'If-None-Match', + in: 'header', + required: true, + description: 'ETag', + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - returns a list of Object state groups.', + 'content' => [ + 'application/vnd.ibexa.api.ObjectStateGroupList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ObjectStateGroupList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objectstategroups/GET/ObjectStateGroupList.xml.example', + ], + 'application/vnd.ibexa.api.ObjectStateGroupList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ObjectStateGroupListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objectstategroups/GET/ObjectStateGroupList.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user has no permission to read Object state groups.', + ], + ], + ), +)] +#[Post( + uriTemplate: '/content/objectstategroups', + name: 'Create Object state group', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Creates a new Object state group.', + tags: [ + 'Object State Groups', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the new Object state group is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The Object state group input schema encoded in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.ObjectStateGroupCreate+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ObjectStateGroupCreate', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objectstategroups/POST/ObjectStateGroupCreate.xml.example', + ], + 'application/vnd.ibexa.api.ObjectStateGroupCreate+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ObjectStateGroupCreateWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objectstategroups/POST/ObjectStateGroupCreate.json.example', + ], + ]), + ), + responses: [ + Response::HTTP_CREATED => [ + 'description' => 'Object state group created.', + 'content' => [ + 'application/vnd.ibexa.api.ObjectStateGroup+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ObjectStateGroup', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/PATCH/ObjectStateGroup.xml.example', + ], + 'application/vnd.ibexa.api.ObjectStateGroup+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ObjectStateGroupWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/PATCH/ObjectStateGroup.json.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - The input does not match the input schema definition.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to create an Object state group.', + ], + Response::HTTP_FORBIDDEN => [ + 'description' => 'Error - An Object state group with the same identifier already exists.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/content/objectstategroups/{objectStateGroupId}', + name: 'Get Object state group', + openapi: new Model\Operation( + summary: 'Returns the Object state group with the provided ID.', + tags: [ + 'Object State Groups', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the Object state group is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'If-None-Match', + in: 'header', + required: true, + description: 'ETag', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'objectStateGroupId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - returns the Object state group.', + 'content' => [ + 'application/vnd.ibexa.api.ObjectStateGroup+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ObjectStateGroup', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/PATCH/ObjectStateGroup.xml.example', + ], + 'application/vnd.ibexa.api.ObjectStateGroup+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ObjectStateGroupWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/PATCH/ObjectStateGroup.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to read this Object state group.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - The Object state group does not exist.', + ], + ], + ), +)] +#[Patch( + uriTemplate: '/content/objectstategroups/{objectStateGroupId}', + name: 'Update Object state group', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Updates an Object state group. PATCH or POST with header X-HTTP-Method-Override PATCH.', + tags: [ + 'Object State Groups', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the updated Object state group is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The Object state group input schema encoded in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'If-Match', + in: 'header', + required: true, + description: 'ETag', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'objectStateGroupId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.ObjectStateGroupUpdate+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ObjectStateGroupUpdate', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/PATCH/ObjectStateGroupUpdate.xml.example', + ], + 'application/vnd.ibexa.api.ObjectStateGroupUpdate+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ObjectStateGroupUpdateWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/PATCH/ObjectStateGroupUpdate.json.example', + ], + ]), + ), + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - Object stated group updated.', + 'content' => [ + 'application/vnd.ibexa.api.ObjectStateGroup+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ObjectStateGroup', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/PATCH/ObjectStateGroup.xml.example', + ], + 'application/vnd.ibexa.api.ObjectStateGroup+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ObjectStateGroupWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/PATCH/ObjectStateGroup.json.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - The input does not match the input schema definition.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to update an Object state group.', + ], + Response::HTTP_FORBIDDEN => [ + 'description' => 'Error - An Object state group with the provided identifier already exists.', + ], + Response::HTTP_PRECONDITION_FAILED => [ + 'description' => 'Error - The current ETag does not match the one provided in the If-Match header.', + ], + ], + ), +)] +#[Delete( + uriTemplate: '/content/objectstategroups/{objectStateGroupId}', + name: 'Delete Object state group', + openapi: new Model\Operation( + summary: 'Deletes the given Object state group including Object states.', + tags: [ + 'Object State Groups', + ], + parameters: [ + new Model\Parameter( + name: 'objectStateGroupId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_NO_CONTENT => [ + 'description' => 'No Content - Object state group deleted.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to delete an Object state group.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - The Object state group does not exist.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/content/objectstategroups/{objectStateGroupId}/objectstates', + name: 'List Object states', + openapi: new Model\Operation( + summary: 'Returns a list of all Object states of the given group.', + tags: [ + 'Object State Groups', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the Object state list is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'If-None-Match', + in: 'header', + required: true, + description: 'ETag', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'objectStateGroupId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - returns a list of Object states.', + 'content' => [ + 'application/vnd.ibexa.api.ObjectStateList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ObjectStateList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/GET/ObjectStateList.xml.example', + ], + 'application/vnd.ibexa.api.ObjectStateList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ObjectStateListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/GET/ObjectStateList.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user has no permission to read Object states.', + ], + ], + ), +)] +#[Post( + uriTemplate: '/content/objectstategroups/{objectStateGroupId}/objectstates', + name: 'Create Object state', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Creates a new Object state.', + tags: [ + 'Object State Groups', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the new Object state is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The Object state input schema encoded in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'objectStateGroupId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.ObjectStateCreate+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ObjectStateCreate', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/POST/ObjectStateCreate.xml.example', + ], + 'application/vnd.ibexa.api.ObjectStateCreate+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ObjectStateCreateWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/POST/ObjectStateCreate.json.example', + ], + ]), + ), + responses: [ + Response::HTTP_CREATED => [ + 'description' => 'Object state created.', + 'content' => [ + 'application/vnd.ibexa.api.ObjectState+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ObjectState', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/object_state_id/PATCH/ObjectState.xml.example', + ], + 'application/vnd.ibexa.api.ObjectState+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ObjectStateWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/object_state_id/PATCH/ObjectState.json.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - The input does not match the input schema definition.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to create an Object state.', + ], + Response::HTTP_FORBIDDEN => [ + 'description' => 'Error - An Object state with the same identifier already exists in the given group.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/content/objectstategroups/{objectStateGroupId}/objectstates/{objectStateId}', + name: 'Get Object state', + openapi: new Model\Operation( + summary: 'Returns the Object state.', + tags: [ + 'Object State Groups', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the Object State is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'If-None-Match', + in: 'header', + required: true, + description: 'ETag', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'objectStateGroupId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'objectStateId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - returns the Object state.', + 'content' => [ + 'application/vnd.ibexa.api.ObjectState+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ObjectState', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/object_state_id/PATCH/ObjectState.xml.example', + ], + 'application/vnd.ibexa.api.ObjectState+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ObjectStateWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/object_state_id/PATCH/ObjectState.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to read this Object state.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - The Object state does not exist.', + ], + ], + ), +)] +#[Patch( + uriTemplate: '/content/objectstategroups/{objectStateGroupId}/objectstates/{objectStateId}', + name: 'Update Object state', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Updates an Object state. PATCH or POST with header X-HTTP-Method-Override PATCH.', + tags: [ + 'Object State Groups', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the updated Object state is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The Object state input schema encoded in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'If-Match', + in: 'header', + required: true, + description: 'ETag', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'objectStateGroupId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'objectStateId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.ObjectStateUpdate+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ObjectStateUpdate', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/object_state_id/PATCH/ObjectStateUpdate.xml.example', + ], + 'application/vnd.ibexa.api.ObjectStateUpdate+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ObjectStateUpdateWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/object_state_id/PATCH/ObjectStateUpdate.json.example', + ], + ]), + ), + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - Object State updated', + 'content' => [ + 'application/vnd.ibexa.api.ObjectState+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ObjectState', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/object_state_id/PATCH/ObjectState.xml.example', + ], + 'application/vnd.ibexa.api.ObjectState+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ObjectStateWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/objectstategroups/object_state_group_id/objectstates/object_state_id/PATCH/ObjectState.json.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - The input does not match the input schema definition.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to update the Object state.', + ], + Response::HTTP_FORBIDDEN => [ + 'description' => 'Error - An Object state with the provided identifier already exists in this group.', + ], + Response::HTTP_PRECONDITION_FAILED => [ + 'description' => 'Error - The current ETag does not match the one provided in the If-Match header.', + ], + ], + ), +)] +#[Delete( + uriTemplate: '/content/objectstategroups/{objectStateGroupId}/objectstates/{objectStateId}', + name: 'Delete Object state', + openapi: new Model\Operation( + summary: 'Deletes provided Object state.', + tags: [ + 'Object State Groups', + ], + parameters: [ + new Model\Parameter( + name: 'objectStateGroupId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'objectStateId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_NO_CONTENT => [ + 'description' => 'No Content - Object state deleted.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to delete an Object state.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - The Object state does not exist.', + ], + ], + ), +)] /** * ObjectState controller. */ diff --git a/src/lib/Server/Controller/Role.php b/src/lib/Server/Controller/Role.php index ffea373e1..d24f71e17 100644 --- a/src/lib/Server/Controller/Role.php +++ b/src/lib/Server/Controller/Role.php @@ -7,6 +7,12 @@ namespace Ibexa\Rest\Server\Controller; +use ApiPlatform\Metadata\Delete; +use ApiPlatform\Metadata\Get; +use ApiPlatform\Metadata\Patch; +use ApiPlatform\Metadata\Post; +use ApiPlatform\OpenApi\Factory\OpenApiFactory; +use ApiPlatform\OpenApi\Model; use Ibexa\Contracts\Core\Repository\Exceptions\LimitationValidationException; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException as APINotFoundException; @@ -25,7 +31,1189 @@ use Ibexa\Rest\Server\Values; use JMS\TranslationBundle\Annotation\Ignore; use Symfony\Component\HttpFoundation\Request; - +use Symfony\Component\HttpFoundation\Response; + +#[Get( + uriTemplate: '/user/roles', + name: 'Load Roles', + openapi: new Model\Operation( + summary: 'Returns a list of all Roles.', + tags: [ + 'User Role', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the user list returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - list of all Roles.', + 'content' => [ + 'application/vnd.ibexa.api.RoleList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/roles/GET/RoleList.xml.example', + ], + 'application/vnd.ibexa.api.RoleList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/roles/GET/RoleList.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user has no permission to read Roles.', + ], + ], + ), +)] +#[Post( + uriTemplate: '/user/roles', + name: 'Create Role or Role draft', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Creates a new Role or Role draft.', + tags: [ + 'User Role', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the new user is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The RoleInput schema encoded in XML or JSON.', + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.RoleInput+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleInput', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/roles/POST/RoleInput.xml.example', + ], + 'application/vnd.ibexa.api.RoleInput+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleInputWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/roles/POST/RoleInput.json.example', + ], + ]), + ), + responses: [ + Response::HTTP_CREATED => [ + 'content' => [ + 'application/vnd.ibexa.api.Role+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/Role', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/roles/id/draft/PATCH/Role.xml.example', + ], + 'application/vnd.ibexa.api.Role+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/roles/id/draft/PATCH/Role.json.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - the input does not match the input schema definition.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to create a Role or a Role draft.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/user/roles/{id}', + name: 'Load Role', + openapi: new Model\Operation( + summary: 'Loads a Role for the given ID.', + tags: [ + 'User Role', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the user list returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'If-None-Match', + in: 'header', + required: true, + description: 'ETag', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'id', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - Role for the given ID.', + 'content' => [ + 'application/vnd.ibexa.api.Role+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/Role', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/roles/id/draft/PATCH/Role.xml.example', + ], + 'application/vnd.ibexa.api.Role+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/roles/id/draft/PATCH/Role.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user has no permission to read Roles.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the Role does not exist.', + ], + ], + ), +)] +#[Post( + uriTemplate: '/user/roles/{id}', + name: 'Create Role Draft', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapiContext: ['requestBody' => false], + openapi: new Model\Operation( + summary: 'Creates a new Role draft from an existing Role.', + tags: [ + 'User Role', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the new user is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The RoleInput schema encoded in XML or JSON.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'id', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_CREATED => [ + 'content' => [ + 'application/vnd.ibexa.api.RoleDraft+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleDraft', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/roles/id/POST/RoleDraft.xml.example', + ], + 'application/vnd.ibexa.api.RoleDraft+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleDraftWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/roles/id/draft/PATCH/Role.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to create a Role or a Role draft', + ], + ], + ), +)] +#[Patch( + uriTemplate: '/user/roles/{id}', + name: 'Update Role', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Updates a Role. PATCH or POST with header X-HTTP-Method-Override PATCH', + tags: [ + 'User Role', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the new user is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The RoleInput schema encoded in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'If-Match', + in: 'header', + required: true, + description: 'ETag Causes to patch only if the specified ETag is the current one. Otherwise a 412 is returned.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'id', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.RoleInput+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleInput', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/roles/POST/RoleInput.xml.example', + ], + 'application/vnd.ibexa.api.RoleInput+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleInputWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/roles/POST/RoleInput.json.example', + ], + ]), + ), + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - Role updated', + 'content' => [ + 'application/vnd.ibexa.api.Role+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/Role', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/roles/id/draft/PATCH/Role.xml.example', + ], + 'application/vnd.ibexa.api.Role+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/roles/id/draft/PATCH/Role.json.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - the input does not match the input schema definition.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to update the Role.', + ], + Response::HTTP_PRECONDITION_FAILED => [ + 'description' => 'Error - the current ETag does not match with the provided one in the If-Match header.', + ], + ], + ), +)] +#[Delete( + uriTemplate: '/user/roles/{id}', + name: 'Delete Role', + openapi: new Model\Operation( + summary: 'The given Role and all assignments to Users or User Groups are deleted.', + tags: [ + 'User Role', + ], + parameters: [ + new Model\Parameter( + name: 'id', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_NO_CONTENT => [ + 'description' => 'No Content.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the User is not authorized to delete this Role.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/user/roles/{id}/draft', + name: 'Load Role draft', + openapi: new Model\Operation( + summary: 'Loads a Role draft by original Role ID.', + tags: [ + 'User Role', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the User list returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'If-None-Match', + in: 'header', + required: true, + description: 'ETag', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'id', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - Role draft by original Role ID.', + 'content' => [ + 'application/vnd.ibexa.api.Role+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/Role', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/roles/id/draft/PATCH/Role.xml.example', + ], + 'application/vnd.ibexa.api.Role+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/roles/id/draft/PATCH/Role.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user has no permission to read Roles.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - there is no draft or Role with the given ID.', + ], + ], + ), +)] +#[Patch( + uriTemplate: '/user/roles/{id}/draft', + name: 'Update Role draft', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Updates a Role draft. PATCH or POST with header X-HTTP-Method-Override PATCH.', + tags: [ + 'User Role', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the updated Role is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The RoleInput schema encoded in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'If-Match', + in: 'header', + required: true, + description: 'Performs a PATCH only if the specified ETag is the current one. Otherwise a 412 is returned.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'id', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.RoleInput+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleInput', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/roles/POST/RoleInput.xml.example', + ], + 'application/vnd.ibexa.api.RoleInput+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleInputWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/roles/POST/RoleInput.json.example', + ], + ]), + ), + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - Role draft updated.', + 'content' => [ + 'application/vnd.ibexa.api.Role+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/Role', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/roles/id/draft/PATCH/Role.xml.example', + ], + 'application/vnd.ibexa.api.Role+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/roles/id/draft/PATCH/Role.json.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - the input does not match the input schema definition.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to update the Role.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - there is no draft or Role with the given ID.', + ], + Response::HTTP_PRECONDITION_FAILED => [ + 'description' => 'Error - the current ETag does not match with the one provided in the If-Match header.', + ], + ], + ), +)] +#[Delete( + uriTemplate: '/user/roles/{id}/draft', + name: 'Delete Role draft', + openapi: new Model\Operation( + summary: 'The given Role draft is deleted.', + tags: [ + 'User Role', + ], + parameters: [ + new Model\Parameter( + name: 'id', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_NO_CONTENT => [ + 'description' => 'No Content.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to delete this Role.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/user/roles/{id}/policies', + name: 'Load Policies', + openapi: new Model\Operation( + summary: 'Loads Policies for the given Role.', + tags: [ + 'User Role', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the Policy list is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'id', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.PolicyList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/PolicyList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/roles/id/policies/GET/PolicyList.xml.example', + ], + 'application/vnd.ibexa.api.PolicyList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/PolicyListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/roles/id/policies/GET/PolicyList.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user has no permission to read Roles.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the Role does not exist.', + ], + ], + ), +)] +#[Delete( + uriTemplate: '/user/roles/{id}/policies', + name: 'Delete Policies', + openapi: new Model\Operation( + summary: 'All Policies of the given Role are deleted.', + tags: [ + 'User Role', + ], + parameters: [ + new Model\Parameter( + name: 'id', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_NO_CONTENT => [ + 'description' => 'No Content - all Policies of the given Role are deleted.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to delete this content type.', + ], + ], + ), +)] +#[Post( + uriTemplate: '/user/roles/{id}/policies', + name: 'Create Policy', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Creates a Policy', + tags: [ + 'User Role', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the updated Policy is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'If set, the updated Policy is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'id', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.PolicyCreate+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/PolicyCreate', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/roles/id/policies/POST/PolicyCreate.xml.example', + ], + 'application/vnd.ibexa.api.PolicyCreate+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/PolicyCreateWrapper', + ], + ], + ]), + ), + responses: [ + Response::HTTP_CREATED => [ + 'content' => [ + 'application/vnd.ibexa.api.Policy+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/Policy', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/roles/id/policies/id/PATCH/Policy.xml.example', + ], + 'application/vnd.ibexa.api.Policy+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/PolicyWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/roles/id/policies/id/GET/Policy.json.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - the input does not match the input schema definition or validation of limitation in PolicyCreate fails.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to create the Policy.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the Role does not exist.', + ], + ], + ), +)] +#[Patch( + uriTemplate: '/user/roles/{id}/policies/{id}', + name: 'Update Policy', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Updates a Policy. PATCH or POST with header X-HTTP-Method-Override PATCH.', + tags: [ + 'User Role', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the updated Policy is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'If set, the updated Policy is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'If-Match', + in: 'header', + required: true, + description: 'Causes to patch only if the specified ETag is the current one. Otherwise a 412 is returned.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'id', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.PolicyUpdate+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/PolicyUpdate', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/roles/id/policies/id/PATCH/PolicyUpdate.xml.example', + ], + 'application/vnd.ibexa.api.PolicyUpdate+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/PolicyUpdateWrapper', + ], + ], + ]), + ), + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.Policy+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/Policy', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/roles/id/policies/id/PATCH/Policy.xml.example', + ], + 'application/vnd.ibexa.api.Policy+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/PolicyWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/roles/id/policies/id/GET/Policy.json.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - the input does not match the input schema definition or validation of limitation in PolicyUpdate fails.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to update the Policy.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the Role does not exist.', + ], + Response::HTTP_PRECONDITION_FAILED => [ + 'description' => 'Error - the current ETag does not match with the one provided in the If-Match header.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/user/roles/{id}/policies/{id}', + name: 'Load Policy', + openapi: new Model\Operation( + summary: 'Loads a Policy for the given module and function.', + tags: [ + 'User Role', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the Policy is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'If-None-Match', + in: 'header', + required: true, + description: 'ETag', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'id', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.Policy+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/Policy', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/roles/id/policies/id/PATCH/Policy.xml.example', + ], + 'application/vnd.ibexa.api.Policy+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/PolicyWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/roles/id/policies/id/GET/Policy.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user has no permission to read Roles.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the Role or Policy does not exist.', + ], + ], + ), +)] +#[Delete( + uriTemplate: '/user/roles/{id}/policies/{id}', + name: 'Delete Policy', + openapi: new Model\Operation( + summary: 'Deletes given Policy.', + tags: [ + 'User Role', + ], + parameters: [ + new Model\Parameter( + name: 'id', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_NO_CONTENT => [ + 'description' => 'No Content - the given Policy is deleted.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to delete this content type.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the Role or Policy does not exist.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/user/groups/{path}/roles', + name: 'Load Roles for User Group', + openapi: new Model\Operation( + summary: 'Returns a list of all Roles assigned to the given User Group.', + tags: [ + 'User Group', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the Role assignment list is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'path', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.RoleAssignmentList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleAssignmentList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/GET/RoleAssignment.xml.example', + ], + 'application/vnd.ibexa.api.RoleAssignmentList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleAssignmentListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/DELETE/RoleAssignmentList.json.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - the user has no permission to read Roles.', + ], + ], + ), +)] +#[Post( + uriTemplate: '/user/groups/{path}/roles', + name: 'Assign Role to User Group', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Assigns a Role to a User Group.', + tags: [ + 'User Group', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the updated Role assignment list is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The RoleAssignInput schema encoded in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'path', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.RoleAssignInput+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleAssignInput', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/groups/path/roles/POST/RoleAssignInput.xml.example', + ], + 'application/vnd.ibexa.api.RoleAssignInput+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleAssignInputWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/POST/RoleAssignInput.json.example', + ], + ]), + ), + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.RoleAssignmentList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleAssignmentList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/GET/RoleAssignment.xml.example', + ], + 'application/vnd.ibexa.api.RoleAssignmentList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleAssignmentListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/DELETE/RoleAssignmentList.json.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - validation of limitation in RoleAssignInput fails.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to assign this Role.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/user/groups/{path}/roles/{roleId}', + name: 'Load User Group Role Assignment', + openapi: new Model\Operation( + summary: 'Returns a Role assignment of the given User Group.', + tags: [ + 'User Group', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the Role assignment list is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'path', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'roleId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - returns a Role assignment of the given User Group.', + 'content' => [ + 'application/vnd.ibexa.api.RoleAssignment+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleAssignment', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/GET/RoleAssignment.xml.example', + ], + 'application/vnd.ibexa.api.RoleAssignment+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleAssignmentWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/GET/RoleAssignment.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user has no permission to read Roles.', + ], + ], + ), +)] +#[Delete( + uriTemplate: '/user/groups/{path}/roles/{roleId}', + name: 'Unassign Role from User Group', + openapi: new Model\Operation( + summary: 'The given Role is removed from the User or User Group.', + tags: [ + 'User Group', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the updated Role assignment list is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'path', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'roleId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.RoleAssignmentList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleAssignmentList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/GET/RoleAssignment.xml.example', + ], + 'application/vnd.ibexa.api.RoleAssignmentList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleAssignmentListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/DELETE/RoleAssignmentList.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to delete this Role assignment.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/user/policies', + name: 'List Policies for User', + openapi: new Model\Operation( + summary: 'Search all Policies which are applied to a given User.', + tags: [ + 'User Policy', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the Policy list is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - Policies which are applied to a given User.', + 'content' => [ + 'application/vnd.ibexa.api.PolicyList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/PolicyList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/roles/id/policies/GET/PolicyList.xml.example', + ], + 'application/vnd.ibexa.api.PolicyList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/PolicyListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/roles/id/policies/GET/PolicyList.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user has no permission to read Roles.', + ], + ], + ), +)] /** * Role controller. */ diff --git a/src/lib/Server/Controller/Root.php b/src/lib/Server/Controller/Root.php index f1743ff96..d643a4950 100644 --- a/src/lib/Server/Controller/Root.php +++ b/src/lib/Server/Controller/Root.php @@ -7,9 +7,51 @@ namespace Ibexa\Rest\Server\Controller; +use ApiPlatform\Metadata\Get; +use ApiPlatform\OpenApi\Model; use Ibexa\Contracts\Rest\Exceptions\NotFoundException; use Ibexa\Rest\Server\Controller as RestController; +use Symfony\Component\HttpFoundation\Response; +#[Get( + uriTemplate: '/', + name: 'List of root resources', + openapi: new Model\Operation( + summary: 'Lists the root resources of the Ibexa Platform installation.', + tags: [ + 'Root', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the list is return in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.Root+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/Root', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/GET/Root.xml.example', + ], + 'application/vnd.ibexa.api.Root+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RootWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/GET/Root.json.example', + ], + ], + ], + ], + ), +)] /** * Root controller. */ diff --git a/src/lib/Server/Controller/Section.php b/src/lib/Server/Controller/Section.php index 0f3454dc2..8428bc152 100644 --- a/src/lib/Server/Controller/Section.php +++ b/src/lib/Server/Controller/Section.php @@ -7,6 +7,12 @@ namespace Ibexa\Rest\Server\Controller; +use ApiPlatform\Metadata\Delete; +use ApiPlatform\Metadata\Get; +use ApiPlatform\Metadata\Patch; +use ApiPlatform\Metadata\Post; +use ApiPlatform\OpenApi\Factory\OpenApiFactory; +use ApiPlatform\OpenApi\Model; use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; use Ibexa\Contracts\Core\Repository\SectionService; use Ibexa\Contracts\Core\Repository\Values\Content\SectionCreateStruct; @@ -17,7 +23,312 @@ use Ibexa\Rest\Server\Values; use Ibexa\Rest\Server\Values\NoContent; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +#[Post( + uriTemplate: '/content/sections', + name: 'Create new Section', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Creates a new Section.', + tags: [ + 'Section', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the new Section is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The Section input schema encoded in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.SectionInput+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/SectionInput', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/sections/POST/SectionInput.xml.example', + ], + 'application/vnd.ibexa.api.SectionInput+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/SectionInputWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/sections/POST/SectionInput.json.example', + ], + ]), + ), + responses: [ + Response::HTTP_CREATED => [ + 'content' => [ + 'application/vnd.ibexa.api.Section+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/Section', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/sections/section_id/PATCH/Section.xml.example', + ], + 'application/vnd.ibexa.api.Section+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/SectionWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/sections/section_id/PATCH/Section.json.example', + ], + ], + ], + ], + ), +)] +#[Get( + uriTemplate: '/content/sections', + name: 'Get Sections', + openapi: new Model\Operation( + summary: 'Returns a list of all Sections.', + tags: [ + 'Section', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the Section list is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'If-None-Match', + in: 'header', + required: true, + description: 'ETag', + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.SectionList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/SectionList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/sections/GET/SectionList.xml.example', + ], + 'application/vnd.ibexa.api.SectionList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/SectionListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/sections/GET/SectionList.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user has no permission to read the Section.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/content/sections/{sectionId}', + name: 'Get Section', + openapi: new Model\Operation( + summary: 'Returns the Section by given Section ID.', + tags: [ + 'Section', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the Section is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'If-None-match', + in: 'header', + required: true, + description: 'ETag', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'sectionId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.Section+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/Section', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/sections/section_id/PATCH/Section.xml.example', + ], + 'application/vnd.ibexa.api.Section+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/SectionWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/sections/section_id/PATCH/Section.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to read this Section.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - The Section does not exist.', + ], + ], + ), +)] +#[Patch( + uriTemplate: '/content/sections/{sectionId}', + name: 'Update a Section', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Updates a Section. PATCH or POST with header X-HTTP-Method-Override PATCH.', + tags: [ + 'Section', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the updated Section is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The Section input schema encoded in XML or JSON.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'If-Match', + in: 'header', + required: true, + description: 'ETag', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'sectionId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.SectionInput+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/SectionInput', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/sections/POST/SectionInput.xml.example', + ], + 'application/vnd.ibexa.api.SectionInput+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/SectionInputWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/sections/POST/SectionInput.json.example', + ], + ]), + ), + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - Section updated.', + 'content' => [ + 'application/vnd.ibexa.api.Section+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/Section', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/sections/section_id/PATCH/Section.xml.example', + ], + 'application/vnd.ibexa.api.Section+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/SectionWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/sections/section_id/PATCH/Section.json.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - the input does not match the input schema definition.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to create this Section.', + ], + Response::HTTP_FORBIDDEN => [ + 'description' => 'Error - a Section with the given identifier already exists.', + ], + Response::HTTP_PRECONDITION_FAILED => [ + 'description' => 'Error - the current ETag does not match with the one provided in the If-Match header.', + ], + ], + ), +)] +#[Delete( + uriTemplate: '/content/sections/{sectionId}', + name: 'Delete Section', + openapi: new Model\Operation( + summary: 'The given Section is deleted.', + tags: [ + 'Section', + ], + parameters: [ + new Model\Parameter( + name: 'sectionId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_NO_CONTENT => [ + 'description' => 'No Content - given Section is deleted.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to delete this Section.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the Section does not exist.', + ], + ], + ), +)] /** * Section controller. */ diff --git a/src/lib/Server/Controller/Services.php b/src/lib/Server/Controller/Services.php index 53969dea9..ab487806c 100644 --- a/src/lib/Server/Controller/Services.php +++ b/src/lib/Server/Controller/Services.php @@ -7,9 +7,50 @@ namespace Ibexa\Rest\Server\Controller; +use ApiPlatform\Metadata\Get; +use ApiPlatform\OpenApi\Model; use Ibexa\Rest\Server\Controller as RestController; use Ibexa\Rest\Server\Values; +use Symfony\Component\HttpFoundation\Response; +#[Get( + uriTemplate: '/services/countries', + name: 'Countries list', + openapi: new Model\Operation( + summary: 'Gives access to an ISO-3166 formatted list of world countries. It is useful when presenting a country options list from any application.', + tags: [ + 'Services', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the country list is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.CountriesList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/CountryList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/services/countries/GET/CountriesList.xml.example', + ], + 'application/vnd.ibexa.api.CountriesList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/CountryListWrapper', + ], + ], + ], + ], + ], + ), +)] /** * Services controller. */ diff --git a/src/lib/Server/Controller/SessionController.php b/src/lib/Server/Controller/SessionController.php index c507b026a..f0aeee366 100644 --- a/src/lib/Server/Controller/SessionController.php +++ b/src/lib/Server/Controller/SessionController.php @@ -8,6 +8,11 @@ namespace Ibexa\Rest\Server\Controller; +use ApiPlatform\Metadata\Delete; +use ApiPlatform\Metadata\Get; +use ApiPlatform\Metadata\Post; +use ApiPlatform\OpenApi\Factory\OpenApiFactory; +use ApiPlatform\OpenApi\Model; use Ibexa\Contracts\Core\Repository\PermissionResolver; use Ibexa\Contracts\Core\Repository\UserService; use Ibexa\Contracts\Core\SiteAccess\ConfigResolverInterface; @@ -24,6 +29,283 @@ use Symfony\Component\Security\Core\Exception\AuthenticationException; use Symfony\Component\Security\Csrf\CsrfToken; +#[Post( + uriTemplate: '/user/sessions', + name: 'Create session (login a User)', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Performs a login for the user or checks if session exists and returns the session and session cookie. The client will need to remember both session name/ID and CSRF token as this is for security reasons not exposed via GET.', + tags: [ + 'User Session', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the session is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The SessionInput schema encoded in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Cookie', + in: 'header', + required: true, + description: 'Only needed for session\'s checking {sessionName}={sessionID}.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'X-CSRF-Token', + in: 'header', + required: true, + description: 'Only needed for session\'s checking. The {csrfToken} needed on all unsafe HTTP methods with session.', + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.SessionInput+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/SessionInput', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/sessions/POST/SessionInput.xml.example', + ], + 'application/vnd.ibexa.api.SessionInput+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/SessionInputWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/sessions/POST/SessionInput.json.example', + ], + ]), + ), + responses: [ + Response::HTTP_OK => [ + 'description' => 'Session already exists.', + 'content' => [ + 'application/vnd.ibexa.api.Session+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/Session', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/sessions/POST/Session.xml.example', + ], + 'application/vnd.ibexa.api.Session+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/SessionWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/sessions/session_id/refresh/POST/Session.json.example', + ], + ], + ], + Response::HTTP_CREATED => [ + 'description' => 'Session is created.', + 'content' => [ + 'application/vnd.ibexa.api.Session+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/Session', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/sessions/POST/Session.xml.example', + ], + 'application/vnd.ibexa.api.Session+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/SessionWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/sessions/session_id/refresh/POST/Session.json.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - the input does not match the input schema definition.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the authorization failed.', + ], + Response::HTTP_CONFLICT => [ + 'description' => 'Error - header contained a session cookie but different user was authorized.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/user/sessions/current', + name: 'Get current session', + openapi: new Model\Operation( + summary: 'Get current user session, if any.', + tags: [ + 'User Session', + ], + parameters: [ + new Model\Parameter( + name: 'Cookie', + in: 'header', + required: true, + description: 'Only needed for session\'s checking {sessionName}={sessionID}.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the session is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'User is currently logged in and has a valid session.', + 'content' => [ + 'application/vnd.ibexa.api.Session+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/Session', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/sessions/POST/Session.xml.example', + ], + 'application/vnd.ibexa.api.Session+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/SessionWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/sessions/session_id/refresh/POST/Session.json.example', + ], + ], + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'User does not have a valid session, or it has expired.', + ], + ], + ), +)] +#[Delete( + uriTemplate: '/user/sessions/{sessionId}', + name: 'Delete session (logout a User)', + openapi: new Model\Operation( + summary: 'The user session is removed i.e. the user is logged out.', + tags: [ + 'User Session', + ], + parameters: [ + new Model\Parameter( + name: 'Cookie', + in: 'header', + required: true, + description: '{sessionName}={sessionID}', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'X-CSRF-Token', + in: 'header', + required: true, + description: 'The {csrfToken} needed on all unsafe HTTP methods with session.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'sessionId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_NO_CONTENT => [ + 'description' => 'OK - session deleted.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the session does not exist.', + ], + ], + ), +)] +#[Post( + uriTemplate: '/user/sessions/{sessionId}/refresh', + name: 'Refresh session (deprecated)', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapiContext: ['requestBody' => false], + openapi: new Model\Operation( + summary: 'Get the session\'s User information. Deprecated as of Ibexa DXP 4.6, use GET /user/sessions/current instead.', + tags: [ + 'User Session', + ], + parameters: [ + new Model\Parameter( + name: 'Cookie', + in: 'header', + required: true, + description: '{sessionName}={sessionID}', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'X-CSRF-Token', + in: 'header', + required: true, + description: 'The {csrfToken} needed on all unsafe HTTP methods with session.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'sessionId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.Session+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/Session', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/sessions/POST/Session.xml.example', + ], + 'application/vnd.ibexa.api.Session+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/SessionWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/sessions/session_id/refresh/POST/Session.json.example', + ], + ], + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the session does not exist.', + ], + ], + ), +)] /** * @internal */ diff --git a/src/lib/Server/Controller/Trash.php b/src/lib/Server/Controller/Trash.php index c8c750b57..4548b6c43 100644 --- a/src/lib/Server/Controller/Trash.php +++ b/src/lib/Server/Controller/Trash.php @@ -7,6 +7,9 @@ namespace Ibexa\Rest\Server\Controller; +use ApiPlatform\Metadata\Delete; +use ApiPlatform\Metadata\Get; +use ApiPlatform\OpenApi\Model; use Ibexa\Contracts\Core\Repository\Exceptions as ApiExceptions; use Ibexa\Contracts\Core\Repository\Exceptions\NotFoundException; use Ibexa\Contracts\Core\Repository\LocationService; @@ -20,8 +23,156 @@ use InvalidArgumentException; use JMS\TranslationBundle\Annotation\Ignore; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; use Webmozart\Assert\Assert; +#[Get( + uriTemplate: '/content/trash', + name: 'List Trash items', + openapi: new Model\Operation( + summary: 'Returns a list of all items in the Trash.', + tags: [ + 'Trash', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the Trash item list is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - returns the list of items in the Trash.', + 'content' => [ + 'application/vnd.ibexa.api.Trash+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/Trash', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/trash/GET/Trash.xml.example', + ], + 'application/vnd.ibexa.api.Trash+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/TrashWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/trash/GET/Trash.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user has no permission to read the Trash.', + ], + ], + ), +)] +#[Delete( + uriTemplate: '/content/trash', + name: 'Empty Trash', + openapi: new Model\Operation( + summary: 'Empties the Trash.', + tags: [ + 'Trash', + ], + parameters: [ + ], + responses: [ + Response::HTTP_NO_CONTENT => [ + 'description' => 'No Content - Trash emptied.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to empty all items from Trash.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/content/trash/{trashItemid}', + name: 'Get Trash item', + openapi: new Model\Operation( + summary: 'Returns the item in Trash with the provided ID.', + tags: [ + 'Trash', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the item in Trash is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'trashItemid', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.TrashItem+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/TrashItem', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/trash/trash_itemid/GET/TrashItem.xml.example', + ], + 'application/vnd.ibexa.api.TrashItem+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/TrashItemWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/trash/trash_itemid/GET/TrashItem.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user has no permission to read the item in Trash.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - An item in Trash with the provided ID does not exist.', + ], + ], + ), +)] +#[Delete( + uriTemplate: '/content/trash/{trashItemid}', + name: 'Delete Trash item', + openapi: new Model\Operation( + summary: 'Deletes the provided item from Trash.', + tags: [ + 'Trash', + ], + parameters: [ + new Model\Parameter( + name: 'trashItemid', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_NO_CONTENT => [ + 'description' => 'No Content - item deleted.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to delete the provided item.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - The provided item does not exist in Trash.', + ], + ], + ), +)] /** * Trash controller. */ diff --git a/src/lib/Server/Controller/URLAlias.php b/src/lib/Server/Controller/URLAlias.php index a57dbb529..bd20832f6 100644 --- a/src/lib/Server/Controller/URLAlias.php +++ b/src/lib/Server/Controller/URLAlias.php @@ -7,6 +7,11 @@ namespace Ibexa\Rest\Server\Controller; +use ApiPlatform\Metadata\Delete; +use ApiPlatform\Metadata\Get; +use ApiPlatform\Metadata\Post; +use ApiPlatform\OpenApi\Factory\OpenApiFactory; +use ApiPlatform\OpenApi\Model; use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; use Ibexa\Contracts\Core\Repository\LocationService; use Ibexa\Contracts\Core\Repository\URLAliasService; @@ -16,7 +21,211 @@ use Ibexa\Rest\Server\Values; use JMS\TranslationBundle\Annotation\Ignore; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +#[Get( + uriTemplate: '/content/urlaliases', + name: 'List global URL aliases', + openapi: new Model\Operation( + summary: 'Returns the list of global URL aliases.', + tags: [ + 'Url Alias', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the URL alias list contains only references and is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - returns the list of URL aliases.', + 'content' => [ + 'application/vnd.ibexa.api.UrlAliasRefList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UrlAliasRefList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/urlaliases/GET/UrlAliasRefList.xml.example', + ], + 'application/vnd.ibexa.api.UrlAliasRefList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UrlAliasRefListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/urlaliases/GET/UrlAliasRefList.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user has no permission to read URL aliases.', + ], + ], + ), +)] +#[Post( + uriTemplate: '/content/urlaliases', + name: 'Create URL alias', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Creates a URL alias.', + tags: [ + 'Url Alias', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the created URL alias is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The URL alias input schema encoded in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.UrlAliasCreate+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UrlAliasCreate', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/urlaliases/POST/UrlAliasCreate.xml.example', + ], + 'application/vnd.ibexa.api.UrlAliasCreate+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UrlAliasCreateWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/urlaliases/POST/UrlAliasCreate.json.example', + ], + ]), + ), + responses: [ + Response::HTTP_CREATED => [ + 'description' => 'URL alias created.', + 'content' => [ + 'application/vnd.ibexa.api.UrlAlias+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UrlAlias', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/urlaliases/url_alias_id/GET/UrlAlias.xml.example', + ], + 'application/vnd.ibexa.api.UrlAlias+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UrlAliasWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/urlaliases/url_alias_id/GET/UrlAlias.json.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - The input does not match the input schema definition.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to create a URL alias.', + ], + Response::HTTP_FORBIDDEN => [ + 'description' => 'Error - A URL alias with the same identifier already exists.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/content/urlaliases/{urlAliasId}', + name: 'Get URL alias', + openapi: new Model\Operation( + summary: 'Returns the URL alias with the given ID.', + tags: [ + 'Url Alias', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the URL alias is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'urlAliasId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - returns the URL alias.', + 'content' => [ + 'application/vnd.ibexa.api.UrlAlias+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UrlAlias', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/urlaliases/url_alias_id/GET/UrlAlias.xml.example', + ], + 'application/vnd.ibexa.api.UrlAlias+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UrlAliasWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/urlaliases/url_alias_id/GET/UrlAlias.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to read URL aliases.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - The URL alias does not exist.', + ], + ], + ), +)] +#[Delete( + uriTemplate: '/content/urlaliases/{urlAliasId}', + name: 'Delete URL alias', + openapi: new Model\Operation( + summary: 'Deletes the provided URL alias.', + tags: [ + 'Url Alias', + ], + parameters: [ + new Model\Parameter( + name: 'urlAliasId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_NO_CONTENT => [ + 'description' => 'No Content - URL alias deleted.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to delete a URL alias.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - The URL alias does not exist.', + ], + ], + ), +)] /** * URLAlias controller. */ diff --git a/src/lib/Server/Controller/URLWildcard.php b/src/lib/Server/Controller/URLWildcard.php index b02c319a0..3fc7be6c6 100644 --- a/src/lib/Server/Controller/URLWildcard.php +++ b/src/lib/Server/Controller/URLWildcard.php @@ -7,6 +7,11 @@ namespace Ibexa\Rest\Server\Controller; +use ApiPlatform\Metadata\Delete; +use ApiPlatform\Metadata\Get; +use ApiPlatform\Metadata\Post; +use ApiPlatform\OpenApi\Factory\OpenApiFactory; +use ApiPlatform\OpenApi\Model; use Ibexa\Contracts\Core\Repository\Exceptions\InvalidArgumentException; use Ibexa\Contracts\Core\Repository\URLWildcardService; use Ibexa\Rest\Message; @@ -15,7 +20,211 @@ use Ibexa\Rest\Server\Values; use JMS\TranslationBundle\Annotation\Ignore; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +#[Get( + uriTemplate: '/content/urlwildcards', + name: 'List URL wildcards', + openapi: new Model\Operation( + summary: 'Returns a list of URL wildcards.', + tags: [ + 'Url Wildcard', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the URL wildcard is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - returns a list of URL wildcards.', + 'content' => [ + 'application/vnd.ibexa.api.UrlWildcardList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UrlWildcardList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/urlwildcards/GET/UrlWildcardList.xml.example', + ], + 'application/vnd.ibexa.api.UrlWildcardList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UrlWildcardListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/urlwildcards/GET/UrlWildcardList.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user has no permission to read URL wildcards.', + ], + ], + ), +)] +#[Post( + uriTemplate: '/content/urlwildcards', + name: 'Create URL wildcard', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Creates a new URL wildcard.', + tags: [ + 'Url Wildcard', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the new URL wildcard is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The URL Wildcard input schema encoded in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.UrlWildcardCreate+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UrlWildcardCreate', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/urlwildcards/POST/UrlWildcardCreate.xml.example', + ], + 'application/vnd.ibexa.api.UrlWildcardCreate+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UrlWildcardCreateWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/urlwildcards/POST/UrlWildcardCreate.json.example', + ], + ]), + ), + responses: [ + Response::HTTP_CREATED => [ + 'description' => 'URL wildcard created.', + 'content' => [ + 'application/vnd.ibexa.api.UrlWildcard+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UrlWildcard', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/urlwildcards/wildcard_id/GET/UrlWildcard.xml.example', + ], + 'application/vnd.ibexa.api.UrlWildcard+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UrlWildcardWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/urlwildcards/wildcard_id/GET/UrlWildcard.json.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - The input does not match the input schema definition.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to create a URL wildcard.', + ], + Response::HTTP_FORBIDDEN => [ + 'description' => 'Error - A URL wildcard with the same identifier already exists.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/content/urlwildcards/{wildcardId}', + name: 'Get URL wildcard', + openapi: new Model\Operation( + summary: 'Returns the URL wildcard with the given ID.', + tags: [ + 'Url Wildcard', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the URL wildcard is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'wildcardId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - returns the URL wildcard.', + 'content' => [ + 'application/vnd.ibexa.api.UrlWildcard+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UrlWildcard', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/urlwildcards/wildcard_id/GET/UrlWildcard.xml.example', + ], + 'application/vnd.ibexa.api.UrlWildcard+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UrlWildcardWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/content/urlwildcards/wildcard_id/GET/UrlWildcard.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to read URL wildcards.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - The URL wildcard does not exist.', + ], + ], + ), +)] +#[Delete( + uriTemplate: '/content/urlwildcards/{wildcardId}', + name: 'Delete URL wildcard', + openapi: new Model\Operation( + summary: 'Deletes the given URL wildcard.', + tags: [ + 'Url Wildcard', + ], + parameters: [ + new Model\Parameter( + name: 'wildcardId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_NO_CONTENT => [ + 'description' => 'No Content - URL wildcard deleted.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - The user is not authorized to delete a URL wildcard.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - The URL wildcard does not exist.', + ], + ], + ), +)] /** * URLWildcard controller. */ diff --git a/src/lib/Server/Controller/User.php b/src/lib/Server/Controller/User.php index a472eb6df..ccb5532d5 100644 --- a/src/lib/Server/Controller/User.php +++ b/src/lib/Server/Controller/User.php @@ -8,6 +8,12 @@ namespace Ibexa\Rest\Server\Controller; +use ApiPlatform\Metadata\Delete; +use ApiPlatform\Metadata\Get; +use ApiPlatform\Metadata\Patch; +use ApiPlatform\Metadata\Post; +use ApiPlatform\OpenApi\Factory\OpenApiFactory; +use ApiPlatform\OpenApi\Model; use Ibexa\Contracts\Core\Repository\ContentService; use Ibexa\Contracts\Core\Repository\ContentTypeService; use Ibexa\Contracts\Core\Repository\Exceptions as ApiExceptions; @@ -31,9 +37,1484 @@ use Ibexa\Rest\Value as RestValue; use JMS\TranslationBundle\Annotation\Ignore; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; use Symfony\Component\HttpKernel\Exception\UnauthorizedHttpException; use Symfony\Component\Security\Core\User\UserInterface; +#[Get( + uriTemplate: '/user/users', + name: 'List Users', + openapi: new Model\Operation( + summary: 'Load Users either for a given remote ID or Role.', + tags: [ + 'User', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'UserList - If set, the User list is returned in XML or JSON format. UserRefList - If set, the link list of Users is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - Loads Users either for a given remote ID or Role.', + 'content' => [ + 'application/vnd.ibexa.api.UserList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/GET/User.xml.example', + ], + 'application/vnd.ibexa.api.UserList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/GET/User.json.example', + ], + 'application/vnd.ibexa.api.UserRefList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserRefList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/GET/UserRefList.xml.example', + ], + 'application/vnd.ibexa.api.UserRefList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserRefListWrapper', + ], + ], + ], + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'If there are no visibile Users matching the filter.', + ], + ], + ), +)] +#[Head( + uriTemplate: '/user/users', + name: 'Verify Users', + openapi: new Model\Operation( + summary: 'Verifies if there are Users matching given filter.', + tags: [ + 'User', + ], + parameters: [ + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - verifies if there are Users matching the given filter.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - there are no visibile Users matching the filter.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/user/users/current', + name: 'Load current User', + openapi: new Model\Operation( + summary: 'Redirects to current User, if available.', + tags: [ + 'User', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the User is returned in XML or JSON format (after redirection).', + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_TEMPORARY_REDIRECT => [ + 'description' => 'OK.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'User is not currently logged in.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/user/users/{userId}', + name: 'Load User', + openapi: new Model\Operation( + summary: 'Loads User with the given ID.', + tags: [ + 'User', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the User is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'If-None-Match', + in: 'header', + required: true, + description: 'ETag', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'userId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - the User with the given ID.', + 'content' => [ + 'application/vnd.ibexa.api.User+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/GET/User.xml.example', + ], + 'application/vnd.ibexa.api.User+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/GET/User.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user has no permission to read Users.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the User does not exist.', + ], + ], + ), +)] +#[Patch( + uriTemplate: '/user/users/{userId}', + name: 'Update User', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Updates a User.', + tags: [ + 'User', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the updated User is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The UserUpdate schema encoded in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'If-Match', + in: 'header', + required: true, + description: 'Performs a PATCH only if the specified ETag is the current one.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'userId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.UserUpdate+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserUpdate', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/PATCH/UserUpdate.xml.example', + ], + 'application/vnd.ibexa.api.UserUpdate+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserUpdateWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/PATCH/UserUpdate.json.example', + ], + ]), + ), + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - User updated.', + 'content' => [ + 'application/vnd.ibexa.api.User+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/User', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/PATCH/User.xml.example', + ], + 'application/vnd.ibexa.api.User+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/PATCH/User.json.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - the input does not match the input schema definition.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to update the User.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the User does not exist.', + ], + Response::HTTP_PRECONDITION_FAILED => [ + 'description' => 'Error - the current ETag does not match with the provided one in the If-Match header.', + ], + ], + ), +)] +#[Delete( + uriTemplate: '/user/users/{userId}', + name: 'Delete User', + openapi: new Model\Operation( + summary: 'Deletes the given User.', + tags: [ + 'User', + ], + parameters: [ + new Model\Parameter( + name: 'userId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_NO_CONTENT => [ + 'description' => 'No Content.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to delete this User.', + ], + Response::HTTP_FORBIDDEN => [ + 'description' => 'Error - the user is the same as the authenticated User.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the User does not exist.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/user/users/{userId}/groups', + name: 'Load Groups of User', + openapi: new Model\Operation( + summary: 'Returns a list of User Groups the User belongs to. The returned list includes the resources for unassigning a User Group if the User is in multiple groups.', + tags: [ + 'User', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the link list of User Groups is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'userId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.UserGroupRefList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserGroupRefList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/groups/POST/UserGroupRefList.xml.example', + ], + 'application/vnd.ibexa.api.UserGroupRefList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserGroupRefListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/groups/group_id/UserGroupRefList.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user has no permission to read User Groups.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the user does not exist.', + ], + ], + ), +)] +#[Post( + uriTemplate: '/user/users/{userId}/groups', + name: 'Assign User Group', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapiContext: ['requestBody' => false], + openapi: new Model\Operation( + summary: 'Assigns the User to a User Group.', + tags: [ + 'User', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the link list of User Groups is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'userId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.UserGroupRefList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserGroupRefList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/groups/POST/UserGroupRefList.xml.example', + ], + 'application/vnd.ibexa.api.UserGroupRefList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserGroupRefListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/groups/group_id/UserGroupRefList.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to assign User Groups.', + ], + Response::HTTP_FORBIDDEN => [ + 'description' => 'Error - the new User Group does not exist or the User is already in this group.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the User does not exist.', + ], + ], + ), +)] +#[Delete( + uriTemplate: '/user/users/{userId}/groups/{groupId}', + name: 'Unassign User Group', + openapi: new Model\Operation( + summary: 'Unassigns the User from a User Group.', + tags: [ + 'User', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the link list of User Groups is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'userId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'groupId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.UserGroupRefList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserGroupRefList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/groups/POST/UserGroupRefList.xml.example', + ], + 'application/vnd.ibexa.api.UserGroupRefList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserGroupRefListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/groups/group_id/UserGroupRefList.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to unassign User Groups.', + ], + Response::HTTP_FORBIDDEN => [ + 'description' => 'Error - the User is not in the given group.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the User does not exist.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/user/users/{userId}/roles', + name: 'Load Roles for User', + openapi: new Model\Operation( + summary: 'Returns a list of all Roles assigned to the given User.', + tags: [ + 'User', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the Role assignment list is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'userId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.RoleAssignmentList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleAssignmentList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/POST/RoleAssignmentList.xml.example', + ], + 'application/vnd.ibexa.api.RoleAssignmentList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleAssignmentListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/DELETE/RoleAssignmentList.json.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - the user has no permission to read Roles.', + ], + ], + ), +)] +#[Post( + uriTemplate: '/user/users/{userId}/roles', + name: 'Assign Role to User', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Assigns a Role to a user.', + tags: [ + 'User', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the updated Role assignment list is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The RoleAssignInput schema encoded in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'userId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.RoleAssignInput+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleAssignInput', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/POST/RoleAssignInput.xml.example', + ], + 'application/vnd.ibexa.api.RoleAssignInput+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleAssignInputWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/POST/RoleAssignInput.json.example', + ], + ]), + ), + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.RoleAssignmentList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleAssignmentList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/POST/RoleAssignmentList.xml.example', + ], + 'application/vnd.ibexa.api.RoleAssignmentList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleAssignmentListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/DELETE/RoleAssignmentList.json.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - validation of limitation in RoleAssignInput fails.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to assign this Role.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/user/users/{userId}/roles/{roleId}', + name: 'Load User Role Assignment', + openapi: new Model\Operation( + summary: 'Returns a Role assignment to the given User.', + tags: [ + 'User', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the Role assignment list is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'userId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'roleId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - Role assignment to the given User Group.', + 'content' => [ + 'application/vnd.ibexa.api.RoleAssignment+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleAssignment', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/GET/RoleAssignment.xml.example', + ], + 'application/vnd.ibexa.api.RoleAssignment+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleAssignmentWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/GET/RoleAssignment.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user has no permission to read Roles.', + ], + ], + ), +)] +#[Delete( + uriTemplate: '/user/users/{userId}/roles/{roleId}', + name: 'Unassign Role from User', + openapi: new Model\Operation( + summary: 'The given Role is removed from the user.', + tags: [ + 'User', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the updated Role assignment list is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'userId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'roleId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.RoleAssignmentList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleAssignmentList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/POST/RoleAssignmentList.xml.example', + ], + 'application/vnd.ibexa.api.RoleAssignmentList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/RoleAssignmentListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/roles/role_id/DELETE/RoleAssignmentList.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to delete this content type.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/user/users/{userId}/drafts', + name: 'Load user drafts', + openapi: new Model\Operation( + summary: 'Loads user\'s drafts', + tags: [ + '', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the version list is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'userId', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - List the draft versions', + 'content' => [ + 'application/vnd.ibexa.api.VersionList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/VersionList', + ], + ], + 'application/vnd.ibexa.api.VersionList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/VersionListWrapper', + ], + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the current user is not authorized to list the drafts of the given user.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/user/groups', + name: 'Load User Groups', + openapi: new Model\Operation( + summary: 'Loads User Groups for either an an ID or a remote ID or a Role.', + tags: [ + 'User Group', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'UserGroupList - If set, the User Group List is returned in XML or JSON format. UserGroupRefList - If set, the link list of User Group is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.UserGroupList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserGroupList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/groups/GET/UserGroupList.xml.example', + ], + 'application/vnd.ibexa.api.UserGroupList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserGroupListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/groups/GET/UserGroupList.json.example', + ], + 'application/vnd.ibexa.api.UserGroupRefList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserGroupRefList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/groups/POST/UserGroupRefList.xml.example', + ], + 'application/vnd.ibexa.api.UserGroupRefList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserGroupRefListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/groups/group_id/UserGroupRefList.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user has no permission to read User Groups.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/user/groups/root', + name: 'Get root User Group', + openapi: new Model\Operation( + summary: 'Redirects to the root User Group.', + tags: [ + 'User Group', + ], + parameters: [ + ], + responses: [ + Response::HTTP_MOVED_PERMANENTLY => [ + 'description' => 'Moved permanently.', + ], + ], + ), +)] +#[Post( + uriTemplate: '/user/groups/subgroups', + name: 'Create a top level User Group', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Creates a top level User Group under the root. To create a child group under a parent group use \'/user/groups/{path}/subgroups\'.', + tags: [ + 'User Group', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the new User Group is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The UserGroupCreate schema encoded in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.UserGroupCreate+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserGroupCreate', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/groups/path/subgroups/POST/UserGroupCreate.xml.example', + ], + 'application/vnd.ibexa.api.UserGroupCreate+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserGroupCreateWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/groups/path/subgroups/POST/UserGroupCreate.json.example', + ], + ]), + ), + responses: [ + Response::HTTP_CREATED => [ + 'description' => 'Created - the User Group has been created', + 'content' => [ + 'application/vnd.ibexa.api.UserGroup+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserGroup', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/groups/path/subgroups/POST/UserGroup.xml.example', + ], + 'application/vnd.ibexa.api.UserGroup+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserGroupWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/groups/path/subgroups/POST/UserGroup.json.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - the input does not match the input schema definition.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to create this User Group.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/user/groups/{path}', + name: 'Load User Group', + openapi: new Model\Operation( + summary: 'Loads User Groups for the given {path}.', + tags: [ + 'User Group', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the new User Group is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'If-None-Match', + in: 'header', + required: true, + description: 'ETag', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'path', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - loads User Groups.', + 'content' => [ + 'application/vnd.ibexa.api.UserGroup+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserGroup', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/groups/path/subgroups/POST/UserGroup.xml.example', + ], + 'application/vnd.ibexa.api.UserGroup+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserGroupWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/groups/path/subgroups/POST/UserGroup.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user has no permission to read User Groups.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the User Group does not exist.', + ], + ], + ), +)] +#[Patch( + uriTemplate: '/user/groups/{path}', + name: 'Update User Group', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Updates a User Group. PATCH or POST with header X-HTTP-Method-Override PATCH.', + tags: [ + 'User Group', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the new User Group is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The UserGroupUpdate schema encoded in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'If-Match', + in: 'header', + required: true, + description: 'Performs the PATCH only if the specified ETag is the current one. Otherwise a 412 is returned.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'path', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.UserGroupUpdate+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserGroupUpdate', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/groups/path/PATCH/UserGroupUpdate.xml.example', + ], + 'application/vnd.ibexa.api.UserGroupUpdate+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserGroupUpdateWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/groups/path/PATCH/UserGroupUpdate.json.example', + ], + ]), + ), + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - updated User Group.', + 'content' => [ + 'application/vnd.ibexa.api.UserGroup+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserGroup', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/groups/path/subgroups/POST/UserGroup.xml.example', + ], + 'application/vnd.ibexa.api.UserGroup+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserGroupWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/groups/path/subgroups/POST/UserGroup.json.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - the input does not match the input schema definition.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to update the User Group.', + ], + Response::HTTP_PRECONDITION_FAILED => [ + 'description' => 'Error - if the current ETag does not match with the one provided in the If-Match header.', + ], + ], + ), +)] +#[Delete( + uriTemplate: '/user/groups/{path}', + name: 'Delete User Group', + openapi: new Model\Operation( + summary: 'The given User Group is deleted.', + tags: [ + 'User Group', + ], + parameters: [ + new Model\Parameter( + name: 'path', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_NO_CONTENT => [ + 'description' => 'No content - the given User Group is deleted.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to delete this content type.', + ], + Response::HTTP_FORBIDDEN => [ + 'description' => 'Error - the User Group is not empty.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/user/groups/{path}/users', + name: 'Load Users of Group', + openapi: new Model\Operation( + summary: 'Loads the Users of the Group with the given ID.', + tags: [ + 'User Group', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'UserList - If set, the User list returned in XML or JSON format. UserRefList - If set, the link list of Users returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'path', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - the Users of the Group with the given ID.', + 'content' => [ + 'application/vnd.ibexa.api.UserList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserList', + ], + ], + 'application/vnd.ibexa.api.UserList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserList', + ], + ], + 'application/vnd.ibexa.api.UserRefList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserRefList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/GET/UserRefList.xml.example', + ], + 'application/vnd.ibexa.api.UserRefList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserRefListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/groups/id/users/GET/UserRefList.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user has no permission to read User Groups.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the User Group does not exist.', + ], + ], + ), +)] +#[Post( + uriTemplate: '/user/groups/{path}/users', + name: 'Create User', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Creates a new User in the given Group.', + tags: [ + 'User Group', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the new User is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The UserCreate schema encoded in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'path', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.UserCreate+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserCreate', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/groups/path/users/POST/UserCreate.xml.example', + ], + 'application/vnd.ibexa.api.UserCreate+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserCreateWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/groups/path/users/POST/UserCreate.json.example', + ], + ]), + ), + responses: [ + Response::HTTP_CREATED => [ + 'content' => [ + 'application/vnd.ibexa.api.User+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/User', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/PATCH/User.xml.example', + ], + 'application/vnd.ibexa.api.User+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/PATCH/User.json.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - the input does not match the input schema definition.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to create this User.', + ], + Response::HTTP_FORBIDDEN => [ + 'description' => 'Error - a User with the same login already exists.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the Group with the given ID does not exist.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/user/groups/{path}/subgroups', + name: 'Load subgroups', + openapi: new Model\Operation( + summary: 'Returns a list of the subgroups.', + tags: [ + 'User Group', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'UserGroupList - If set, the User Group list is returned in XML or JSON format. UserGroupRefList - If set, the link list of User Groups is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'path', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - list of the subgroups.', + 'content' => [ + 'application/vnd.ibexa.api.UserGroupList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserGroupList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/groups/GET/UserGroupList.xml.example', + ], + 'application/vnd.ibexa.api.UserGroupList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserGroupListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/groups/GET/UserGroupList.json.example', + ], + 'application/vnd.ibexa.api.UserGroupRefList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserGroupRefList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/groups/POST/UserGroupRefList.xml.example', + ], + 'application/vnd.ibexa.api.UserGroupRefList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserGroupRefListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/groups/group_id/UserGroupRefList.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user has no permission to read User Groups.', + ], + Response::HTTP_NOT_FOUND => [ + 'description' => 'Error - the User Group does not exist.', + ], + ], + ), +)] +#[Post( + uriTemplate: '/user/groups/{path}/subgroups', + name: 'Create User Group', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Creates a new User Group under the given parent. To create a top level group use \'/user/groups/subgroups\'.', + tags: [ + 'User Group', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the new User Group is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The UserGroupCreate schema encoded in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'path', + in: 'path', + required: true, + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.UserGroupCreate+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserGroupCreate', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/groups/path/subgroups/POST/UserGroupCreate.xml.example', + ], + 'application/vnd.ibexa.api.UserGroupCreate+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserGroupCreateWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/groups/path/subgroups/POST/UserGroupCreate.json.example', + ], + ]), + ), + responses: [ + Response::HTTP_CREATED => [ + 'content' => [ + 'application/vnd.ibexa.api.UserGroup+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserGroup', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/groups/path/subgroups/POST/UserGroup.xml.example', + ], + 'application/vnd.ibexa.api.UserGroup+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserGroupWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/groups/path/subgroups/POST/UserGroup.json.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - the input does not match the input schema definition.', + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user is not authorized to create this User Group.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/user/policies', + name: 'List Policies for User', + openapi: new Model\Operation( + summary: 'Search all Policies which are applied to a given User.', + tags: [ + '', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the Policy list is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - Policies which are applied to a given User.', + 'content' => [ + 'application/vnd.ibexa.api.PolicyList+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/PolicyList', + ], + 'example' => self::POLICY_LIST_XML_EXAMPLE, + ], + 'application/vnd.ibexa.api.PolicyList+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/PolicyListWrapper', + ], + 'example' => self::POLICY_LIST_JSON_EXAMPLE, + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user has no permission to read Roles.', + ], + ], + ), +)] +#[Get( + uriTemplate: '/user/current', + name: 'Load current User', + openapi: new Model\Operation( + summary: 'Loads the current user.', + tags: [ + 'User Current', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'If set, the User is returned in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + ], + responses: [ + Response::HTTP_OK => [ + 'description' => 'OK - the User with the given ID.', + 'content' => [ + 'application/vnd.ibexa.api.User+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserList', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/GET/User.xml.example', + ], + 'application/vnd.ibexa.api.User+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/UserListWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/user/users/user_id/GET/User.json.example', + ], + ], + ], + Response::HTTP_UNAUTHORIZED => [ + 'description' => 'Error - the user has no permission to read Users. For example, Anonymous user can\'t load oneself.', + ], + ], + ), +)] /** * User controller. */ diff --git a/src/lib/Server/Controller/Views.php b/src/lib/Server/Controller/Views.php index 1e29c3643..9f1d67954 100644 --- a/src/lib/Server/Controller/Views.php +++ b/src/lib/Server/Controller/Views.php @@ -7,6 +7,10 @@ namespace Ibexa\Rest\Server\Controller; +use ApiPlatform\Metadata\Get; +use ApiPlatform\Metadata\Post; +use ApiPlatform\OpenApi\Factory\OpenApiFactory; +use ApiPlatform\OpenApi\Model; use Ibexa\Contracts\Core\Repository\Exceptions\NotImplementedException; use Ibexa\Contracts\Core\Repository\SearchService; use Ibexa\Contracts\Core\Repository\Values\Content\Language; @@ -15,7 +19,72 @@ use Ibexa\Rest\Server\Controller; use Ibexa\Rest\Server\Values; use Symfony\Component\HttpFoundation\Request; +use Symfony\Component\HttpFoundation\Response; +#[Post( + uriTemplate: '/views', + name: 'Search content', + extraProperties: [OpenApiFactory::OVERRIDE_OPENAPI_RESPONSES => false], + openapi: new Model\Operation( + summary: 'Executes a query and returns a View including the results. +View input reflects the criteria model of the public PHP API. +Refer to [Search Criteria Reference](/en/latest/search/criteria_reference/search_criteria_reference/)', + tags: [ + 'Views', + ], + parameters: [ + new Model\Parameter( + name: 'Accept', + in: 'header', + required: true, + description: 'The view in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + new Model\Parameter( + name: 'Content-Type', + in: 'header', + required: true, + description: 'The view input in XML or JSON format.', + schema: [ + 'type' => 'string', + ], + ), + ], + requestBody: new Model\RequestBody( + content: new \ArrayObject([ + 'application/vnd.ibexa.api.ViewInput+xml' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ViewInput', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/views/POST/ViewInput.xml.example', + ], + 'application/vnd.ibexa.api.ViewInput+json' => [ + 'schema' => [ + '$ref' => '#/components/schemas/ViewInputWrapper', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/views/POST/ViewInput.json.example', + ], + ]), + ), + responses: [ + Response::HTTP_OK => [ + 'content' => [ + 'application/vnd.ibexa.api.View+xml; version=1.1' => [ + 'schema' => [ + '$ref' => '#/components/schemas/View', + ], + 'x-ibexa-example-file' => '@IbexaRestBundle/Resources/api_platform/examples/views/POST/View.xml.v11.example', + ], + ], + ], + Response::HTTP_BAD_REQUEST => [ + 'description' => 'Error - the input does not match the input schema definition.', + ], + ], + ), +)] /** * Controller for Repository Views (Search, mostly). */