Include Pages in the CLI validation command
>>> [!note] Migrated issue
<!-- Drupal.org comment -->
<!-- Migrated from issue #3582865. -->
Reported by: [wotnak](https://www.drupal.org/user/3558113)
Related to !891
>>>
<h3 id="overview">Overview</h3>
<p>Now that Canvas pages can be pulled and pushed using the CLI (<span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/canvas/-/work_items/3575874" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/canvas/-/work_items/3575874</a></span>) we need to include them in the validate command to make it easier to validate local changes, including ones made by ai agents.</p>
<h3 id="proposed-resolution">Proposed resolution</h3>
<ul>
<li>use json-render catalog validation for validating page component trees</li>
<li>add validation for pages in the <code>canvas validate</code> command</li>
<li>include pages validation before push, similarly to how it is done for components</li>
</ul>
<h3 id="ui-changes">User interface changes</h3>
<ul>
<li><code>canvas validate</code> command will show validation errors also for pages</li>
<li><code>canvas push --include-pages</code> command will show validation errors for pages and abort pushing pages when the validation didn't pass</li>
</ul>
<h3 id="postponed-on">Postponed on</h3>
<ul>
<li><span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/canvas/-/work_items/3576521" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/canvas/-/work_items/3576521</a></span> - fixes resolution of components schema that is used by json-render catalog for validation and prompt generation</li>
<li><span class="drupalorg-gitlab-issue-link drupalorg-gitlab-link-wrapper"><a href="https://git.drupalcode.org/project/canvas/-/work_items/3582632" class="drupalorg-gitlab-link">https://git.drupalcode.org/project/canvas/-/work_items/3582632</a></span> - changes what is stored in a local page json file</li>
</ul>
> Related issue: [Issue #3575874](https://www.drupal.org/node/3575874)
> Related issue: [Issue #3576521](https://www.drupal.org/node/3576521)
> Related issue: [Issue #3582632](https://www.drupal.org/node/3582632)
> Related issue: [Issue #3575872](https://www.drupal.org/node/3575872)
issue