Skip to content

Be able to use data type like Set() with the ResponseValidationPlugin (work without) #1314

Description

@theoludwig

Describe the feature

When, we configure a OpenAPILink without the ResponseValidationPlugin, we're able to define schema that uses Set data type, for example in zod: z.set, and then receive correctly it client side.

However, when we use the plugin, we have the following error:

ValidationError: Server response output does not match expected schema
  issues: [
    {
      expected: 'set',
      code: 'invalid_type',
      path: [Array],
      message: 'Invalid input: expected set, received array'
    }
  ],

We don't have a coerce method on z.set, but it would be nice, that it works out of the box.

Additional information

  • Would you be willing to help implement this feature?

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions