Allow updating contentTypes via REST API
Annotated as @put
-- Additional description by @agomez-dotcms -- -
-
[ ] Update existing content-type by id ``
PUT /v1/contenttype/id/{typeId}``curl -v -u [email protected]:admin -XPUT http://localhost:8080/api/v1/contenttype/id/39fecdb0-46cc-40a9-a056-f2e1a80ea78c -H "Content-Type: application/json" --data @bodyUpdate.json`Contents of file bodyUpdate.json:`` { "clazz": "com.dotcms.contenttype.model.type.ImmutableSimpleContentType", "defaultType": false, "id": "39fecdb0-46cc-40a9-a056-f2e1a80ea78c","name": "The Content Type 2", "description": "THE DESCRIPTION 2",
"host": "48190c8c-42c4-46af-8d1a-0cd5db894797", "owner": "dotcms.org.1",
"variable": "TheContentType1",
"fixed": false, "system": false, "folder": "SYSTEM_FOLDER" } ```
I think we should hold on this until we are working on the UI
PR Core: https://github.com/dotCMS/core/pull/11528
In contrast to another REST-APIs for content-type, please notice update operation over content-types (PUT) only expect to update a single content-type with no nested objects (ie. fields)
PR Core (Release 4.1 - Cherry-Pick): https://github.com/dotCMS/core/pull/11539
Documented: https://auth.dotcms.com/docs/latest/content-type-api#updateAContentType
Passed QA. Tested on dotcms 4.1.0 distribution generated from realease-4.1 on commit b2682bce459687e928267ff941ae2de83504e3a7 Mac OS 10.10 / MySQL 5.6.35 / Firefox v45.0.1 / Tomcat 8 / Java 8