Skip to content

Conversation

@itaysabato
Copy link

@itaysabato itaysabato commented Jul 24, 2025

Add support for OpenAPI uniqueItems constraint validation:

  • Arrays with uniqueItems: true now generate proper Zod validation with deep equality checking
  • Uses fast-deep-equal library for efficient duplicate detection
  • Array validations (min, max, uniqueItems) are now applied at the array schema definition level - previously, e.g. when used as a schema for an object property, the array schema did not contain these validations, only the object property.

Add support for OpenAPI uniqueItems constraint validation:

- Arrays with uniqueItems: true now generate proper Zod validation
- Uses fast-deep-equal library for efficient deep equality checking
- Implements early break optimization for better performance
- Array validations (min, max, uniqueItems) applied at schema definition level
- Maintains full compatibility with existing functionality
- Includes comprehensive test coverage

Fixes array validation limitations and improves schema generation semantics.

Co-authored-by: Devi <[email protected]>
Co-authored-by: Testi <[email protected]>
@vercel
Copy link

vercel bot commented Jul 24, 2025

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
openapi-zod-client-rim4 ❌ Failed (Inspect) Jul 25, 2025 10:00am

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.

1 participant