-
Notifications
You must be signed in to change notification settings - Fork 347
Migrates 'entra administrativeunit list' to Zod. Closes #6810 #6811
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It seems you did not look at the reference implementations. You tried to retrieve the git commits but got a fatal bad object exception.
Is it possible you shallow cloned the repository?
Please retry and look at the reference implementations
... You're absolutely right - I should have looked at the reference implementations more carefully. I've now updated the implementation to follow the established patterns found in commands like Key changes made (commit 73c087b):
The implementation now correctly follows the established Zod migration patterns. Thanks for pointing out that I needed to examine the reference implementations more thoroughly! |
src/m365/entra/commands/administrativeunit/administrativeunit-list.spec.ts
Outdated
Show resolved
Hide resolved
Co-authored-by: martinlingstuyl <5267487+martinlingstuyl@users.noreply.github.com>
Co-authored-by: martinlingstuyl <5267487+martinlingstuyl@users.noreply.github.com>
Co-authored-by: martinlingstuyl <5267487+martinlingstuyl@users.noreply.github.com>
d2ccec3
to
817fe7a
Compare
Closes #6810
This PR migrates the
entra administrativeunit list
command from TypeScript interfaces to Zod schema validation, following the established pattern in the codebase.Changes Made
Options
interface to useglobalOptionsZod.extend()
with proper Zod validationget schema()
method to return the Zod options schemazod.alias('p', z.string().optional())
for the--properties
option to maintain-p
short alias#initOptions()
method since options are now defined by the schemaTechnical Details
The migration follows the established pattern seen in other commands:
Verification
--query
,-o/--output
,--debug
,--verbose
,-p/--properties
The command now benefits from Zod's runtime validation while maintaining full backward compatibility.
Fixes #6810.
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.