Skip to content

Refactor how unknown options are configured for zod for some commands. #6889

@martinlingstuyl

Description

@martinlingstuyl

Updates the implementation of Zod validation with unknown options for the following commands:

  • adaptivecard send
  • graph openextension add
  • graph openextension set

What changes:

  • Use .passthrough() on zod schema objects. (the passthrough function is explicitly for the usecase of unknown options. We werent using it, so I updated the code of some commands to use it.)
  • Use optionsUtils.getUnknownOptions(args.options, zod.schemaToOptions(this.schema!)) to get unknown options, otherwise all options are returned

Metadata

Metadata

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions