Inform SDC/code component developers of nonsensical `type: array` prop restrictions: `maxItems <2`
>>> [!note] Migrated issue <!-- Drupal.org comment --> <!-- Migrated from issue #3576578. --> Reported by: [isholgueras](https://www.drupal.org/user/733162) Related to !663 >>> <h3 id="overview">Overview</h3> <p>This is a follow-up issue that appeared on <span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/canvas/-/work_items/3568264" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/canvas/-/work_items/3568264</a></span> in this conversation: <a href="https://git.drupalcode.org/project/canvas/-/merge_requests/645#note_706433">https://git.drupalcode.org/project/canvas/-/merge_requests/645#note_706433</a></p> <p>In <code>JsonSchemaType</code>, I removed the exception thrown when <code>maxItems</code> is less than 2 to improve the DX, but leave the exception thrown has better DX than just returning NULL.</p> <p>This 3 messages: <a href="https://git.drupalcode.org/project/canvas/-/merge_requests/645#note_709202">https://git.drupalcode.org/project/canvas/-/merge_requests/645#note_709202</a>, describe pretty well what is the error, what the developer gets.</p> <h3 id="proposed-resolution">Proposed resolution</h3> <p>Improve the DX for <code>maxItems</code>, or maybe even more things for the schema.</p> > Related issue: [Issue #3467870](https://www.drupal.org/node/3467870) > Related issue: [Issue #3576805](https://www.drupal.org/node/3576805) > Related issue: [Issue #3520484](https://www.drupal.org/node/3520484)
issue