Enhances 'spo navigation' commands with children#7138
Merged
Conversation
There was a problem hiding this comment.
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/Childrento 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 |
899eb0d to
e9825ec
Compare
MartinM85
approved these changes
Mar 1, 2026
Contributor
MartinM85
left a comment
There was a problem hiding this comment.
Nice work @milanholemans 🚀
Approved, I will merge it later
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Closes #7137
Additionally added the following:
spo navigation node getfor non-existent nodes.