Skip to content

Enhances 'spo navigation' commands with children#7138

Merged
MartinM85 merged 1 commit intopnp:mainfrom
milanholemans:enhance-navigation
Mar 11, 2026
Merged

Enhances 'spo navigation' commands with children#7138
MartinM85 merged 1 commit intopnp:mainfrom
milanholemans:enhance-navigation

Conversation

@milanholemans
Copy link
Copy Markdown
Contributor

@milanholemans milanholemans commented Feb 20, 2026

Closes #7137


Additionally added the following:

  • Permissions docs section
  • Zod refactor
  • Added a check in spo navigation node get for non-existent nodes.

Copilot AI review requested due to automatic review settings February 20, 2026 23:52
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request enhances the spo navigation node list and spo navigation node get commands to return child navigation nodes by adding $expand=Children to the API queries. Additionally, it refactors both commands from traditional validation methods to Zod schema-based validation.

Changes:

  • Added $expand=Children,Children/Children,Children/Children/Children to API queries to retrieve nested navigation nodes (up to 3 levels deep)
  • Refactored commands from constructor-based initialization with validators to Zod schema-based validation
  • Added Permissions documentation sections to both command reference pages
  • Updated examples and response samples in documentation to show the new Children property

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
src/m365/spo/commands/navigation/navigation-node-list.ts Refactored to use Zod schema and added $expand parameter to include children
src/m365/spo/commands/navigation/navigation-node-list.spec.ts Updated tests for Zod validation pattern and added child nodes to test data
src/m365/spo/commands/navigation/navigation-node-get.ts Refactored to use Zod schema, added $expand parameter, and added null check for non-existent nodes
src/m365/spo/commands/navigation/navigation-node-get.spec.ts Updated tests for Zod validation pattern, added child nodes to test data, and added test for null response
docs/docs/cmd/spo/navigation/navigation-node-list.mdx Added Permissions section and updated examples/responses to show children
docs/docs/cmd/spo/navigation/navigation-node-get.mdx Added Permissions section and updated examples/responses to show children

Comment thread src/m365/spo/commands/navigation/navigation-node-list.ts
Comment thread src/m365/spo/commands/navigation/navigation-node-get.ts Outdated
@MartinM85 MartinM85 self-assigned this Mar 1, 2026
Copy link
Copy Markdown
Contributor

@MartinM85 MartinM85 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice work @milanholemans 🚀
Approved, I will merge it later

@MartinM85 MartinM85 merged commit 0bc78f8 into pnp:main Mar 11, 2026
10 checks passed
@milanholemans milanholemans deleted the enhance-navigation branch March 11, 2026 08:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Expand listing navigation nodes with children

3 participants