Skip to content

Migrate entra administrativeunit member and roleassignment commands to Zod#7364

Open
waldekmastykarz wants to merge 1 commit into
pnp:mainfrom
waldekmastykarz:waldekmastykarz/zod-migration-entra-au
Open

Migrate entra administrativeunit member and roleassignment commands to Zod#7364
waldekmastykarz wants to merge 1 commit into
pnp:mainfrom
waldekmastykarz:waldekmastykarz/zod-migration-entra-au

Conversation

@waldekmastykarz
Copy link
Copy Markdown
Member

Summary

Migrates the following commands from manual option validation to Zod schemas:

  • entra administrativeunit member add
  • entra administrativeunit member get
  • entra administrativeunit member list
  • entra administrativeunit member remove
  • entra administrativeunit roleassignment add

Closes #7294

Changes

Replaced manual #initOptions(), #initValidators(), #initOptionSets(), and #initTelemetry() methods with declarative Zod schemas using z.strictObject(), z.uuid(), .alias(), and getRefinedSchema() with .refine() for option set validation.

Updated all corresponding test files to use commandOptionsSchema.safeParse() for schema and option set validation tests.

Net reduction of ~669 lines of code.

…o Zod

Migrate the following commands from manual option validation to Zod schemas:
- entra administrativeunit member add
- entra administrativeunit member get
- entra administrativeunit member list
- entra administrativeunit member remove
- entra administrativeunit roleassignment add

Closes pnp#7294

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Migrate entra administrativeunit member and roleassignment commands to Zod

1 participant