contentful-management.js icon indicating copy to clipboard operation
contentful-management.js copied to clipboard

`enabledNodeTypes` documentation error

Open caillou opened this issue 1 year ago • 0 comments

When reading the following documentation, we can see this:

enabledNodeTypes?: (
  "blockquote" | "hr" | "table" | "document" | "paragraph" | 
  "heading-1" | "heading-2" | "heading-3" | "heading-4" | "heading-5" | 
  "heading-6" | "ordered-list" | "unordered-list" | "list-item" | 
  "embedded-entry-block" | "embedded-asset-block" | "embedded-resource-block" | 
  "table-row" | "table-cell" | "table-header-cell" | 
  "hyperlink" | "entry-hyperlink" | "asset-hyperlink" | "resource-hyperlink" |
   "embedded-entry-inline" | "embedded-resource-inline"
)[]

https://contentful.github.io/contentful-management.js/contentful-management/11.16.0/interfaces/ContentTypeFieldValidation.html#enabledNodeTypes

Note that this list contains the following types: table-row, table-cell, table-header-cell.

When trying to set these types, I got the following error from the API:

Error: The property "validations.0.enabledNodeTypes.15" on the field "content" 
must be one of [
  "heading-1", "heading-2", "heading-3", "heading-4", "heading-5", "heading-6", 
  "ordered-list", "unordered-list", "hr", "blockquote", "table", "embedded-entry-block", 
  "embedded-asset-block", "hyperlink", "entry-hyperlink", "asset-hyperlink", 
  "embedded-entry-inline"
].

This list does not contain any of these types.

This might be an error in the docs.

caillou avatar Feb 14 '24 12:02 caillou