Rest API for managing Fields
We need a crud RESTEndpoint for Adding, Editing and Deleting Fields
-- Additional description by @dsilvam -- -
-
[x] List all fields of given content type ``
GET /v1/contenttype/{typeId}/fields`` -
[x] Get field by id ``
GET /v1/contenttype/{typeId}/fields/id/{fieldID}`` -
[x] Get field by var ``
GET /v1/contenttype/{typeId}/fields/var/{fieldVar}`` -
[x] Create field in content type ``
POST /v1/contenttype/{typeId}/fields`` (need to define JSON object) -
[x] Update existing field by id ``
PUT /v1/contenttype/{typeId}/fields/id/{fieldID}`` -
[x] Update existing field by var ``
PUT /v1/contenttype/{typeId}/fields/var/{fieldVar}`` -
[x] Delete by id ``
DELETE /v1/contenttype/{typeId}/fields/id/{fieldID}`` -
[x] Delete by var ``
DELETE /v1/contenttype/{typeId}/fields/var/{fieldVar}``
PR: https://github.com/dotCMS/core/pull/11290
Passed QA. Tested all crud operations with rest endpoints using different Content Types (Content, Widget, File and Page) and all Rest APIs are working as expected. Tested on master-4.1 / commit 6caf33e Mac OS 10.10 / MySQL 5.6.35 / Firefox v45.0.1 / Tomcat 8 / Java 8