Details
-
Improvement
-
Resolution: Unresolved
-
High
-
None
-
None
-
None
Description
Please change generated json field with name "fields"["key":"title", "value":"someTitlte" ... ] to "title":"someTitlte".
The change with the fields syntax must also be reflected when calling the URLs/Controllers
GET http://endpoint/api/ezp/v2/ez_recommendation/v1/content/contentId?lang=language&fields=csvlist_of_content_fields&page=1&page_size=5
and
GET http://endpoint/api/ezp/v2/ez_recommendation/v1/contenttypes/16?lang=language&fields=csvlist_of_content_fields&page=1&page_size=5
Example data:
Current Version:
{ "contentList": { "_media-type": "application\/vnd.ez.api.contentList+json", "content": [ { "_media-type": "application\/vnd.ez.api.content+json", "contentId": 58, "contentTypeId": 2, "identifier": "article", "language": "eng-GB", "publishedDate": "2016-12-14T16:00:53+00:00", "author": "Administrator User", "uri": "\/Artikel-1\/New-article2", "categoryPath": "\/1\/2\/58\/59\/", "mainLocation": { "_media-type": "application\/vnd.ez.api.mainLocation+json", "_href": "\/api\/ezp\/v2\/content\/locations\/1\/2\/58\/59\/" }, "locations": { "_media-type": "application\/vnd.ez.api.locations+json", "_href": "\/api\/ezp\/v2\/content\/objects\/58\/locations" }, "fields": [ { "key": "title", "value": "New article2" }, { "key": "intro", "value": "<![CDATA[<section xmlns=\"http:\/\/ez.no\/namespaces\/ezpublish5\/xhtml5\"><p>sdffsfsfsfs<\/p><\/section>\n]]>" }, { "key": "body", "value": "<![CDATA[<section xmlns=\"http:\/\/ez.no\/namespaces\/ezpublish5\/xhtml5\"><\/section>\n]]>" } ] }, ...
New Version:
{ "contentList": { "_media-type": "application\/vnd.ez.api.contentList+json", "content": [ { "_media-type": "application\/vnd.ez.api.content+json", "contentId": 58, "contentTypeId": 2, "identifier": "article", "language": "eng-GB", "publishedDate": "2016-12-14T16:00:53+00:00", "author": "Administrator User", "uri": "\/Artikel-1\/New-article2", "categoryPath": "\/1\/2\/58\/59\/", "mainLocation": { "_media-type": "application\/vnd.ez.api.mainLocation+json", "_href": "\/api\/ezp\/v2\/content\/locations\/1\/2\/58\/59\/" }, "locations": { "_media-type": "application\/vnd.ez.api.locations+json", "_href": "\/api\/ezp\/v2\/content\/objects\/58\/locations" }, "title":"New article2", "intro":"value": "<![CDATA[<section xmlns=\"http:\/\/ez.no\/namespaces\/ezpublish5\/xhtml5\"><p>sdffsfsfsfs<\/p><\/section>\n]]>", "body":"<![CDATA[<section xmlns=\"http:\/\/ez.no\/namespaces\/ezpublish5\/xhtml5\"><\/section>\n]]>" }, ...